summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorMike Lockwood <lockwood@android.com>2009-10-22 10:49:11 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-10-22 10:49:11 -0700
commitf8a57dcb5983ad465bff697bbccb0eca031e7072 (patch)
tree99b900ca1ab63f732c7bd9cdba1c785edc183627 /services
parent9f9f56212610ddd69c8af8ddeeed39265c0e58e1 (diff)
parenteadb97b4826bb6a2fa34db9c65b5a0d6f7baade9 (diff)
downloadframeworks_base-f8a57dcb5983ad465bff697bbccb0eca031e7072.zip
frameworks_base-f8a57dcb5983ad465bff697bbccb0eca031e7072.tar.gz
frameworks_base-f8a57dcb5983ad465bff697bbccb0eca031e7072.tar.bz2
am eadb97b4: Merge change I53f83502 into eclair
Merge commit 'eadb97b4826bb6a2fa34db9c65b5a0d6f7baade9' into eclair-mr2 * commit 'eadb97b4826bb6a2fa34db9c65b5a0d6f7baade9': PowerManagerService: Ignore user activity while the screen is animating off.
Diffstat (limited to 'services')
-rw-r--r--services/java/com/android/server/PowerManagerService.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/services/java/com/android/server/PowerManagerService.java b/services/java/com/android/server/PowerManagerService.java
index 9b54a70..29a5ba8 100644
--- a/services/java/com/android/server/PowerManagerService.java
+++ b/services/java/com/android/server/PowerManagerService.java
@@ -156,6 +156,7 @@ class PowerManagerService extends IPowerManager.Stub
private int mProximityCount = 0;
private int mPowerState;
private boolean mOffBecauseOfUser;
+ private boolean mAnimatingScreenOff;
private int mUserState;
private boolean mKeyboardVisible = false;
private boolean mUserActivityAllowed = true;
@@ -1225,6 +1226,7 @@ class PowerManagerService extends IPowerManager.Stub
Log.d(TAG,
"preventScreenOn: turning on after a prior preventScreenOn(true)!");
}
+ mAnimatingScreenOff = false;
int err = setScreenStateLocked(true);
if (err != 0) {
Log.w(TAG, "preventScreenOn: error from setScreenStateLocked(): " + err);
@@ -1386,6 +1388,7 @@ class PowerManagerService extends IPowerManager.Stub
reallyTurnScreenOn = false;
}
if (reallyTurnScreenOn) {
+ mAnimatingScreenOff = false;
err = setScreenStateLocked(true);
long identity = Binder.clearCallingIdentity();
try {
@@ -1427,6 +1430,7 @@ class PowerManagerService extends IPowerManager.Stub
if (!mScreenBrightness.animating) {
err = screenOffFinishedAnimatingLocked(becauseOfUser);
} else {
+ mAnimatingScreenOff = true;
mOffBecauseOfUser = becauseOfUser;
err = 0;
mLastTouchDown = 0;
@@ -1444,6 +1448,7 @@ class PowerManagerService extends IPowerManager.Stub
mTotalTouchDownTime, mTouchCycles);
mLastTouchDown = 0;
int err = setScreenStateLocked(false);
+ mAnimatingScreenOff = false;
if (mScreenOnStartTime != 0) {
mScreenOnTime += SystemClock.elapsedRealtime() - mScreenOnStartTime;
mScreenOnStartTime = 0;
@@ -1816,7 +1821,9 @@ class PowerManagerService extends IPowerManager.Stub
return;
}
-
+ if (mAnimatingScreenOff) {
+ return;
+ }
if (false) {
if (((mPokey & POKE_LOCK_IGNORE_CHEEK_EVENTS) != 0)) {
Log.d(TAG, "userActivity !!!");//, new RuntimeException());