From 66d6ae823c5aa74744f35ccfc4d11313de6639d4 Mon Sep 17 00:00:00 2001 From: Dave Mankoff Date: Mon, 24 Aug 2020 21:36:35 -0400 Subject: [PATCH] Fix duplicate reg. KeyguardSliceViewController in DumpManager. If we have multiple displays, we get multiple KeyguardSliceViewControllers. The DumpManager doesn't like that, so give them each unique tags. Fixes: 166181642 Test: manual Change-Id: I827970ee9aa0d1867c26e65ea8661fd5cae95fb1 --- .../com/android/keyguard/KeyguardSliceViewController.java | 7 ++++++- .../statusbar/phone/NotificationPanelViewController.java | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java index 35a2392ba1cf8..2470b958a85f7 100644 --- a/packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java +++ b/packages/SystemUI/src/com/android/keyguard/KeyguardSliceViewController.java @@ -86,7 +86,10 @@ public class KeyguardSliceViewController implements Dumpable { mLiveData.observeForever(mObserver); } mConfigurationController.addCallback(mConfigurationListener); - mDumpManager.registerDumpable(TAG, KeyguardSliceViewController.this); + mDumpManager.registerDumpable( + TAG + "@" + Integer.toHexString( + KeyguardSliceViewController.this.hashCode()), + KeyguardSliceViewController.this); } @Override @@ -230,5 +233,7 @@ public class KeyguardSliceViewController implements Dumpable { public void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args) { pw.println(" mSlice: " + mSlice); pw.println(" mClickActions: " + mClickActions); + + mKeyguardStatusView.dump(fd, pw, args); } } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java index e0576b7d59045..8750a02ed5b3e 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelViewController.java @@ -3072,9 +3072,6 @@ public class NotificationPanelViewController extends PanelViewController { if (mKeyguardStatusBar != null) { mKeyguardStatusBar.dump(fd, pw, args); } - if (mKeyguardStatusView != null) { - mKeyguardStatusView.dump(fd, pw, args); - } } public boolean hasActiveClearableNotifications() {