Fixed a crash when a notification is updated

Under certain conditions, the minheight could be
queried while reset or when an inflation error happened
for an existing notification.
Since all notifications have collapsed layout anyway
that will always be set after reset, we don't have
to null those out.

Test: click clear all, have first notification update during the animation.
Bug: 32333389
Fixes: 33961825
Change-Id: I14a75cd628726c8acd892a81b95de40f92275bb1
This commit is contained in:
Selim Cinek
2017-01-09 16:12:12 +01:00
parent fb6ee6d60c
commit c7652791f7

View File

@@ -293,10 +293,6 @@ public class NotificationContentView extends FrameLayout {
}
public void reset() {
if (mContractedChild != null) {
mContractedChild.animate().cancel();
removeView(mContractedChild);
}
mPreviousExpandedRemoteInputIntent = null;
if (mExpandedRemoteInput != null) {
mExpandedRemoteInput.onNotificationUpdateOrReset();
@@ -327,7 +323,6 @@ public class NotificationContentView extends FrameLayout {
removeView(mHeadsUpChild);
mHeadsUpRemoteInput = null;
}
mContractedChild = null;
mExpandedChild = null;
mHeadsUpChild = null;
}