summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI/src/com/android/systemui/ExpandHelper.java
diff options
context:
space:
mode:
authorJorim Jaggi <jjaggi@google.com>2014-07-29 20:05:54 +0200
committerJorim Jaggi <jjaggi@google.com>2014-07-29 18:06:55 +0000
commitc503896a4d0cab029bca56cf7ac18ae182729a0a (patch)
treee4f662dcf51e930b32fa793542f2e1a219b9d13c /packages/SystemUI/src/com/android/systemui/ExpandHelper.java
parent9a090e6dedcb1469c9293d868c7ca6409fc7774f (diff)
downloadframeworks_base-c503896a4d0cab029bca56cf7ac18ae182729a0a.zip
frameworks_base-c503896a4d0cab029bca56cf7ac18ae182729a0a.tar.gz
frameworks_base-c503896a4d0cab029bca56cf7ac18ae182729a0a.tar.bz2
Fix crash in ExpandHelper
Bug: 16645584 Change-Id: Ifbcd8c88cda0a390061c162aa43d8615d1311f19
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/ExpandHelper.java')
-rw-r--r--packages/SystemUI/src/com/android/systemui/ExpandHelper.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java
index a26c534..0f8fe1c 100644
--- a/packages/SystemUI/src/com/android/systemui/ExpandHelper.java
+++ b/packages/SystemUI/src/com/android/systemui/ExpandHelper.java
@@ -359,8 +359,8 @@ public class ExpandHelper implements Gefingerpoken {
}
private void maybeRecycleVelocityTracker(MotionEvent event) {
- if (event.getActionMasked() == MotionEvent.ACTION_CANCEL
- || event.getActionMasked() == MotionEvent.ACTION_UP) {
+ if (mVelocityTracker != null && (event.getActionMasked() == MotionEvent.ACTION_CANCEL
+ || event.getActionMasked() == MotionEvent.ACTION_UP)) {
mVelocityTracker.recycle();
mVelocityTracker = null;
}