Loading core/java/com/android/internal/policy/IKeyguardService.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -93,4 +93,10 @@ oneway interface IKeyguardService { * @param fadeoutDuration the duration of the exit animation, in milliseconds */ void startKeyguardExitAnimation(long startTime, long fadeoutDuration); /** * Notifies the Keyguard that the power key was pressed while locked and launched Home rather * than putting the device to sleep or waking up. */ void onShortPowerPressedGoHome(); } packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +6 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,12 @@ public class KeyguardService extends Service { mKeyguardViewMediator.startKeyguardExitAnimation(startTime, fadeoutDuration); Trace.endSection(); } @Override public void onShortPowerPressedGoHome() { checkPermission(); mKeyguardViewMediator.onShortPowerPressedGoHome(); } }; } packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +4 −0 Original line number Diff line number Diff line Loading @@ -2013,6 +2013,10 @@ public class KeyguardViewMediator extends SystemUI { Trace.endSection(); } public void onShortPowerPressedGoHome() { // do nothing } public ViewMediatorCallback getViewMediatorCallback() { return mViewMediatorCallback; } Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +11 −3 Original line number Diff line number Diff line Loading @@ -1418,7 +1418,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { launchHomeFromHotKey(); break; case SHORT_PRESS_POWER_GO_HOME: launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); shortPressPowerGoHome(); break; case SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME: { if (mDismissImeOnBackKeyPressed) { Loading @@ -1430,8 +1430,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mInputMethodManagerInternal.hideCurrentInputMethod(); } } else { launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); shortPressPowerGoHome(); } break; } Loading @@ -1439,6 +1438,15 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } private void shortPressPowerGoHome() { launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); if (isKeyguardShowingAndNotOccluded()) { // Notify keyguard so it can do any special handling for the power button since the // device will not power off and only launch home. mKeyguardDelegate.onShortPowerPressedGoHome(); } } private void powerMultiPressAction(long eventTime, boolean interactive, int behavior) { switch (behavior) { case MULTI_PRESS_POWER_NOTHING: Loading services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +6 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,12 @@ public class KeyguardServiceDelegate { mKeyguardState.bootCompleted = true; } public void onShortPowerPressedGoHome() { if (mKeyguardService != null) { mKeyguardService.onShortPowerPressedGoHome(); } } public void dump(String prefix, PrintWriter pw) { pw.println(prefix + TAG); prefix += " "; Loading Loading
core/java/com/android/internal/policy/IKeyguardService.aidl +6 −0 Original line number Diff line number Diff line Loading @@ -93,4 +93,10 @@ oneway interface IKeyguardService { * @param fadeoutDuration the duration of the exit animation, in milliseconds */ void startKeyguardExitAnimation(long startTime, long fadeoutDuration); /** * Notifies the Keyguard that the power key was pressed while locked and launched Home rather * than putting the device to sleep or waking up. */ void onShortPowerPressedGoHome(); }
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardService.java +6 −0 Original line number Diff line number Diff line Loading @@ -194,6 +194,12 @@ public class KeyguardService extends Service { mKeyguardViewMediator.startKeyguardExitAnimation(startTime, fadeoutDuration); Trace.endSection(); } @Override public void onShortPowerPressedGoHome() { checkPermission(); mKeyguardViewMediator.onShortPowerPressedGoHome(); } }; }
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +4 −0 Original line number Diff line number Diff line Loading @@ -2013,6 +2013,10 @@ public class KeyguardViewMediator extends SystemUI { Trace.endSection(); } public void onShortPowerPressedGoHome() { // do nothing } public ViewMediatorCallback getViewMediatorCallback() { return mViewMediatorCallback; } Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +11 −3 Original line number Diff line number Diff line Loading @@ -1418,7 +1418,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { launchHomeFromHotKey(); break; case SHORT_PRESS_POWER_GO_HOME: launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); shortPressPowerGoHome(); break; case SHORT_PRESS_POWER_CLOSE_IME_OR_GO_HOME: { if (mDismissImeOnBackKeyPressed) { Loading @@ -1430,8 +1430,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mInputMethodManagerInternal.hideCurrentInputMethod(); } } else { launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); shortPressPowerGoHome(); } break; } Loading @@ -1439,6 +1438,15 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } private void shortPressPowerGoHome() { launchHomeFromHotKey(true /* awakenFromDreams */, false /*respectKeyguard*/); if (isKeyguardShowingAndNotOccluded()) { // Notify keyguard so it can do any special handling for the power button since the // device will not power off and only launch home. mKeyguardDelegate.onShortPowerPressedGoHome(); } } private void powerMultiPressAction(long eventTime, boolean interactive, int behavior) { switch (behavior) { case MULTI_PRESS_POWER_NOTHING: Loading
services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +6 −0 Original line number Diff line number Diff line Loading @@ -372,6 +372,12 @@ public class KeyguardServiceDelegate { mKeyguardState.bootCompleted = true; } public void onShortPowerPressedGoHome() { if (mKeyguardService != null) { mKeyguardService.onShortPowerPressedGoHome(); } } public void dump(String prefix, PrintWriter pw) { pw.println(prefix + TAG); prefix += " "; Loading