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

Commit 3586871b authored by Yining Liu's avatar Yining Liu
Browse files

Fix transparent content view when opening the shade during bubble fly out

Fix transparent content view issue when opening the shade during bubble
fly out animation. Old codepath uses setHideSensitive to reset the alpha
, which is not preferred because we didn’t change the hideSensitive, but
rely on calling it to reset the alpha.

Fix: 366027702
Flag: com.android.systemui.notification_content_alpha_optimization
Test: SystemUITest
Change-Id: I8b1215b09c44f79b2bd367a41c939e0d65ae17db
parent 3be70132
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3218,7 +3218,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
    }

    @Override
    protected void resetAllContentAlphas() {
    public void resetAllContentAlphas() {
        mLogger.logResetAllContentAlphas(getEntry());
        mPrivateLayout.setAlpha(1f);
        mPrivateLayout.setLayerType(LAYER_TYPE_NONE, null);
+14 −0
Original line number Diff line number Diff line
@@ -113,6 +113,7 @@ import com.android.systemui.statusbar.notification.row.ActivatableNotificationVi
import com.android.systemui.statusbar.notification.row.ExpandableNotificationRow;
import com.android.systemui.statusbar.notification.row.ExpandableView;
import com.android.systemui.statusbar.notification.row.StackScrollerDecorView;
import com.android.systemui.statusbar.notification.shared.NotificationContentAlphaOptimization;
import com.android.systemui.statusbar.notification.shared.NotificationHeadsUpCycling;
import com.android.systemui.statusbar.notification.shared.NotificationThrottleHun;
import com.android.systemui.statusbar.notification.shared.NotificationsImprovedHunAnimation;
@@ -4363,6 +4364,16 @@ public class NotificationStackScrollLayout
        }
    }

    private void resetChildAlpha() {
        for (int i = 0; i < getChildCount(); i++) {
            ExpandableView child = getChildAtIndex(i);
            if (child instanceof ExpandableNotificationRow row) {
                if (row.isExpandAnimationRunning()) continue;
                row.resetAllContentAlphas();
            }
        }
    }

    private void logTransientNotificationRowTraversalCleaned(
            ExpandableNotificationRow transientView,
            String reason
@@ -4406,6 +4417,9 @@ public class NotificationStackScrollLayout
                if (SceneContainerFlag.isEnabled()) {
                    setHeadsUpAnimatingAway(false);
                }
                if (NotificationContentAlphaOptimization.isEnabled()) {
                    resetChildAlpha();
                }
            } else {
                mGroupExpansionManager.collapseGroups();
                mExpandHelper.cancelImmediately();