Only register the primary KeyguardClockSwitchController w/ DumpManager

This prevents the KCSC associated with the secondary display from
dumping, but also prevents it from leaking after the secondary
display has been removed.

Bug: 295143740
Test: Manually checked with secondary display
Change-Id: Iebe14fad8e0a883c5f4fec7fb50bb6ce0107f8fc
Merged-In: Iebe14fad8e0a883c5f4fec7fb50bb6ce0107f8fc
This commit is contained in:
Hawkwood Glazier
2023-08-15 17:13:51 +00:00
parent 89de5a4947
commit 097518c6c2

View File

@@ -211,8 +211,10 @@ public class KeyguardClockSwitchController extends ViewController<KeyguardClockS
mSmallClockFrame = mView.findViewById(R.id.lockscreen_clock_view);
mLargeClockFrame = mView.findViewById(R.id.lockscreen_clock_view_large);
mDumpManager.unregisterDumpable(getClass().toString()); // unregister previous clocks
mDumpManager.registerDumpable(getClass().toString(), this);
if (!mOnlyClock) {
mDumpManager.unregisterDumpable(getClass().toString()); // unregister previous clocks
mDumpManager.registerDumpable(getClass().toString(), this);
}
if (mFeatureFlags.isEnabled(LOCKSCREEN_WALLPAPER_DREAM_ENABLED)) {
mStatusArea = mView.findViewById(R.id.keyguard_status_area);