Merge "resolve merge conflicts of 95330efa55 to nyc-dev-plus-aosp" into nyc-dev-plus-aosp

This commit is contained in:
Pavlin Radoslavov
2016-02-24 01:09:17 +00:00
committed by Android (Google) Code Review

View File

@@ -1671,16 +1671,23 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
} }
@Override @Override
public void dump(FileDescriptor fd, PrintWriter writer, String args[]) { public void dump(FileDescriptor fd, PrintWriter writer, String[] args) {
mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG); mContext.enforceCallingOrSelfPermission(android.Manifest.permission.DUMP, TAG);
if (mBluetoothBinder == null) { String errorMsg = null;
writer.println("Bluetooth Service not connected"); if (mBluetoothBinder == null) {
} else { errorMsg = "Bluetooth Service not connected";
try { } else {
mBluetoothBinder.dump(fd, args); try {
} catch (RemoteException re) { mBluetoothBinder.dump(fd, args);
writer.println("RemoteException while calling Bluetooth Service"); } 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);
} }
}
} }
} }