Merge "Use finally block for Binder.restoreCallingIdentity" into sc-dev-plus-aosp am: 941fd17556
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14796817 Change-Id: I219460a7c1a55e926a4995d405c75a3afce39012
This commit is contained in:
@@ -614,8 +614,12 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
|
|||||||
}
|
}
|
||||||
// waive WRITE_SECURE_SETTINGS permission check
|
// waive WRITE_SECURE_SETTINGS permission check
|
||||||
final long callingIdentity = Binder.clearCallingIdentity();
|
final long callingIdentity = Binder.clearCallingIdentity();
|
||||||
Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.BLUETOOTH_ON, value);
|
try {
|
||||||
Binder.restoreCallingIdentity(callingIdentity);
|
Settings.Global.putInt(mContext.getContentResolver(),
|
||||||
|
Settings.Global.BLUETOOTH_ON, value);
|
||||||
|
} finally {
|
||||||
|
Binder.restoreCallingIdentity(callingIdentity);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user