Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +3 −4 Original line number Diff line number Diff line Loading @@ -2295,9 +2295,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { } final LayoutParams attrs = win.getAttrs(); final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisibleLw() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !canBeHiddenByKeyguardLw(imeTarget)); final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisibleLw() && (imeTarget.canShowWhenLocked() || !canBeHiddenByKeyguardLw(imeTarget)); // Show IME over the keyguard if the target allows it boolean allowWhenLocked = (win.isInputMethodWindow() || imeTarget == this) Loading @@ -2305,7 +2304,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (isKeyguardLocked() && isKeyguardOccluded()) { // Show SHOW_WHEN_LOCKED windows if Keyguard is occluded. allowWhenLocked |= (attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 allowWhenLocked |= win.canShowWhenLocked() // Show error dialogs over apps that are shown on lockscreen || (attrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0; } Loading services/core/java/com/android/server/policy/WindowManagerPolicy.java +3 −0 Original line number Diff line number Diff line Loading @@ -468,6 +468,9 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { /** @return true if this window desires key events. */ boolean canReceiveKeys(); /** @return true if the window can show over keyguard. */ boolean canShowWhenLocked(); /** * Writes {@link com.android.server.wm.IdentifierProto} to stream. */ Loading services/core/java/com/android/server/wm/WindowState.java +8 −0 Original line number Diff line number Diff line Loading @@ -2405,6 +2405,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP && !cantReceiveTouchInput(); } @Override public boolean canShowWhenLocked() { final boolean showBecauseOfActivity = mAppToken != null && mAppToken.mActivityRecord.canShowWhenLocked(); final boolean showBecauseOfWindow = (getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0; return showBecauseOfActivity || showBecauseOfWindow; } /** @return false if this window desires touch events. */ boolean cantReceiveTouchInput() { return mAppToken != null && mAppToken.getTask() != null Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +3 −4 Original line number Diff line number Diff line Loading @@ -2295,9 +2295,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { } final LayoutParams attrs = win.getAttrs(); final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisibleLw() && ((imeTarget.getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0 || !canBeHiddenByKeyguardLw(imeTarget)); final boolean showImeOverKeyguard = imeTarget != null && imeTarget.isVisibleLw() && (imeTarget.canShowWhenLocked() || !canBeHiddenByKeyguardLw(imeTarget)); // Show IME over the keyguard if the target allows it boolean allowWhenLocked = (win.isInputMethodWindow() || imeTarget == this) Loading @@ -2305,7 +2304,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (isKeyguardLocked() && isKeyguardOccluded()) { // Show SHOW_WHEN_LOCKED windows if Keyguard is occluded. allowWhenLocked |= (attrs.flags & FLAG_SHOW_WHEN_LOCKED) != 0 allowWhenLocked |= win.canShowWhenLocked() // Show error dialogs over apps that are shown on lockscreen || (attrs.privateFlags & PRIVATE_FLAG_SYSTEM_ERROR) != 0; } Loading
services/core/java/com/android/server/policy/WindowManagerPolicy.java +3 −0 Original line number Diff line number Diff line Loading @@ -468,6 +468,9 @@ public interface WindowManagerPolicy extends WindowManagerPolicyConstants { /** @return true if this window desires key events. */ boolean canReceiveKeys(); /** @return true if the window can show over keyguard. */ boolean canShowWhenLocked(); /** * Writes {@link com.android.server.wm.IdentifierProto} to stream. */ Loading
services/core/java/com/android/server/wm/WindowState.java +8 −0 Original line number Diff line number Diff line Loading @@ -2405,6 +2405,14 @@ class WindowState extends WindowContainer<WindowState> implements WindowManagerP && !cantReceiveTouchInput(); } @Override public boolean canShowWhenLocked() { final boolean showBecauseOfActivity = mAppToken != null && mAppToken.mActivityRecord.canShowWhenLocked(); final boolean showBecauseOfWindow = (getAttrs().flags & FLAG_SHOW_WHEN_LOCKED) != 0; return showBecauseOfActivity || showBecauseOfWindow; } /** @return false if this window desires touch events. */ boolean cantReceiveTouchInput() { return mAppToken != null && mAppToken.getTask() != null Loading