Merge "resolve merge conflicts of 95330efa55 to nyc-dev-plus-aosp" into nyc-dev-plus-aosp
am: 1b82a4e575
* commit '1b82a4e575660498aaf76068766a5388b724b4bd':
Suppress output for Protobuf data if Bluetooth is disabled
This commit is contained in:
@@ -1671,16 +1671,23 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void dump(FileDescriptor fd, PrintWriter writer, String args[]) {
|
||||
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
|
||||
if (mBluetoothBinder == null) {
|
||||
writer.println("Bluetooth Service not connected");
|
||||
} else {
|
||||
try {
|
||||
mBluetoothBinder.dump(fd, args);
|
||||
} catch (RemoteException re) {
|
||||
writer.println("RemoteException while calling Bluetooth Service");
|
||||
public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
|
||||
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
|
||||
String errorMsg = null;
|
||||
if (mBluetoothBinder == null) {
|
||||
errorMsg = "Bluetooth Service not connected";
|
||||
} else {
|
||||
try {
|
||||
mBluetoothBinder.dump(fd, args);
|
||||
} catch (RemoteException re) {
|
||||
errorMsg = "RemoteException while calling Bluetooth Service";
|
||||
}
|
||||
}
|
||||
if (errorMsg != null) {
|
||||
// Silently return if we are extracting metrics in Protobuf format
|
||||
if ((args.length > 0) && args[0].startsWith("--proto"))
|
||||
return;
|
||||
writer.println(errorMsg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user