summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-10-13 23:13:37 -0400
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-10-13 23:13:37 -0400
commitb10e2f1a861933f50d9ad8ea24b5dfa5643a2c11 (patch)
treef85a961184e6c95d88d1cf90aa34dc8ad06633e9
parent6e144ad885f6cc3f090616a7ad4911d093049ad1 (diff)
parent53cd579459132b01442118c0cafc545f4ff54f01 (diff)
downloadframeworks_base-b10e2f1a861933f50d9ad8ea24b5dfa5643a2c11.zip
frameworks_base-b10e2f1a861933f50d9ad8ea24b5dfa5643a2c11.tar.gz
frameworks_base-b10e2f1a861933f50d9ad8ea24b5dfa5643a2c11.tar.bz2
Merge change Iac534225 into eclair
* changes: Fix issue #2186709: Can't unlock the device for a while
-rw-r--r--services/java/com/android/server/InputDevice.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/services/java/com/android/server/InputDevice.java b/services/java/com/android/server/InputDevice.java
index 2dc45b5..eaad3b7 100644
--- a/services/java/com/android/server/InputDevice.java
+++ b/services/java/com/android/server/InputDevice.java
@@ -268,6 +268,7 @@ public class InputDevice {
while (start != end) {
int soff = poff + (start*MotionEvent.NUM_SAMPLE_DATA);
int pressure = mHistoryData[soff + MotionEvent.SAMPLE_PRESSURE];
+ if (pressure <= 0) pressure = 1;
x += mHistoryData[soff + MotionEvent.SAMPLE_X] * pressure;
y += mHistoryData[soff + MotionEvent.SAMPLE_Y] * pressure;
totalPressure += pressure;
@@ -276,6 +277,7 @@ public class InputDevice {
}
int eoff = poff + (end*MotionEvent.NUM_SAMPLE_DATA);
int pressure = mHistoryData[eoff + MotionEvent.SAMPLE_PRESSURE];
+ if (pressure <= 0) pressure = 1;
x += mHistoryData[eoff + MotionEvent.SAMPLE_X] * pressure;
y += mHistoryData[eoff + MotionEvent.SAMPLE_Y] * pressure;
totalPressure += pressure;