Merge "Use finally block for Binder.restoreCallingIdentity"
This commit is contained in:
@@ -601,8 +601,12 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
|
||||
}
|
||||
// waive WRITE_SECURE_SETTINGS permission check
|
||||
long callingIdentity = Binder.clearCallingIdentity();
|
||||
Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.BLUETOOTH_ON, value);
|
||||
Binder.restoreCallingIdentity(callingIdentity);
|
||||
try {
|
||||
Settings.Global.putInt(mContext.getContentResolver(),
|
||||
Settings.Global.BLUETOOTH_ON, value);
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(callingIdentity);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user