Getting ephemeral flag from PackageManager when UidRecord is null

When a user switches off background running for an app that was already
stopped, UidRecord is null when passed in to
AcitivityManager#doStopUidLocked resulting in an NPE. We need to get
ephemeral state flag from package manager in such cases.

Test: Manual

Bug: 36158380
Change-Id: Id77848c252cc0ff0c803113ac2c7c19aa0dcf254
1 file changed