OSDN Git Service

Also show attached windows during FLAG_SHOW_WHEN_LOCKED animations
authorJorim Jaggi <jjaggi@google.com>
Wed, 31 Aug 2016 02:55:32 +0000 (19:55 -0700)
committerJorim Jaggi <jjaggi@google.com>
Wed, 31 Aug 2016 02:55:32 +0000 (19:55 -0700)
Since appShowWhenLocked is already null during the animation, we
also need to show the window if it's attached to a
FLAG_SHOW_WHEN_LOCKED window

Test: Test animation occluded -> lockscreen with an app that
has a SurfaceView
Fixes: 30829255

Change-Id: I0e0012bbe5679cd0894ce4d94902ff8b24823b51

services/core/java/com/android/server/wm/WindowAnimator.java

index 47b0f3b..022848e 100644 (file)
@@ -236,6 +236,9 @@ public class WindowAnimator {
         allowWhenLocked |= (win.mIsImWindow || imeTarget == win) && showImeOverKeyguard;
         // Show SHOW_WHEN_LOCKED windows
         allowWhenLocked |= (win.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
+        // Show windows that are attached to SHOW_WHEN_LOCKED windows
+        allowWhenLocked |= win.mAttachedWindow != null
+                && (win.mAttachedWindow.mAttrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0;
 
         if (appShowWhenLocked != null) {
             allowWhenLocked |= appShowWhenLocked == win.mAppToken