diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java index b010199b119ef..d03da8f7c9aad 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/ExpandableNotificationRow.java @@ -2286,6 +2286,11 @@ public class ExpandableNotificationRow extends ActivatableNotificationView @Override public void setHideSensitive(boolean hideSensitive, boolean animated, long delay, long duration) { + if (getVisibility() == GONE) { + // If we are GONE, the hideSensitive parameter will not be calculated and always be + // false, which is incorrect, let's wait until a real call comes in later. + return; + } boolean oldShowingPublic = mShowingPublic; mShowingPublic = mSensitive && hideSensitive; if (mShowingPublicInitialized && mShowingPublic == oldShowingPublic) { 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 4e8fcac664300..a75d40f920112 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/stack/StackStateAnimator.java @@ -364,7 +364,7 @@ public class StackStateAnimator { // This item is added, initialize it's properties. ExpandableViewState viewState = finalState .getViewStateForView(changingView); - if (viewState == null) { + if (viewState == null || viewState.gone) { // The position for this child was never generated, let's continue. continue; }