Skip to content
Commit 9edf758f authored by Felipe Leme's avatar Felipe Leme
Browse files

Added user visibility callbacks on SystemService.

On Android U, system components (like location) should rely on
UM.isUserVisible() (rather than AM.getCurrentUser()) to check if a
user is "visible". Hence, we need to provide a callback mechanism to
notify when the user visibility changes.

This change adds a SystemService.onUserVisibilityChanged() API, and
also refactors how some internal components (like UserController and
ActivityManagerService) handle the initial start of user 0.

Finally, it also changes some user-related event logs to include
more info.

Bug: 244333150

Test: atest UserControllerTest # to check for breakage only
Test: m update-api
Test: adb shell dumpsys activity users|grep mVisibleUsers
Test: adb logcat -D -b events | egrep '(I uc_|I ssm_)'

Change-Id: I6898a7fc553b2bc600151715707b409b68e4880d
parent f933369f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment