dumpsys: fix problems with -a option in battery and batteryinfo services

Now the dumpsys battery output will show up in bugreports again.

Change-Id: Id36e87d27e9d3c06dcc17671c81aa1d3fe260d1e
Signed-off-by: Mike Lockwood <lockwood@android.com>
This commit is contained in:
Mike Lockwood
2011-08-16 12:53:43 -07:00
parent 8e99d18334
commit e81740442f
2 changed files with 3 additions and 1 deletions

View File

@@ -498,7 +498,7 @@ class BatteryService extends Binder {
return;
}
if (args == null || args.length == 0) {
if (args == null || args.length == 0 || "-a".equals(args[0])) {
synchronized (this) {
pw.println("Current Battery Service state:");
pw.println(" AC powered: " + mAcOnline);

View File

@@ -478,6 +478,8 @@ public final class BatteryStatsService extends IBatteryStats.Stub {
} else if ("-h".equals(arg)) {
dumpHelp(pw);
return;
} else if ("-a".equals(arg)) {
// fall through
} else {
pw.println("Unknown option: " + arg);
dumpHelp(pw);