Dump state listeners to bug reports

It's fairly common to leak those listeners, knowing which ones are
registered will make debugging easier.

Test: adb shell dumpsys activity service com.android.systemui/.SystemUIService' StatusBarStateControllerImpl
Fixes: 200161871
Change-Id: I89f2132ee907dfd25e251e5bfd1c9367d479d7d3
This commit is contained in:
Lucas Dupin
2022-02-14 13:18:01 -08:00
parent b86ec0a5a4
commit 4e14a67bb2

View File

@@ -507,6 +507,10 @@ public class StatusBarStateControllerImpl implements
pw.println(" mLeaveOpenOnKeyguardHide=" + mLeaveOpenOnKeyguardHide);
pw.println(" mKeyguardRequested=" + mKeyguardRequested);
pw.println(" mIsDozing=" + mIsDozing);
pw.println(" mListeners{" + mListeners.size() + "}=");
for (RankedListener rl : mListeners) {
pw.println(" " + rl.mListener);
}
pw.println(" Historical states:");
// Ignore records without a timestamp
int size = 0;