diff options
author | Dianne Hackborn <hackbod@google.com> | 2009-10-13 19:50:51 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2009-10-13 19:50:51 -0700 |
commit | 53cd579459132b01442118c0cafc545f4ff54f01 (patch) | |
tree | 88e49ed78a849d409a3ec4b4c6394dfa5080c8d6 | |
parent | 64d54042ff5c2c736a65f200296dbc3bceaa9029 (diff) | |
download | frameworks_base-53cd579459132b01442118c0cafc545f4ff54f01.zip frameworks_base-53cd579459132b01442118c0cafc545f4ff54f01.tar.gz frameworks_base-53cd579459132b01442118c0cafc545f4ff54f01.tar.bz2 |
Fix issue #2186709: Can't unlock the device for a while
Change-Id: Iac5342254036cc286ad502dba943520f55ea2405
-rw-r--r-- | services/java/com/android/server/InputDevice.java | 2 |
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; |