Fixed a crash with min-priority notifications in a group

Those notifications could get into a group with higher priority
because they were autobundled or if the app said so.
This could lead to invisible views on the lockscreen and a crash
when this happened in an animated fashion.
The bug was triggering old code that wasn't needed anymore that
removed the viewstate.

Change-Id: Ic86c2f03d55f2e98e352cdbfbb3ca80d8e676765
Fixes: 28611831
This commit is contained in:
Selim Cinek
2016-05-09 16:36:10 -04:00
parent c0b14b0e89
commit 06416b9e57
2 changed files with 2 additions and 8 deletions

View File

@@ -2168,9 +2168,8 @@ public abstract class BaseStatusBar extends SystemUI implements
== View.VISIBLE;
boolean showOnKeyguard = shouldShowOnKeyguard(entry.notification);
if (suppressedSummary || (isLockscreenPublicMode() && !mShowLockscreenNotifications) ||
(onKeyguard && (visibleNotifications >= maxNotifications
&& !childWithVisibleSummary
|| !showOnKeyguard))) {
(onKeyguard && !childWithVisibleSummary
&& (visibleNotifications >= maxNotifications || !showOnKeyguard))) {
entry.row.setVisibility(View.GONE);
if (onKeyguard && showOnKeyguard && !childNotification && !suppressedSummary) {
mKeyguardIconOverflowContainer.getIconsView().addNotification(entry);

View File

@@ -823,11 +823,6 @@ public class StackStateAnimator {
// The position for this child was never generated, let's continue.
continue;
}
if (changingView.getVisibility() == View.GONE) {
// The view was set to gone but the state never removed
finalState.removeViewStateForView(changingView);
continue;
}
finalState.applyState(changingView, viewState);
mNewAddChildren.add(changingView);