Loading packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt notifLog, dozeParameters, scrimController, null /* keyguardLiftController */, lockscreenWallpaperLazy, biometricUnlockControllerLazy, dozeServiceHost, Loading packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −2 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ import com.android.internal.telephony.TelephonyIntents; import com.android.internal.widget.LockPatternUtils; import com.android.settingslib.WirelessUtils; import com.android.systemui.DejankUtils; import com.android.systemui.DumpController; import com.android.systemui.Dumpable; import com.android.systemui.R; import com.android.systemui.dagger.qualifiers.MainLooper; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading Loading @@ -126,7 +128,7 @@ import javax.inject.Singleton; * to be updated. */ @Singleton public class KeyguardUpdateMonitor implements TrustManager.TrustListener { public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpable { private static final String TAG = "KeyguardUpdateMonitor"; private static final boolean DEBUG = KeyguardConstants.DEBUG; Loading Loading @@ -1499,11 +1501,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { @VisibleForTesting @Inject protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper) { protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper, DumpController dumpController) { mContext = context; mSubscriptionManager = SubscriptionManager.from(context); mDeviceProvisioned = isDeviceProvisionedInSettingsDb(); mStrongAuthTracker = new StrongAuthTracker(context, this::notifyStrongAuthStateChanged); dumpController.registerDumpable(this); mHandler = new Handler(mainLooper) { @Override Loading Loading @@ -2787,6 +2791,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("KeyguardUpdateMonitor state:"); pw.println(" SIM States:"); Loading packages/SystemUI/src/com/android/systemui/DumpController.kt +13 −3 Original line number Diff line number Diff line Loading @@ -44,6 +44,16 @@ class DumpController @Inject constructor() : Dumpable { val numListeners: Int get() = listeners.size /** * Adds a [Dumpable] dumpable to be dumped. * * @param dumpable the [Dumpable] to be added */ fun registerDumpable(dumpable: Dumpable) { Preconditions.checkNotNull(dumpable, "The dumpable to be added cannot be null") registerDumpable(dumpable.javaClass.simpleName, dumpable) } /** * Adds a [Dumpable] dumpable to be dumped. * Loading Loading @@ -79,11 +89,11 @@ class DumpController @Inject constructor() : Dumpable { /** * Dump all the [Dumpable] registered with the controller */ override fun dump(fd: FileDescriptor?, pw: PrintWriter, args: Array<String>?) { override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<String>) { pw.println("DumpController state:") val filter = if (args != null && args.size >= 3 && args[0] == "dependency" && args[1] == "DumpController") { val filter = if (args.size >= 3 && args[0].toLowerCase() == "dependency" && args[1] == "DumpController") { ArraySet(args[2].split(',').map { it.toLowerCase() }) } else { null Loading packages/SystemUI/src/com/android/systemui/Dumpable.java +16 −1 Original line number Diff line number Diff line Loading @@ -14,9 +14,24 @@ package com.android.systemui; import androidx.annotation.NonNull; import java.io.FileDescriptor; import java.io.PrintWriter; /** * Implemented by classes who want to be in: * {@code adb shell dumpsys activity service com.android.systemui} * * @see DumpController */ public interface Dumpable { void dump(FileDescriptor fd, PrintWriter pw, String[] args); /** * Called when it's time to dump the internal state * @param fd A file descriptor. * @param pw Where to write your dump to. * @param args Arguments. */ void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args); } packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt +3 −3 Original line number Diff line number Diff line Loading @@ -133,10 +133,10 @@ open class BroadcastDispatcher @Inject constructor ( protected open fun createUBRForUser(userId: Int) = UserBroadcastDispatcher(context, userId, mainHandler, bgLooper) override fun dump(fd: FileDescriptor?, pw: PrintWriter?, args: Array<out String>?) { pw?.println("Broadcast dispatcher:") override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) { pw.println("Broadcast dispatcher:") for (index in 0 until receiversByUser.size()) { pw?.println(" User ${receiversByUser.keyAt(index)}") pw.println(" User ${receiversByUser.keyAt(index)}") receiversByUser.valueAt(index).dump(fd, pw, args) } } Loading Loading
packages/CarSystemUI/src/com/android/systemui/statusbar/car/CarStatusBar.java +1 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,7 @@ public class CarStatusBar extends StatusBar implements CarBatteryController.Batt notifLog, dozeParameters, scrimController, null /* keyguardLiftController */, lockscreenWallpaperLazy, biometricUnlockControllerLazy, dozeServiceHost, Loading
packages/SystemUI/src/com/android/keyguard/KeyguardUpdateMonitor.java +7 −2 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ import com.android.internal.telephony.TelephonyIntents; import com.android.internal.widget.LockPatternUtils; import com.android.settingslib.WirelessUtils; import com.android.systemui.DejankUtils; import com.android.systemui.DumpController; import com.android.systemui.Dumpable; import com.android.systemui.R; import com.android.systemui.dagger.qualifiers.MainLooper; import com.android.systemui.shared.system.ActivityManagerWrapper; Loading Loading @@ -126,7 +128,7 @@ import javax.inject.Singleton; * to be updated. */ @Singleton public class KeyguardUpdateMonitor implements TrustManager.TrustListener { public class KeyguardUpdateMonitor implements TrustManager.TrustListener, Dumpable { private static final String TAG = "KeyguardUpdateMonitor"; private static final boolean DEBUG = KeyguardConstants.DEBUG; Loading Loading @@ -1499,11 +1501,13 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { @VisibleForTesting @Inject protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper) { protected KeyguardUpdateMonitor(Context context, @MainLooper Looper mainLooper, DumpController dumpController) { mContext = context; mSubscriptionManager = SubscriptionManager.from(context); mDeviceProvisioned = isDeviceProvisionedInSettingsDb(); mStrongAuthTracker = new StrongAuthTracker(context, this::notifyStrongAuthStateChanged); dumpController.registerDumpable(this); mHandler = new Handler(mainLooper) { @Override Loading Loading @@ -2787,6 +2791,7 @@ public class KeyguardUpdateMonitor implements TrustManager.TrustListener { } } @Override public void dump(FileDescriptor fd, PrintWriter pw, String[] args) { pw.println("KeyguardUpdateMonitor state:"); pw.println(" SIM States:"); Loading
packages/SystemUI/src/com/android/systemui/DumpController.kt +13 −3 Original line number Diff line number Diff line Loading @@ -44,6 +44,16 @@ class DumpController @Inject constructor() : Dumpable { val numListeners: Int get() = listeners.size /** * Adds a [Dumpable] dumpable to be dumped. * * @param dumpable the [Dumpable] to be added */ fun registerDumpable(dumpable: Dumpable) { Preconditions.checkNotNull(dumpable, "The dumpable to be added cannot be null") registerDumpable(dumpable.javaClass.simpleName, dumpable) } /** * Adds a [Dumpable] dumpable to be dumped. * Loading Loading @@ -79,11 +89,11 @@ class DumpController @Inject constructor() : Dumpable { /** * Dump all the [Dumpable] registered with the controller */ override fun dump(fd: FileDescriptor?, pw: PrintWriter, args: Array<String>?) { override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<String>) { pw.println("DumpController state:") val filter = if (args != null && args.size >= 3 && args[0] == "dependency" && args[1] == "DumpController") { val filter = if (args.size >= 3 && args[0].toLowerCase() == "dependency" && args[1] == "DumpController") { ArraySet(args[2].split(',').map { it.toLowerCase() }) } else { null Loading
packages/SystemUI/src/com/android/systemui/Dumpable.java +16 −1 Original line number Diff line number Diff line Loading @@ -14,9 +14,24 @@ package com.android.systemui; import androidx.annotation.NonNull; import java.io.FileDescriptor; import java.io.PrintWriter; /** * Implemented by classes who want to be in: * {@code adb shell dumpsys activity service com.android.systemui} * * @see DumpController */ public interface Dumpable { void dump(FileDescriptor fd, PrintWriter pw, String[] args); /** * Called when it's time to dump the internal state * @param fd A file descriptor. * @param pw Where to write your dump to. * @param args Arguments. */ void dump(@NonNull FileDescriptor fd, @NonNull PrintWriter pw, @NonNull String[] args); }
packages/SystemUI/src/com/android/systemui/broadcast/BroadcastDispatcher.kt +3 −3 Original line number Diff line number Diff line Loading @@ -133,10 +133,10 @@ open class BroadcastDispatcher @Inject constructor ( protected open fun createUBRForUser(userId: Int) = UserBroadcastDispatcher(context, userId, mainHandler, bgLooper) override fun dump(fd: FileDescriptor?, pw: PrintWriter?, args: Array<out String>?) { pw?.println("Broadcast dispatcher:") override fun dump(fd: FileDescriptor, pw: PrintWriter, args: Array<out String>) { pw.println("Broadcast dispatcher:") for (index in 0 until receiversByUser.size()) { pw?.println(" User ${receiversByUser.keyAt(index)}") pw.println(" User ${receiversByUser.keyAt(index)}") receiversByUser.valueAt(index).dump(fd, pw, args) } } Loading