diff options
2 files changed, 3 insertions, 10 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java index eb6c7b520037..c3742139ae5a 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java @@ -2804,12 +2804,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView } public boolean isExpanded(boolean allowOnKeyguard) { - if (DEBUG) { - if (!mShowingPublicInitialized && !allowOnKeyguard) { - Log.d(TAG, "mShowingPublic is not initialized."); - } - } - return !mShowingPublic && (!mOnKeyguard || allowOnKeyguard) + return (!shouldShowPublic()) && (!mOnKeyguard || allowOnKeyguard) && (!hasUserChangedExpansion() && (isSystemExpanded() || isSystemChildExpanded()) || isUserExpanded()); } diff --git a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java index 06a4d0820386..0060bba13ca2 100644 --- a/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java +++ b/packages/SystemUI/tests/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowTest.java @@ -772,8 +772,7 @@ public class ExpandableNotificationRowTest extends SysuiTestCase { row.setUserExpanded(true); row.setOnKeyguard(false); row.setSensitive(/* sensitive= */true, /* hideSensitive= */false); - row.setHideSensitive(/* hideSensitive= */true, /* animated= */false, - /* delay= */0L, /* duration= */0L); + row.setHideSensitiveForIntrinsicHeight(/* hideSensitive= */true); // THEN assertThat(row.isExpanded()).isFalse(); @@ -787,8 +786,7 @@ public class ExpandableNotificationRowTest extends SysuiTestCase { row.setUserExpanded(true); row.setOnKeyguard(false); row.setSensitive(/* sensitive= */true, /* hideSensitive= */false); - row.setHideSensitive(/* hideSensitive= */false, /* animated= */false, - /* delay= */0L, /* duration= */0L); + row.setHideSensitiveForIntrinsicHeight(/* hideSensitive= */false); // THEN assertThat(row.isExpanded()).isTrue(); |