Loading services/core/java/com/android/server/wm/ActivityRecord.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -6459,7 +6459,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A returningOptions = null; returningOptions = null; if (canTurnScreenOn()) { if (canTurnScreenOn()) { mTaskSupervisor.wakeUp("turnScreenOnFlag"); mTaskSupervisor.wakeUp(getDisplayId(), "turnScreenOnFlag"); } else { } else { // If the screen is going to turn on because the caller explicitly requested it and // If the screen is going to turn on because the caller explicitly requested it and // the keyguard is not showing don't attempt to sleep. Otherwise the Activity will // the keyguard is not showing don't attempt to sleep. Otherwise the Activity will Loading services/core/java/com/android/server/wm/ActivityStarter.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -2397,7 +2397,8 @@ class ActivityStarter { // This is moving an existing task to front. But since dream activity has a higher z-order // This is moving an existing task to front. But since dream activity has a higher z-order // to cover normal activities, it needs the awakening event to be dismissed. // to cover normal activities, it needs the awakening event to be dismissed. if (mService.isDreaming() && targetTaskTop.canTurnScreenOn()) { if (mService.isDreaming() && targetTaskTop.canTurnScreenOn()) { targetTaskTop.mTaskSupervisor.wakeUp("recycleTask#turnScreenOnFlag"); targetTaskTop.mTaskSupervisor.wakeUp( targetTaskTop.getDisplayId(), "recycleTask#turnScreenOnFlag"); } } mLastStartActivityRecord = targetTaskTop; mLastStartActivityRecord = targetTaskTop; Loading services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2525,9 +2525,9 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { } } } } void wakeUp(String reason) { void wakeUp(int displayId, String reason) { mPowerManager.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_APPLICATION, mPowerManager.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_APPLICATION, "android.server.am:TURN_ON:" + reason); "android.server.am:TURN_ON:" + reason, displayId); } } /** Starts a batch of visibility updates. */ /** Starts a batch of visibility updates. */ Loading services/core/java/com/android/server/wm/KeyguardController.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -329,7 +329,7 @@ class KeyguardController { // If the client has requested to dismiss the keyguard and the Activity has the flag to // If the client has requested to dismiss the keyguard and the Activity has the flag to // turn the screen on, wakeup the screen if it's the top Activity. // turn the screen on, wakeup the screen if it's the top Activity. if (activityRecord.getTurnScreenOnFlag() && activityRecord.isTopRunningActivity()) { if (activityRecord.getTurnScreenOnFlag() && activityRecord.isTopRunningActivity()) { mTaskSupervisor.wakeUp("dismissKeyguard"); mTaskSupervisor.wakeUp(activityRecord.getDisplayId(), "dismissKeyguard"); } } mWindowManager.dismissKeyguard(callback, message); mWindowManager.dismissKeyguard(callback, message); Loading Loading @@ -765,9 +765,9 @@ class KeyguardController { } } if (mTopTurnScreenOnActivity != null if (mTopTurnScreenOnActivity != null && !mService.mWindowManager.mPowerManager.isInteractive() && !mService.mWindowManager.mPowerManager.isInteractive(display.getDisplayId()) && (mRequestDismissKeyguard || mOccluded)) { && (mRequestDismissKeyguard || mOccluded)) { controller.mTaskSupervisor.wakeUp("handleTurnScreenOn"); controller.mTaskSupervisor.wakeUp(display.getDisplayId(), "handleTurnScreenOn"); mTopTurnScreenOnActivity.setCurrentLaunchCanTurnScreenOn(false); mTopTurnScreenOnActivity.setCurrentLaunchCanTurnScreenOn(false); } } Loading services/core/java/com/android/server/wm/WindowManagerService.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -3421,9 +3421,11 @@ public class WindowManagerService extends IWindowManager.Stub throw new SecurityException("Requires CONTROL_KEYGUARD permission"); throw new SecurityException("Requires CONTROL_KEYGUARD permission"); } } synchronized (mGlobalLock) { synchronized (mGlobalLock) { final DisplayContent defaultDisplayContent = getDefaultDisplayContentLocked(); if (!dreamHandlesConfirmKeys() if (!dreamHandlesConfirmKeys() && getDefaultDisplayContentLocked().getDisplayPolicy().isShowingDreamLw()) { && defaultDisplayContent.getDisplayPolicy().isShowingDreamLw()) { mAtmService.mTaskSupervisor.wakeUp("leaveDream"); mAtmService.mTaskSupervisor.wakeUp( defaultDisplayContent.getDisplayId(), "leaveDream"); } } mPolicy.dismissKeyguardLw(callback, message); mPolicy.dismissKeyguardLw(callback, message); } } Loading Loading
services/core/java/com/android/server/wm/ActivityRecord.java +1 −1 Original line number Original line Diff line number Diff line Loading @@ -6459,7 +6459,7 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A returningOptions = null; returningOptions = null; if (canTurnScreenOn()) { if (canTurnScreenOn()) { mTaskSupervisor.wakeUp("turnScreenOnFlag"); mTaskSupervisor.wakeUp(getDisplayId(), "turnScreenOnFlag"); } else { } else { // If the screen is going to turn on because the caller explicitly requested it and // If the screen is going to turn on because the caller explicitly requested it and // the keyguard is not showing don't attempt to sleep. Otherwise the Activity will // the keyguard is not showing don't attempt to sleep. Otherwise the Activity will Loading
services/core/java/com/android/server/wm/ActivityStarter.java +2 −1 Original line number Original line Diff line number Diff line Loading @@ -2397,7 +2397,8 @@ class ActivityStarter { // This is moving an existing task to front. But since dream activity has a higher z-order // This is moving an existing task to front. But since dream activity has a higher z-order // to cover normal activities, it needs the awakening event to be dismissed. // to cover normal activities, it needs the awakening event to be dismissed. if (mService.isDreaming() && targetTaskTop.canTurnScreenOn()) { if (mService.isDreaming() && targetTaskTop.canTurnScreenOn()) { targetTaskTop.mTaskSupervisor.wakeUp("recycleTask#turnScreenOnFlag"); targetTaskTop.mTaskSupervisor.wakeUp( targetTaskTop.getDisplayId(), "recycleTask#turnScreenOnFlag"); } } mLastStartActivityRecord = targetTaskTop; mLastStartActivityRecord = targetTaskTop; Loading
services/core/java/com/android/server/wm/ActivityTaskSupervisor.java +2 −2 Original line number Original line Diff line number Diff line Loading @@ -2525,9 +2525,9 @@ public class ActivityTaskSupervisor implements RecentTasks.Callbacks { } } } } void wakeUp(String reason) { void wakeUp(int displayId, String reason) { mPowerManager.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_APPLICATION, mPowerManager.wakeUp(SystemClock.uptimeMillis(), PowerManager.WAKE_REASON_APPLICATION, "android.server.am:TURN_ON:" + reason); "android.server.am:TURN_ON:" + reason, displayId); } } /** Starts a batch of visibility updates. */ /** Starts a batch of visibility updates. */ Loading
services/core/java/com/android/server/wm/KeyguardController.java +3 −3 Original line number Original line Diff line number Diff line Loading @@ -329,7 +329,7 @@ class KeyguardController { // If the client has requested to dismiss the keyguard and the Activity has the flag to // If the client has requested to dismiss the keyguard and the Activity has the flag to // turn the screen on, wakeup the screen if it's the top Activity. // turn the screen on, wakeup the screen if it's the top Activity. if (activityRecord.getTurnScreenOnFlag() && activityRecord.isTopRunningActivity()) { if (activityRecord.getTurnScreenOnFlag() && activityRecord.isTopRunningActivity()) { mTaskSupervisor.wakeUp("dismissKeyguard"); mTaskSupervisor.wakeUp(activityRecord.getDisplayId(), "dismissKeyguard"); } } mWindowManager.dismissKeyguard(callback, message); mWindowManager.dismissKeyguard(callback, message); Loading Loading @@ -765,9 +765,9 @@ class KeyguardController { } } if (mTopTurnScreenOnActivity != null if (mTopTurnScreenOnActivity != null && !mService.mWindowManager.mPowerManager.isInteractive() && !mService.mWindowManager.mPowerManager.isInteractive(display.getDisplayId()) && (mRequestDismissKeyguard || mOccluded)) { && (mRequestDismissKeyguard || mOccluded)) { controller.mTaskSupervisor.wakeUp("handleTurnScreenOn"); controller.mTaskSupervisor.wakeUp(display.getDisplayId(), "handleTurnScreenOn"); mTopTurnScreenOnActivity.setCurrentLaunchCanTurnScreenOn(false); mTopTurnScreenOnActivity.setCurrentLaunchCanTurnScreenOn(false); } } Loading
services/core/java/com/android/server/wm/WindowManagerService.java +4 −2 Original line number Original line Diff line number Diff line Loading @@ -3421,9 +3421,11 @@ public class WindowManagerService extends IWindowManager.Stub throw new SecurityException("Requires CONTROL_KEYGUARD permission"); throw new SecurityException("Requires CONTROL_KEYGUARD permission"); } } synchronized (mGlobalLock) { synchronized (mGlobalLock) { final DisplayContent defaultDisplayContent = getDefaultDisplayContentLocked(); if (!dreamHandlesConfirmKeys() if (!dreamHandlesConfirmKeys() && getDefaultDisplayContentLocked().getDisplayPolicy().isShowingDreamLw()) { && defaultDisplayContent.getDisplayPolicy().isShowingDreamLw()) { mAtmService.mTaskSupervisor.wakeUp("leaveDream"); mAtmService.mTaskSupervisor.wakeUp( defaultDisplayContent.getDisplayId(), "leaveDream"); } } mPolicy.dismissKeyguardLw(callback, message); mPolicy.dismissKeyguardLw(callback, message); } } Loading