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

Commit 9eca1d2f authored by Ibrahim Yilmaz's avatar Ibrahim Yilmaz Committed by Nolen Johnson
Browse files

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:5b2f020dbcf952529ce8386d8a297d205544ee8d
Merged-In: Ia417a27dcb7d26609df5629bae9bbba1785983a0
Change-Id: Ia417a27dcb7d26609df5629bae9bbba1785983a0
parent f3b3ddb8
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2517,14 +2517,18 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        }
        boolean oldShowingPublic = mShowingPublic;
        mShowingPublic = mSensitive && hideSensitive;
        if (mShowingPublicInitialized && mShowingPublic == oldShowingPublic) {
        boolean isShowingLayoutNotChanged = mShowingPublic == oldShowingPublic;
        if (mShowingPublicInitialized && isShowingLayoutNotChanged) {
            return;
        }

        // bail out if no public version
        if (mPublicLayout.getChildCount() == 0) return;

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

        if (!animated || shouldSkipHideSensitiveAnimation) {
            mPublicLayout.animate().cancel();
            mPrivateLayout.animate().cancel();
            if (mChildrenContainer != null) {