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
Loading
Please register or sign in to comment