Merge "dumpsys: fix problems with -a option in battery and batteryinfo services"
This commit is contained in:
committed by
Android (Google) Code Review
commit
92bebc3259
@@ -498,7 +498,7 @@ class BatteryService extends Binder {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (args == null || args.length == 0) {
|
if (args == null || args.length == 0 || "-a".equals(args[0])) {
|
||||||
synchronized (this) {
|
synchronized (this) {
|
||||||
pw.println("Current Battery Service state:");
|
pw.println("Current Battery Service state:");
|
||||||
pw.println(" AC powered: " + mAcOnline);
|
pw.println(" AC powered: " + mAcOnline);
|
||||||
|
|||||||
@@ -478,6 +478,8 @@ public final class BatteryStatsService extends IBatteryStats.Stub {
|
|||||||
} else if ("-h".equals(arg)) {
|
} else if ("-h".equals(arg)) {
|
||||||
dumpHelp(pw);
|
dumpHelp(pw);
|
||||||
return;
|
return;
|
||||||
|
} else if ("-a".equals(arg)) {
|
||||||
|
// fall through
|
||||||
} else {
|
} else {
|
||||||
pw.println("Unknown option: " + arg);
|
pw.println("Unknown option: " + arg);
|
||||||
dumpHelp(pw);
|
dumpHelp(pw);
|
||||||
|
|||||||
Reference in New Issue
Block a user