Skip to content
Commit 7d1342e0 authored by Felipe Leme's avatar Felipe Leme Committed by Grace Cheng
Browse files

Moved user visibility callback to its own listener.

Commit 9edf758f introduced a
onUserVisibilityChanged() method on SystemService, but although
the user visibility change is typically associated with its
lifecycle state changes (which is what is reported by those
SystemService callback), that's not always the case. For example,
if the user that is switched to the foreground was already running
in the background, both that user visibility and the visibility of
its profiles would be changed to visible (if they were also in the
background), even though their "lifecycle state" didn't change.

So, it's better to handle these changes in a separate listener.

Test: adb logcat -D -b events | egrep '(I um_|I ssm_)' # while changing users
Test: atest FrameworksServicesTests:UserControllerTest

Bug: 244333150
Bug: 255895655

Change-Id: Ic5a51a4c75a0ec343be944f2628a3cd1f9e75898
parent 0fc931f2
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