Loading services/core/java/com/android/server/policy/PhoneWindowManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -6085,6 +6085,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } startedWakingUp(); screenTurningOn(null); screenTurnedOn(); } ProgressDialog mBootMsgDialog = null; Loading services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +27 −4 Original line number Diff line number Diff line Loading @@ -32,6 +32,14 @@ public class KeyguardServiceDelegate { private static final String TAG = "KeyguardServiceDelegate"; private static final boolean DEBUG = true; private static final int SCREEN_STATE_OFF = 0; private static final int SCREEN_STATE_TURNING_ON = 1; private static final int SCREEN_STATE_ON = 2; private static final int INTERACTIVE_STATE_SLEEP = 0; private static final int INTERACTIVE_STATE_AWAKE = 1; private static final int INTERACTIVE_STATE_GOING_TO_SLEEP = 2; protected KeyguardServiceWrapper mKeyguardService; private final Context mContext; private final View mScrim; // shown if keyguard crashes Loading Loading @@ -61,6 +69,8 @@ public class KeyguardServiceDelegate { public int offReason; public int currentUser; public boolean bootCompleted; public int screenState; public int interactiveState; }; public interface DrawnListener { Loading Loading @@ -144,10 +154,17 @@ public class KeyguardServiceDelegate { // If the system is ready, it means keyguard crashed and restarted. mKeyguardService.onSystemReady(); // This is used to hide the scrim once keyguard displays. if (mKeyguardState.interactiveState == INTERACTIVE_STATE_AWAKE) { mKeyguardService.onStartedWakingUp(); } if (mKeyguardState.screenState == SCREEN_STATE_ON || mKeyguardState.screenState == SCREEN_STATE_TURNING_ON) { mKeyguardService.onScreenTurningOn( new KeyguardShowDelegate(mDrawnListenerWhenConnect)); } if (mKeyguardState.screenState == SCREEN_STATE_ON) { mKeyguardService.onScreenTurnedOn(); } mDrawnListenerWhenConnect = null; } if (mKeyguardState.bootCompleted) { Loading Loading @@ -231,6 +248,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onStartedWakingUp()"); mKeyguardService.onStartedWakingUp(); } mKeyguardState.interactiveState = INTERACTIVE_STATE_AWAKE; } public void onScreenTurnedOff() { Loading @@ -238,6 +256,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onScreenTurnedOff()"); mKeyguardService.onScreenTurnedOff(); } mKeyguardState.screenState = SCREEN_STATE_OFF; } public void onScreenTurningOn(final DrawnListener drawnListener) { Loading @@ -252,6 +271,7 @@ public class KeyguardServiceDelegate { mDrawnListenerWhenConnect = drawnListener; showScrim(); } mKeyguardState.screenState = SCREEN_STATE_TURNING_ON; } public void onScreenTurnedOn() { Loading @@ -259,6 +279,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onScreenTurnedOn()"); mKeyguardService.onScreenTurnedOn(); } mKeyguardState.screenState = SCREEN_STATE_ON; } public void onStartedGoingToSleep(int why) { Loading @@ -266,12 +287,14 @@ public class KeyguardServiceDelegate { mKeyguardService.onStartedGoingToSleep(why); } mKeyguardState.offReason = why; mKeyguardState.interactiveState = INTERACTIVE_STATE_GOING_TO_SLEEP; } public void onFinishedGoingToSleep(int why) { if (mKeyguardService != null) { mKeyguardService.onFinishedGoingToSleep(why); } mKeyguardState.interactiveState = INTERACTIVE_STATE_SLEEP; } public void setKeyguardEnabled(boolean enabled) { Loading Loading
services/core/java/com/android/server/policy/PhoneWindowManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -6085,6 +6085,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { } startedWakingUp(); screenTurningOn(null); screenTurnedOn(); } ProgressDialog mBootMsgDialog = null; Loading
services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +27 −4 Original line number Diff line number Diff line Loading @@ -32,6 +32,14 @@ public class KeyguardServiceDelegate { private static final String TAG = "KeyguardServiceDelegate"; private static final boolean DEBUG = true; private static final int SCREEN_STATE_OFF = 0; private static final int SCREEN_STATE_TURNING_ON = 1; private static final int SCREEN_STATE_ON = 2; private static final int INTERACTIVE_STATE_SLEEP = 0; private static final int INTERACTIVE_STATE_AWAKE = 1; private static final int INTERACTIVE_STATE_GOING_TO_SLEEP = 2; protected KeyguardServiceWrapper mKeyguardService; private final Context mContext; private final View mScrim; // shown if keyguard crashes Loading Loading @@ -61,6 +69,8 @@ public class KeyguardServiceDelegate { public int offReason; public int currentUser; public boolean bootCompleted; public int screenState; public int interactiveState; }; public interface DrawnListener { Loading Loading @@ -144,10 +154,17 @@ public class KeyguardServiceDelegate { // If the system is ready, it means keyguard crashed and restarted. mKeyguardService.onSystemReady(); // This is used to hide the scrim once keyguard displays. if (mKeyguardState.interactiveState == INTERACTIVE_STATE_AWAKE) { mKeyguardService.onStartedWakingUp(); } if (mKeyguardState.screenState == SCREEN_STATE_ON || mKeyguardState.screenState == SCREEN_STATE_TURNING_ON) { mKeyguardService.onScreenTurningOn( new KeyguardShowDelegate(mDrawnListenerWhenConnect)); } if (mKeyguardState.screenState == SCREEN_STATE_ON) { mKeyguardService.onScreenTurnedOn(); } mDrawnListenerWhenConnect = null; } if (mKeyguardState.bootCompleted) { Loading Loading @@ -231,6 +248,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onStartedWakingUp()"); mKeyguardService.onStartedWakingUp(); } mKeyguardState.interactiveState = INTERACTIVE_STATE_AWAKE; } public void onScreenTurnedOff() { Loading @@ -238,6 +256,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onScreenTurnedOff()"); mKeyguardService.onScreenTurnedOff(); } mKeyguardState.screenState = SCREEN_STATE_OFF; } public void onScreenTurningOn(final DrawnListener drawnListener) { Loading @@ -252,6 +271,7 @@ public class KeyguardServiceDelegate { mDrawnListenerWhenConnect = drawnListener; showScrim(); } mKeyguardState.screenState = SCREEN_STATE_TURNING_ON; } public void onScreenTurnedOn() { Loading @@ -259,6 +279,7 @@ public class KeyguardServiceDelegate { if (DEBUG) Log.v(TAG, "onScreenTurnedOn()"); mKeyguardService.onScreenTurnedOn(); } mKeyguardState.screenState = SCREEN_STATE_ON; } public void onStartedGoingToSleep(int why) { Loading @@ -266,12 +287,14 @@ public class KeyguardServiceDelegate { mKeyguardService.onStartedGoingToSleep(why); } mKeyguardState.offReason = why; mKeyguardState.interactiveState = INTERACTIVE_STATE_GOING_TO_SLEEP; } public void onFinishedGoingToSleep(int why) { if (mKeyguardService != null) { mKeyguardService.onFinishedGoingToSleep(why); } mKeyguardState.interactiveState = INTERACTIVE_STATE_SLEEP; } public void setKeyguardEnabled(boolean enabled) { Loading