am 06f009cb: am aab87690: END_BUTTON_BEHAVIOR setting should affect end call button only (not power button)
Merge commit '06f009cb3bac2e4432e90f2d22f4c28d6b86f8cd' * commit '06f009cb3bac2e4432e90f2d22f4c28d6b86f8cd': END_BUTTON_BEHAVIOR setting should affect end call button only (not power button)
This commit is contained in:
@@ -1718,8 +1718,14 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
mHandler.removeCallbacks(mPowerLongPress);
|
||||
if (mShouldTurnOffOnKeyUp) {
|
||||
mShouldTurnOffOnKeyUp = false;
|
||||
boolean gohome = (mEndcallBehavior & ENDCALL_HOME) != 0;
|
||||
boolean sleeps = (mEndcallBehavior & ENDCALL_SLEEPS) != 0;
|
||||
boolean gohome, sleeps;
|
||||
if (code == KeyEvent.KEYCODE_ENDCALL) {
|
||||
gohome = (mEndcallBehavior & ENDCALL_HOME) != 0;
|
||||
sleeps = (mEndcallBehavior & ENDCALL_SLEEPS) != 0;
|
||||
} else {
|
||||
gohome = false;
|
||||
sleeps = true;
|
||||
}
|
||||
if (keyguardShowing
|
||||
|| (sleeps && !gohome)
|
||||
|| (gohome && !goHome() && sleeps)) {
|
||||
|
||||
Reference in New Issue
Block a user