Loading services/core/java/com/android/server/wm/ActivityStack.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2286,7 +2286,7 @@ class ActivityStack extends ConfigurationContainer { * Check if the display to which this stack is attached has * Check if the display to which this stack is attached has * {@link Display#FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD} applied. * {@link Display#FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD} applied. */ */ private boolean canShowWithInsecureKeyguard() { boolean canShowWithInsecureKeyguard() { final ActivityDisplay activityDisplay = getDisplay(); final ActivityDisplay activityDisplay = getDisplay(); if (activityDisplay == null) { if (activityDisplay == null) { throw new IllegalStateException("Stack is not attached to any display, stackId=" throw new IllegalStateException("Stack is not attached to any display, stackId=" Loading services/core/java/com/android/server/wm/KeyguardController.java +11 −16 Original line number Original line Diff line number Diff line Loading @@ -91,9 +91,7 @@ class KeyguardController { */ */ boolean isKeyguardOrAodShowing(int displayId) { boolean isKeyguardOrAodShowing(int displayId) { return (mKeyguardShowing || mAodShowing) && !mKeyguardGoingAway return (mKeyguardShowing || mAodShowing) && !mKeyguardGoingAway && (displayId == DEFAULT_DISPLAY && !isDisplayOccluded(displayId); ? !isDisplayOccluded(DEFAULT_DISPLAY) : isShowingOnSecondaryDisplay(displayId)); } } /** /** Loading @@ -101,10 +99,7 @@ class KeyguardController { * display, false otherwise * display, false otherwise */ */ boolean isKeyguardShowing(int displayId) { boolean isKeyguardShowing(int displayId) { return mKeyguardShowing && !mKeyguardGoingAway return mKeyguardShowing && !mKeyguardGoingAway && !isDisplayOccluded(displayId); && (displayId == DEFAULT_DISPLAY ? !isDisplayOccluded(DEFAULT_DISPLAY) : isShowingOnSecondaryDisplay(displayId)); } } /** /** Loading Loading @@ -152,14 +147,6 @@ class KeyguardController { updateKeyguardSleepToken(); updateKeyguardSleepToken(); } } private boolean isShowingOnSecondaryDisplay(int displayId) { if (mSecondaryDisplayIdsShowing == null) return false; for (int showingId : mSecondaryDisplayIdsShowing) { if (displayId == showingId) return true; } return false; } /** /** * Called when Keyguard is going away. * Called when Keyguard is going away. * * Loading Loading @@ -473,8 +460,16 @@ class KeyguardController { if (stack.getTopDismissingKeyguardActivity() != null) { if (stack.getTopDismissingKeyguardActivity() != null) { mDismissingKeyguardActivity = stack.getTopDismissingKeyguardActivity(); mDismissingKeyguardActivity = stack.getTopDismissingKeyguardActivity(); } } // FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD only apply for secondary display. if (mDisplayId != DEFAULT_DISPLAY) { mOccluded |= stack.canShowWithInsecureKeyguard() && controller.canDismissKeyguard(); } } } // TODO(b/123372519): isShowingDream can only works on default display. if (mDisplayId == DEFAULT_DISPLAY) { mOccluded |= controller.mWindowManager.isShowingDream(); mOccluded |= controller.mWindowManager.isShowingDream(); } // TODO(b/113840485): Handle app transition for individual display, and apply occluded // TODO(b/113840485): Handle app transition for individual display, and apply occluded // state change to secondary displays. // state change to secondary displays. Loading services/core/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2817,7 +2817,7 @@ public class WindowManagerService extends IWindowManager.Stub public boolean isShowingDream() { public boolean isShowingDream() { synchronized (mGlobalLock) { synchronized (mGlobalLock) { // TODO: fix this when dream can be shown on non-default display. // TODO(b/123372519): Fix this when dream can be shown on non-default display. return getDefaultDisplayContentLocked().getDisplayPolicy().isShowingDreamLw(); return getDefaultDisplayContentLocked().getDisplayPolicy().isShowingDreamLw(); } } } } Loading Loading
services/core/java/com/android/server/wm/ActivityStack.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2286,7 +2286,7 @@ class ActivityStack extends ConfigurationContainer { * Check if the display to which this stack is attached has * Check if the display to which this stack is attached has * {@link Display#FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD} applied. * {@link Display#FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD} applied. */ */ private boolean canShowWithInsecureKeyguard() { boolean canShowWithInsecureKeyguard() { final ActivityDisplay activityDisplay = getDisplay(); final ActivityDisplay activityDisplay = getDisplay(); if (activityDisplay == null) { if (activityDisplay == null) { throw new IllegalStateException("Stack is not attached to any display, stackId=" throw new IllegalStateException("Stack is not attached to any display, stackId=" Loading
services/core/java/com/android/server/wm/KeyguardController.java +11 −16 Original line number Original line Diff line number Diff line Loading @@ -91,9 +91,7 @@ class KeyguardController { */ */ boolean isKeyguardOrAodShowing(int displayId) { boolean isKeyguardOrAodShowing(int displayId) { return (mKeyguardShowing || mAodShowing) && !mKeyguardGoingAway return (mKeyguardShowing || mAodShowing) && !mKeyguardGoingAway && (displayId == DEFAULT_DISPLAY && !isDisplayOccluded(displayId); ? !isDisplayOccluded(DEFAULT_DISPLAY) : isShowingOnSecondaryDisplay(displayId)); } } /** /** Loading @@ -101,10 +99,7 @@ class KeyguardController { * display, false otherwise * display, false otherwise */ */ boolean isKeyguardShowing(int displayId) { boolean isKeyguardShowing(int displayId) { return mKeyguardShowing && !mKeyguardGoingAway return mKeyguardShowing && !mKeyguardGoingAway && !isDisplayOccluded(displayId); && (displayId == DEFAULT_DISPLAY ? !isDisplayOccluded(DEFAULT_DISPLAY) : isShowingOnSecondaryDisplay(displayId)); } } /** /** Loading Loading @@ -152,14 +147,6 @@ class KeyguardController { updateKeyguardSleepToken(); updateKeyguardSleepToken(); } } private boolean isShowingOnSecondaryDisplay(int displayId) { if (mSecondaryDisplayIdsShowing == null) return false; for (int showingId : mSecondaryDisplayIdsShowing) { if (displayId == showingId) return true; } return false; } /** /** * Called when Keyguard is going away. * Called when Keyguard is going away. * * Loading Loading @@ -473,8 +460,16 @@ class KeyguardController { if (stack.getTopDismissingKeyguardActivity() != null) { if (stack.getTopDismissingKeyguardActivity() != null) { mDismissingKeyguardActivity = stack.getTopDismissingKeyguardActivity(); mDismissingKeyguardActivity = stack.getTopDismissingKeyguardActivity(); } } // FLAG_CAN_SHOW_WITH_INSECURE_KEYGUARD only apply for secondary display. if (mDisplayId != DEFAULT_DISPLAY) { mOccluded |= stack.canShowWithInsecureKeyguard() && controller.canDismissKeyguard(); } } } // TODO(b/123372519): isShowingDream can only works on default display. if (mDisplayId == DEFAULT_DISPLAY) { mOccluded |= controller.mWindowManager.isShowingDream(); mOccluded |= controller.mWindowManager.isShowingDream(); } // TODO(b/113840485): Handle app transition for individual display, and apply occluded // TODO(b/113840485): Handle app transition for individual display, and apply occluded // state change to secondary displays. // state change to secondary displays. Loading
services/core/java/com/android/server/wm/WindowManagerService.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -2817,7 +2817,7 @@ public class WindowManagerService extends IWindowManager.Stub public boolean isShowingDream() { public boolean isShowingDream() { synchronized (mGlobalLock) { synchronized (mGlobalLock) { // TODO: fix this when dream can be shown on non-default display. // TODO(b/123372519): Fix this when dream can be shown on non-default display. return getDefaultDisplayContentLocked().getDisplayPolicy().isShowingDreamLw(); return getDefaultDisplayContentLocked().getDisplayPolicy().isShowingDreamLw(); } } } } Loading