Merge "Bluetooth: fix indentation, formatting in dumpsys" am: 35c715332f am: 36ce9b7ea0

am: 8b1d096e58

Change-Id: I4fd28828d5ed8ec2a3e93b6f8ab074dccdcb30e2
This commit is contained in:
Andre Eisenbach
2017-01-25 18:23:50 +00:00
committed by android-build-merger

View File

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