summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yining Liu <liuyining@google.com> 2024-08-09 23:36:22 +0000
committer Yining Liu <liuyining@google.com> 2024-08-09 23:36:55 +0000
commitfc0b1b0e885c85fa5b8f5cb50094072045abb39d (patch)
tree5ac8566073d251c072de1e01eb8abd42d752e48d
parentaf642578a920a79acc17aca568db0d90aca73cfc (diff)
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
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java17
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java14
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt18
3 files changed, 49 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
index 9d13a17d8e02..cb3e26b9f8ea 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRow.java
@@ -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);
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
index 4c76e3284dbe..c31a2cb8908b 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/ExpandableNotificationRowController.java
@@ -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);
+ }
};
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt
index 4f5a04f2bdc9..b1e90329e01a 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/row/NotificationRowLogger.kt
@@ -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"