Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 097518c6 authored by Hawkwood Glazier's avatar Hawkwood Glazier
Browse files

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
parent 89de5a49
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -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);

        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);