summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
index dccf2e2..b4e4773 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/HeadsUpManager.java
@@ -314,7 +314,8 @@ public class HeadsUpManager implements ViewTreeObserver.OnComputeInternalInsetsL
* @return whether the touch is valid and should not be discarded
*/
public boolean shouldSwallowClick(String key) {
- if (mClock.currentTimeMillis() < mHeadsUpEntries.get(key).postTime) {
+ HeadsUpEntry entry = mHeadsUpEntries.get(key);
+ if (entry != null && mClock.currentTimeMillis() < entry.postTime) {
return true;
}
return false;