From 2f6b3fb90f069fdb8502dedf657790bf3d94dbd0 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 20 Apr 2015 13:04:47 -0700 Subject: Fixed a crash with HUN notifications Bug: 20421801 Change-Id: Ifc4445e585d924388f0642379c5268b6bbfb2e99 --- .../src/com/android/systemui/statusbar/policy/HeadsUpManager.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 dccf2e21fa2c..b4e47731f61e 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; -- cgit v1.2.3-59-g8ed1b