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

Commit f0fbe390 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:5b2f020dbcf952529ce8386d8a297d205544ee8d
Merged-In: Ia417a27dcb7d26609df5629bae9bbba1785983a0
Change-Id: Ia417a27dcb7d26609df5629bae9bbba1785983a0
parent 6d239bf8
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -2914,12 +2914,16 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
        }
        boolean oldShowingPublic = mShowingPublic;
        mShowingPublic = mSensitive && hideSensitive;
        if (mShowingPublicInitialized && mShowingPublic == oldShowingPublic) {
        boolean isShowingLayoutNotChanged = mShowingPublic == oldShowingPublic;
        if (mShowingPublicInitialized && isShowingLayoutNotChanged) {
            return;
        }
        float oldAlpha = getContentView().getAlpha();

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

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