OSDN Git Service

DO NOT MERGE Allow windows to show when input restricted.
authorAndrew Zeng <zenga@google.com>
Tue, 12 Sep 2017 22:34:10 +0000 (15:34 -0700)
committerAndrew Zeng <zenga@google.com>
Thu, 7 Jun 2018 00:19:55 +0000 (17:19 -0700)
Allows non-activity windows to show instead of being hidden (e.g IME)
when lock screen is not showing. This is a difference from current
behavior in G when:

  1. The device is not interactive (either of AoD-on/-off).
  2. The device is interactive and isInputRestricted is true.

This allows for consistency w/ activity manager on allowing IME to be
visible whenever an activity is allowed to be visible (w/o special flags).

Bug: 72027687
Change-Id: I082babcdd4e2ca1c3188da9d43589b1d34fb70c8
(cherry picked from commit 13331922827edd3a0135a1a1be8ac505716f106a)

services/core/java/com/android/server/policy/PhoneWindowManager.java

index 03e34d3..9b20698 100644 (file)
@@ -3055,7 +3055,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
                     || (attrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0;
         }
 
-        boolean keyguardLocked = isKeyguardLocked();
+        boolean keyguardLocked =
+                mKeyguardDelegate != null && (mKeyguardDelegate.isShowing() || mKeyguardOccluded);
         boolean hideDockDivider = attrs.type == TYPE_DOCK_DIVIDER
                 && !mWindowManagerInternal.isStackVisible(WINDOWING_MODE_SPLIT_SCREEN_PRIMARY);
         return (keyguardLocked && !allowWhenLocked && win.getDisplayId() == DEFAULT_DISPLAY)