Skip to content

Commit

Permalink
Merge "Lockscreen : Fix vol wake for lockscreen security type none" i…
Browse files Browse the repository at this point in the history
…nto ics
  • Loading branch information
hyperb1iss authored and Gerrit Code Review committed Mar 18, 2012
2 parents 9d5b96c + 5b87189 commit b2afe03
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -2856,16 +2856,15 @@ public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags, boolean i
result = 0;

final boolean isWakeKey = (policyFlags
& (WindowManagerPolicy.FLAG_WAKE | WindowManagerPolicy.FLAG_WAKE_DROPPED)) != 0
|| (((keyCode == KeyEvent.KEYCODE_VOLUME_UP) || (keyCode == KeyEvent.KEYCODE_VOLUME_DOWN))
&& mVolumeWakeScreen && !isScreenOn);
& (WindowManagerPolicy.FLAG_WAKE | WindowManagerPolicy.FLAG_WAKE_DROPPED)) != 0;


if (down && isWakeKey) {
if (keyguardActive) {
// If the keyguard is showing, let it decide what to do with the wake key.
mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(keyCode,
mDockMode != Intent.EXTRA_DOCK_STATE_UNDOCKED);
} else {
} else if ((keyCode != KeyEvent.KEYCODE_VOLUME_UP) && (keyCode != KeyEvent.KEYCODE_VOLUME_DOWN)) {
// Otherwise, wake the device ourselves.
result |= ACTION_POKE_USER_ACTIVITY;
}
Expand Down Expand Up @@ -2992,6 +2991,9 @@ public int interceptKeyBeforeQueueing(KeyEvent event, int policyFlags, boolean i
keyCode = KeyEvent.KEYCODE_POWER;
mKeyguardMediator.onWakeKeyWhenKeyguardShowingTq(keyCode,
mDockMode != Intent.EXTRA_DOCK_STATE_UNDOCKED);
} else {
result |= ACTION_POKE_USER_ACTIVITY;
break;
}
}

Expand Down

0 comments on commit b2afe03

Please sign in to comment.