Merge change Iac534225 into eclair
* changes:
Fix issue #2186709: Can't unlock the device for a while
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 @@
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 @@
}
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;