OSDN Git Service

Fix camera launch delay from Keyguard
authorJorim Jaggi <jjaggi@google.com>
Tue, 30 May 2017 23:16:01 +0000 (16:16 -0700)
committerandroid-build-team Robot <android-build-team-robot@google.com>
Fri, 2 Jun 2017 00:52:23 +0000 (00:52 +0000)
commitdf038aa8f315d8672e3e9ee482d61b58f694e147
tree8f53fc89e95736c19d9b7099886751ff080bb99d
parent03a2f35d3b52134f679258a0109f6fc7a870f6f8
Fix camera launch delay from Keyguard

When we launch the camera from the lockscreen, we launch a
trampoline activity that launches a real activity. Now, under
certain race conditions the trampoline activity was resumed but
then set to invisible immediately again such that the window
was never relayouted. Thus, the activity was stuck in
WAITING_RELAYOUT state in UnknownAppVisibilityController, leading
to a app transition timeout.

To fix this, we immediately remove the app from the unknown
visibility controller as soon as it gets set to invisible again.

Test: Set animation scale multiplier to 0, open camera, finish
activity by pressing back, turn off screen, launch camera via
double tap, observe no delay.
Test: go/wm-smoke

Fixes: 37677242
Change-Id: I103a89af5fb515d6635f86abe2c67a02d90abd79
(cherry picked from commit 45ca0544ea03e04d1ecb11640484818fe2838c28)
services/core/java/com/android/server/wm/AppWindowContainerController.java
services/core/java/com/android/server/wm/AppWindowToken.java
services/core/java/com/android/server/wm/UnknownAppVisibilityController.java
services/tests/servicestests/src/com/android/server/wm/UnknownAppVisibilityControllerTest.java