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

Commit fc0b1b0e authored by Yining Liu's avatar Yining Liu
Browse files

Log reset notification content view alphas

Add logs to track when we reset/skip resetting the content view alphas
to prevent regression.

Bug: 292024656
Bug: 342212697
Test: atest SystemUITests
Flag: com.android.systemui.notification_content_alpha_optimization
Change-Id: I6ffb164aa21fbab995f0d21eff1d3cbc5b9c93bf
parent af642578
Loading
Loading
Loading
Loading
+17 −0
Original line number Diff line number Diff line
@@ -1804,6 +1804,20 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                NotificationEntry childEntry,
                NotificationEntry containerEntry
        );

        /**
         * Called when resetting the alpha value for content views
         */
        void logResetAllContentAlphas(
                NotificationEntry entry
        );

        /**
         * Called when resetting the alpha value for content views is skipped
         */
        void logSkipResetAllContentAlphas(
                NotificationEntry entry
        );
    }

    /**
@@ -3001,6 +3015,8 @@ public class ExpandableNotificationRow extends ActivatableNotificationView
                    mChildrenContainer.animate().cancel();
                }
                resetAllContentAlphas();
            } else {
                mLogger.logSkipResetAllContentAlphas(getEntry());
            }
            mPublicLayout.setVisibility(mShowingPublic ? View.VISIBLE : View.INVISIBLE);
            updateChildrenVisibility();
@@ -3186,6 +3202,7 @@ public class ExpandableNotificationRow extends ActivatableNotificationView

    @Override
    protected void resetAllContentAlphas() {
        mLogger.logResetAllContentAlphas(getEntry());
        mPrivateLayout.setAlpha(1f);
        mPrivateLayout.setLayerType(LAYER_TYPE_NONE, null);
        mPublicLayout.setAlpha(1f);
+14 −0
Original line number Diff line number Diff line
@@ -195,6 +195,20 @@ public class ExpandableNotificationRowController implements NotifViewController
                ) {
                    mLogBufferLogger.logRemoveTransientRow(childEntry, containerEntry);
                }

                @Override
                public void logResetAllContentAlphas(
                        NotificationEntry entry
                ) {
                    mLogBufferLogger.logResetAllContentAlphas(entry);
                }

                @Override
                public void logSkipResetAllContentAlphas(
                        NotificationEntry entry
                ) {
                    mLogBufferLogger.logSkipResetAllContentAlphas(entry);
                }
            };


+18 −0
Original line number Diff line number Diff line
@@ -128,6 +128,24 @@ constructor(
            { "removeTransientRow from row: childKey: $str1 -- containerKey: $str2" }
        )
    }

    fun logResetAllContentAlphas(entry: NotificationEntry) {
        notificationRenderBuffer.log(
            TAG,
            LogLevel.INFO,
            { str1 = entry.logKey },
            { "resetAllContentAlphas: $str1" }
        )
    }

    fun logSkipResetAllContentAlphas(entry: NotificationEntry) {
        notificationRenderBuffer.log(
            TAG,
            LogLevel.INFO,
            { str1 = entry.logKey },
            { "Skip resetAllContentAlphas: $str1" }
        )
    }
}

private const val TAG = "NotifRow"