am aab87690: END_BUTTON_BEHAVIOR setting should affect end call button only (not power button)

Merge commit 'aab8769005ed52a3e82aedf8d87c902d762bdb24' into eclair-mr2-plus-aosp

* commit 'aab8769005ed52a3e82aedf8d87c902d762bdb24':
  END_BUTTON_BEHAVIOR setting should affect end call button only (not power button)
This commit is contained in:
Mike Lockwood
2009-11-23 12:59:06 -08:00
committed by Android Git Automerger

View File

@@ -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)) {