Ensure UidStats is not null when needed.

We're sometimes being told that an app has been uninstalled before the
process has stopped. That puts JS and especially ConnectivityController
in an inconsistent state. Make sure we don't crash because of the
inconsistency.

Bug: 183921387
Bug: 184098842
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/job
Test: atest frameworks/base/services/tests/mockingservicestests/src/com/android/server/job
Test: atest CtsJobSchedulerTestCases
Change-Id: Ied17a461a47160c81042676f43d7f8defe1c4466
1 file changed