Fixed a crash with HUN notifications

Bug: 20421801
Change-Id: Ifc4445e585d924388f0642379c5268b6bbfb2e99
This commit is contained in:
Selim Cinek
2015-04-20 13:04:47 -07:00
parent 29fa89b41e
commit 2f6b3fb90f

View File

@@ -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;