diff options
2 files changed, 40 insertions, 5 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 d1413a275ff2..7751c4481532 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 @@ -3033,7 +3033,9 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable if (!animationsEnabled) { mSwipedOutViews.clear(); mChildrenToRemoveAnimated.clear(); - clearTemporaryViewsInGroup(this); + clearTemporaryViewsInGroup( + /* viewGroup = */ this, + /* reason = */ "setAnimationsEnabled"); } } @@ -4008,26 +4010,48 @@ public class NotificationStackScrollLayout extends ViewGroup implements Dumpable private void clearTemporaryViews() { // lets make sure nothing is transient anymore - clearTemporaryViewsInGroup(this); + clearTemporaryViewsInGroup( + /* viewGroup = */ this, + /* reason = */ "clearTemporaryViews" + ); for (int i = 0; i < getChildCount(); i++) { ExpandableView child = getChildAtIndex(i); if (child instanceof ExpandableNotificationRow) { ExpandableNotificationRow row = (ExpandableNotificationRow) child; - clearTemporaryViewsInGroup(row.getChildrenContainer()); + clearTemporaryViewsInGroup( + /* viewGroup = */ row.getChildrenContainer(), + /* reason = */ "clearTemporaryViewsInGroup(row.getChildrenContainer())" + ); } } } - private void clearTemporaryViewsInGroup(ViewGroup viewGroup) { + private void clearTemporaryViewsInGroup(ViewGroup viewGroup, String reason) { while (viewGroup != null && viewGroup.getTransientViewCount() != 0) { final View transientView = viewGroup.getTransientView(0); viewGroup.removeTransientView(transientView); if (transientView instanceof ExpandableView) { ((ExpandableView) transientView).setTransientContainer(null); + if (transientView instanceof ExpandableNotificationRow) { + logTransientNotificationRowTraversalCleaned( + (ExpandableNotificationRow) transientView, + reason + ); + } } } } + private void logTransientNotificationRowTraversalCleaned( + ExpandableNotificationRow transientView, + String reason + ) { + if (mLogger == null) { + return; + } + mLogger.transientNotificationRowTraversalCleaned(transientView.getEntry(), reason); + } + void onPanelTrackingStarted() { mPanelTracking = true; mAmbientState.setPanelTracking(true); 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 5b0ec1d14edc..40b4c2904a6b 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 @@ -4,6 +4,7 @@ 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.dagger.NotificationRenderLog import com.android.systemui.statusbar.notification.collection.NotificationEntry import com.android.systemui.statusbar.notification.logKey import com.android.systemui.statusbar.notification.stack.NotificationStackScrollLayout.AnimationEvent.ANIMATION_TYPE_ADD @@ -15,7 +16,8 @@ import com.google.errorprone.annotations.CompileTimeConstant import javax.inject.Inject class NotificationStackScrollLogger @Inject constructor( - @NotificationHeadsUpLog private val buffer: LogBuffer + @NotificationHeadsUpLog private val buffer: LogBuffer, + @NotificationRenderLog private val notificationRenderBuffer: LogBuffer ) { fun hunAnimationSkipped(entry: NotificationEntry, reason: String) { buffer.log(TAG, INFO, { @@ -77,6 +79,15 @@ class NotificationStackScrollLogger @Inject constructor( "isTouchBelowNotification: $bool2 motionEvent: $str1" }) } + + fun transientNotificationRowTraversalCleaned(entry: NotificationEntry, reason: String) { + notificationRenderBuffer.log(TAG, INFO, { + str1 = entry.logKey + str2 = reason + }, { + "transientNotificationRowTraversalCleaned: key: $str1 reason: $str2" + }) + } } private const val TAG = "NotificationStackScroll"
\ No newline at end of file |