Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +8 −5 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { int mLidKeyboardAccessibility; int mLidNavigationAccessibility; boolean mScreenOn = false; int mScreenOffReason; boolean mOrientationSensorEnabled = false; int mCurrentAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; static final int DEFAULT_ACCELEROMETER_ROTATION = 0; Loading Loading @@ -2066,16 +2067,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { || ((keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) && mVolumeWakeScreen); // Don't wake the screen if we have not set the option "wake with volume" in CMParts // OR if "wake with volume" is set but screen is off due to proximity sensor // regardless if WAKE Flag is set in keylayout if (!isScreenOn && isWakeKey && !mVolumeWakeScreen final boolean isOffByProx = (mScreenOffReason == WindowManagerPolicy.OFF_BECAUSE_OF_PROX_SENSOR); if (isWakeKey && (!mVolumeWakeScreen || isOffByProx) && ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN))) { isWakeKey = false; } // make sure keyevent get's handled as power key on volume-wake if(!isScreenOn && mVolumeWakeScreen && isWakeKey && ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) if(mVolumeWakeScreen && isWakeKey && ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN))) keyCode = KeyEvent.KEYCODE_POWER; Loading Loading @@ -2324,6 +2326,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mKeyguardMediator.onScreenTurnedOff(why); synchronized (mLock) { mScreenOn = false; mScreenOffReason = why; updateOrientationListenerLp(); updateLockScreenTimeout(); } Loading Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +8 −5 Original line number Diff line number Diff line Loading @@ -234,6 +234,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { int mLidKeyboardAccessibility; int mLidNavigationAccessibility; boolean mScreenOn = false; int mScreenOffReason; boolean mOrientationSensorEnabled = false; int mCurrentAppOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED; static final int DEFAULT_ACCELEROMETER_ROTATION = 0; Loading Loading @@ -2066,16 +2067,17 @@ public class PhoneWindowManager implements WindowManagerPolicy { || ((keyCode == KeyEvent.KEYCODE_VOLUME_DOWN) && mVolumeWakeScreen); // Don't wake the screen if we have not set the option "wake with volume" in CMParts // OR if "wake with volume" is set but screen is off due to proximity sensor // regardless if WAKE Flag is set in keylayout if (!isScreenOn && isWakeKey && !mVolumeWakeScreen final boolean isOffByProx = (mScreenOffReason == WindowManagerPolicy.OFF_BECAUSE_OF_PROX_SENSOR); if (isWakeKey && (!mVolumeWakeScreen || isOffByProx) && ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN))) { isWakeKey = false; } // make sure keyevent get's handled as power key on volume-wake if(!isScreenOn && mVolumeWakeScreen && isWakeKey && ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) if(mVolumeWakeScreen && isWakeKey && ((keyCode == KeyEvent.KEYCODE_VOLUME_UP) || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN))) keyCode = KeyEvent.KEYCODE_POWER; Loading Loading @@ -2324,6 +2326,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { mKeyguardMediator.onScreenTurnedOff(why); synchronized (mLock) { mScreenOn = false; mScreenOffReason = why; updateOrientationListenerLp(); updateLockScreenTimeout(); } Loading