diff options
3 files changed, 98 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 7cbedf4c1713..30747db0fb64 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 @@ -1657,6 +1657,25 @@ public class ExpandableNotificationRow extends ActivatableNotificationView NotificationEntry childEntry, ViewGroup containerView ); + + /** + * Called when an ExpandableNotificationRow transient view is added to this + * ExpandableNotificationRow + */ + void logAddTransientRow( + NotificationEntry childEntry, + NotificationEntry containerEntry, + int index + ); + + /** + * Called when an ExpandableNotificationRow transient view is removed from this + * ExpandableNotificationRow + */ + void logRemoveTransientRow( + NotificationEntry childEntry, + NotificationEntry containerEntry + ); } /** @@ -3786,4 +3805,34 @@ public class ExpandableNotificationRow extends ActivatableNotificationView ); } } + + @Override + public void addTransientView(View view, int index) { + if (view instanceof ExpandableNotificationRow) { + logAddTransientRow((ExpandableNotificationRow) view, index); + } + super.addTransientView(view, index); + } + + private void logAddTransientRow(ExpandableNotificationRow row, int index) { + if (mLogger == null) { + return; + } + mLogger.logAddTransientRow(row.getEntry(), getEntry(), index); + } + + @Override + public void removeTransientView(View view) { + if (view instanceof ExpandableNotificationRow) { + logRemoveTransientRow((ExpandableNotificationRow) view); + } + super.removeTransientView(view); + } + + private void logRemoveTransientRow(ExpandableNotificationRow row) { + if (mLogger == null) { + return; + } + mLogger.logRemoveTransientRow(row.getEntry(), getEntry()); + } } 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 7e6e551ed816..a4e8c2ece894 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 @@ -150,6 +150,23 @@ public class ExpandableNotificationRowController implements NotifViewController ) { mLogBufferLogger.logRemoveTransientFromViewGroup(childEntry, containerView); } + + @Override + public void logAddTransientRow( + NotificationEntry childEntry, + NotificationEntry containerEntry, + int index + ) { + mLogBufferLogger.logAddTransientRow(childEntry, containerEntry, index); + } + + @Override + public void logRemoveTransientRow( + NotificationEntry childEntry, + NotificationEntry containerEntry + ) { + mLogBufferLogger.logRemoveTransientRow(childEntry, containerEntry); + } }; 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 efafb66f6ea2..89338f9eeed3 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 @@ -96,6 +96,38 @@ constructor( { "RemoveTransientRow from other ViewGroup: childKey: $str1 -- ViewGroup: $str2" } ) } + + fun logAddTransientRow( + childEntry: NotificationEntry, + containerEntry: NotificationEntry, + index: Int + ) { + notificationRenderBuffer.log( + TAG, + LogLevel.ERROR, + { + str1 = childEntry.logKey + str2 = containerEntry.logKey + int1 = index + }, + { "addTransientRow to row: childKey: $str1 -- containerKey: $str2 -- index: $int1" } + ) + } + + fun logRemoveTransientRow( + childEntry: NotificationEntry, + containerEntry: NotificationEntry, + ) { + notificationRenderBuffer.log( + TAG, + LogLevel.ERROR, + { + str1 = childEntry.logKey + str2 = containerEntry.logKey + }, + { "removeTransientRow from row: childKey: $str1 -- containerKey: $str2" } + ) + } } private const val TAG = "NotifRow" |