Improve NFC availability for active UIDs

Sometimes onResume() happens before  onForegroundActivitiesChanged().
Do an additional check into IActivityManager.isUidActive()
if the onForegroundActivitiesChanged() has not yet been called.

Test: manual
Bug: 155160799
Bug: 147377722
Change-Id: Iba99d288a1b9b3391cc1d0861a75045e2d303c10
2 files changed