summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Yining Liu <liuyining@google.com> 2023-06-12 22:05:53 +0000
committer Yining Liu <liuyining@google.com> 2023-06-21 17:55:31 +0000
commitdaed95816adaa5164b3ff49cd61df55f6ee20a80 (patch)
tree80ed5312708393ca9afac940bfceed85d6c63361
parentb3db1c7b5fa662c3f7be3038a51f716c9477901c (diff)
Add logs for group child notification row transient views adding
Add logs when group child notifications' row transient views are added to NotificationChildrenContainer, and when other ExpandableNotificationRows' transient views are added to the NSSL. Bug: 281628358 Test: `adb shell settings put global systemui/buffer/NotifRenderLog VERBOSE` and look for NotificationStackScroll tag in logcat Change-Id: Iec4225cb44546ad2ab0e50a33dd67f3d8103f470
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java25
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLogger.kt38
2 files changed, 63 insertions, 0 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
index 7751c4481532..2751d86f9213 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLayout.java
@@ -2759,6 +2759,7 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
boolean animationGenerated = container != null && generateRemoveAnimation(child);
if (animationGenerated) {
if (!mSwipedOutViews.contains(child) || !isFullySwipedOut(child)) {
+ logAddTransientChild(child, container);
container.addTransientView(child, 0);
child.setTransientContainer(container);
}
@@ -2774,6 +2775,30 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable
focusNextViewIfFocused(child);
}
+ private void logAddTransientChild(ExpandableView child, ViewGroup container) {
+ if (mLogger == null) {
+ return;
+ }
+ if (child instanceof ExpandableNotificationRow) {
+ if (container instanceof NotificationChildrenContainer) {
+ mLogger.addTransientChildNotificationToChildContainer(
+ ((ExpandableNotificationRow) child).getEntry(),
+ ((NotificationChildrenContainer) container)
+ .getContainingNotification().getEntry()
+ );
+ } else if (container instanceof NotificationStackScrollLayout) {
+ mLogger.addTransientChildNotificationToNssl(
+ ((ExpandableNotificationRow) child).getEntry()
+ );
+ } else {
+ mLogger.addTransientChildNotificationToViewGroup(
+ ((ExpandableNotificationRow) child).getEntry(),
+ container
+ );
+ }
+ }
+ }
+
/**
* Has this view been fully swiped out such that it's not visible anymore.
*/
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLogger.kt
index 40b4c2904a6b..cf1f16e6b2a8 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLogger.kt
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/notification/stack/NotificationStackScrollLogger.kt
@@ -1,9 +1,11 @@
package com.android.systemui.statusbar.notification.stack
+import android.view.ViewGroup
import com.android.systemui.log.dagger.NotificationHeadsUpLog
import com.android.systemui.log.LogBuffer
import com.android.systemui.log.LogLevel.DEBUG
import com.android.systemui.log.LogLevel.INFO
+import com.android.systemui.log.LogLevel.ERROR
import com.android.systemui.log.dagger.NotificationRenderLog
import com.android.systemui.statusbar.notification.collection.NotificationEntry
import com.android.systemui.statusbar.notification.logKey
@@ -88,6 +90,42 @@ class NotificationStackScrollLogger @Inject constructor(
"transientNotificationRowTraversalCleaned: key: $str1 reason: $str2"
})
}
+
+ fun addTransientChildNotificationToChildContainer(
+ childEntry: NotificationEntry,
+ containerEntry: NotificationEntry,
+ ) {
+ notificationRenderBuffer.log(TAG, INFO, {
+ str1 = childEntry.logKey
+ str2 = containerEntry.logKey
+ }, {
+ "addTransientChildToContainer from onViewRemovedInternal: childKey: $str1 " +
+ "-- containerKey: $str2"
+ })
+ }
+
+ fun addTransientChildNotificationToNssl(
+ childEntry: NotificationEntry,
+ ) {
+ notificationRenderBuffer.log(TAG, INFO, {
+ str1 = childEntry.logKey
+ }, {
+ "addTransientRowToNssl from onViewRemovedInternal: childKey: $str1"
+ })
+ }
+
+ fun addTransientChildNotificationToViewGroup(
+ childEntry: NotificationEntry,
+ container: ViewGroup
+ ) {
+ notificationRenderBuffer.log(TAG, ERROR, {
+ str1 = childEntry.logKey
+ str2 = container.toString()
+ }, {
+ "addTransientRowTo unhandled ViewGroup from onViewRemovedInternal: childKey: $str1 " +
+ "-- ViewGroup: $str2"
+ })
+ }
}
private const val TAG = "NotificationStackScroll" \ No newline at end of file