diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt index 55a0f59bf461..861cffb7445e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/policy/AvalancheController.kt @@ -106,13 +106,16 @@ class AvalancheController @Inject constructor() { * Run or ignore Runnable for given HeadsUpEntry. If entry was never shown, ignore and delete * all Runnables associated with that entry. */ - fun delete(entry: HeadsUpEntry, runnable: Runnable, label: String) { + fun delete(entry: HeadsUpEntry?, runnable: Runnable, label: String) { if (!NotificationThrottleHun.isEnabled) { runnable.run() return } val fn = "[$label] => AvalancheController.delete " + getKey(entry) - + if (entry == null) { + log { "$fn => cannot remove NULL entry" } + return + } if (entry in nextMap) { log { "$fn => [remove from next]" } if (entry in nextMap) nextMap.remove(entry) |