diff options
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 |