Fix 2 LaunchParamsPersister issues

The first one is it erroneously accepts tasks with null realActivity. It
shouldn't save launch params for such tasks.

The second one is when it receives a package removed notification from
PackageManagerService, it touches mLaunchParamsMap without holding WM
global lock.

Bug: 186696426
Test: atest LaunchParamsPersister
Change-Id: Ib0159835f177b7a3e9208bf77b3b608920262588
2 files changed