Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8129435f authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Android (Google) Code Review
Browse files

Merge "[ExpandableNotificationRow] use shouldShowPublic in isExpanded" into main

parents 1e2886ce b288b33f
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -2805,12 +2805,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());
    }
+2 −4
Original line number Diff line number Diff line
@@ -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();