OSDN Git Service

The big keyguard transition refactor (2/n)
authorJorim Jaggi <jjaggi@google.com>
Thu, 13 Oct 2016 12:33:27 +0000 (14:33 +0200)
committerJorim Jaggi <jjaggi@google.com>
Tue, 1 Nov 2016 21:06:49 +0000 (14:06 -0700)
commit5a108c225a81cedacb1cec9b5b1986f2f3eff75c
treefa35680a5f8edd882162a596325d2c711516716f
parentfe762344f4475a3a336bb46aef2d59c1fabf32ab
The big keyguard transition refactor (2/n)

Introduce UnknownVisibilityController, which keeps track of apps that
may or may not be visible when launching an activity behind Keyguard.
When Keyguard is occluded and we launch another activity, we don't
know whether we still have to keep Keyguard occluded until the app
has gone through the resume path and issued a relayout call to update
the Keyguard flags.

This class keeps track of that state and defers the app transition
until the unknown visibility of all apps is resolved.

Test:
1) Have an occluding activity that starts another occluding
activity, ensure that there is no flicker.
2) Have an occluding activity while the Keyguard is insecure, start
a DISMISS_KEYGUARD activity, ensure there is no flicker.
3) runtest frameworks-services -c com.android.server.wm.UnknownVisibilityControllerTest

Bug: 32057734
Change-Id: I5145b272722ab8c31dd7c5383286f5c9473e26a4
services/core/java/com/android/server/am/ActivityManagerService.java
services/core/java/com/android/server/am/ActivityStackSupervisor.java
services/core/java/com/android/server/wm/RootWindowContainer.java
services/core/java/com/android/server/wm/UnknownAppVisibilityController.java [new file with mode: 0644]
services/core/java/com/android/server/wm/WindowManagerService.java
services/core/java/com/android/server/wm/WindowSurfacePlacer.java
services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java [new file with mode: 0644]