Make the low battery dialog work again.
Change-Id: I97232a3645e6a817c9c5f5f90b88a7e925d36d13
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIService.java b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
index dda86d2..65990ad 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIService.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIService.java
@@ -36,6 +36,7 @@
*/
final Object[] SERVICES = new Object[] {
R.string.config_statusBarComponent,
+ com.android.systemui.power.PowerUI.class,
};
/**
@@ -96,9 +97,19 @@
return;
}
- for (SystemUI ui: mServices) {
- pw.println("dumping service: " + ui.getClass().getName());
- ui.dump(fd, pw, args);
+ if (args == null || args.length == 0) {
+ for (SystemUI ui: mServices) {
+ pw.println("dumping service: " + ui.getClass().getName());
+ ui.dump(fd, pw, args);
+ }
+ } else {
+ String svc = args[0];
+ for (SystemUI ui: mServices) {
+ String name = ui.getClass().getName();
+ if (name.endsWith(svc)) {
+ ui.dump(fd, pw, args);
+ }
+ }
}
}
}