Fix HUN unbind crash when notif is removed.
There appear to be some edge cases where we expect HUN entries to live longer than the NotificationEntryManager entries so it's possible to trigger an "unbind" operation after the entry is removed and trigger an illegal state exception. This can be solved with a check to see if the notification has been removed. Bug: 153902989 Test: builds Change-Id: I6a034e07d0983681fbbe01a8f25dce2881668a3f
This commit is contained in:
@@ -175,7 +175,7 @@ public class HeadsUpController {
|
||||
private OnHeadsUpChangedListener mOnHeadsUpChangedListener = new OnHeadsUpChangedListener() {
|
||||
@Override
|
||||
public void onHeadsUpStateChanged(@NonNull NotificationEntry entry, boolean isHeadsUp) {
|
||||
if (!isHeadsUp) {
|
||||
if (!isHeadsUp && !entry.getRow().isRemoved()) {
|
||||
mHeadsUpViewBinder.unbindHeadsUpView(entry);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user