Fix the bug that queries UsageStatsService for locked users
In addition to the bug fix, this also changes the user lifecycle callbacks People Service is using:
1) onUserUnlocking() -> onUserUnlocked()
2) onUserStopped() -> onUserStopping()
The user lifecycle callback changes are based on a recent callback API
change in ag/10396717. This change will make the service run safer: it
avoids performing queries on locked users.
Change-Id: I4d0ebdb80f2181b5eb5a636d345c53a01c7df210
Test: Manual test
Test: atest com.android.server.people.data.DataManagerTest
Bug: 150882079
3 files changed