Bluetooth: fix indentation, formatting in dumpsys

Before
======
Enable log:
01-17 09:43:18   Enabled  by com.android.systemui
01-18 07:13:10  Disabled  by com.andorid.systemui

1 BLE Apps registered:
com.google.android.gms

After
=====
Enable log:
  02-06 07:49:07   Enabled  by system boot
  02-06 07:49:35  Disabled  by com.andorid.systemui

1 BLE App registered:
  com.google.android.gms

Test: run bugreport, see differences in dumpsys
Change-Id: I6086f7f97c1fcbdb860d70d9516fd5bf630a9f5e
This commit is contained in:
Marie Janssen
2017-01-18 09:37:52 -08:00
committed by Andre Eisenbach
parent 815fb54798
commit a95924da57

View File

@@ -2018,21 +2018,32 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
writer.println(" time since enabled: " + onDurationString + "\n");
}
writer.println("Enable log:");
for (ActiveLog log : mActiveLogs) {
writer.println(log);
if (mActiveLogs.size() == 0) {
writer.println("Bluetooth never enabled!");
} else {
writer.println("Enable log:");
for (ActiveLog log : mActiveLogs) {
writer.println(" " + log);
}
}
writer.println("\n" + mBleApps.size() + " BLE Apps registered:");
String bleAppString = "No BLE Apps registered.";
if (mBleApps.size() == 1) {
bleAppString = "1 BLE App registered:";
} else if (mBleApps.size() > 1) {
bleAppString = mBleApps.size() + " BLE Apps registered:";
}
writer.println("\n" + bleAppString);
for (ClientDeathRecipient app : mBleApps.values()) {
writer.println(app.getPackageName());
writer.println(" " + app.getPackageName());
}
writer.println("");
writer.flush();
if (args.length == 0) {
// Add arg to produce output
args = new String[1];
args[0] = "--print";
// Add arg to produce output
args = new String[1];
args[0] = "--print";
}
}