From 06416b9e576369a1349ee7b60af62fae489fc098 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 9 May 2016 16:36:10 -0400 Subject: [PATCH] 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 --- .../src/com/android/systemui/statusbar/BaseStatusBar.java | 5 ++--- .../android/systemui/statusbar/stack/StackStateAnimator.java | 5 ----- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java index 05c9fd43c83c2..8d7ef2725bcf4 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/BaseStatusBar.java @@ -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); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java index f49067dbcaf6e..e8472ac5c8d50 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java @@ -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);