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

Commit 90dd0bb3 authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Nishith Khanna
Browse files

[ENR] Only skip hide sensitive anim for showing public

We don't want to play hide sensitive animation when layout is not changed and mShowingPublic is true. Current code is too aggressive and can cause 0 content alpha.

Bug: 414782247
Bug: 392614656
Test: Check hideSensitive animation play and appear animations.
Flag: EXEMPT trivial bugfix
(cherry picked from commit e93d4b01)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:323542be0bb081ba81568c49c73e4e307345d6e6
Merged-In: Ia417a27dcb7d26609df5629bae9bbba1785983a0
Change-Id: Ia417a27dcb7d26609df5629bae9bbba1785983a0
parent 805d5043
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -3123,11 +3123,15 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        }
        boolean oldShowingPublic = mShowingPublic;
        mShowingPublic = mSensitive && hideSensitive;
        if (mShowingPublicInitialized && mShowingPublic == oldShowingPublic) {
        boolean isShowingLayoutNotChanged = mShowingPublic == oldShowingPublic;
        if (mShowingPublicInitialized && isShowingLayoutNotChanged) {
            return;
        }

        if (!animated) {
        final boolean shouldSkipHideSensitiveAnimation =
                mShowingPublic && isShowingLayoutNotChanged;

        if (!animated || shouldSkipHideSensitiveAnimation) {
            if (!NotificationContentAlphaOptimization.isEnabled()
                    || mShowingPublic != oldShowingPublic) {
                // Don't reset the alpha or cancel the animation if the showing layout doesn't