summaryrefslogtreecommitdiff
path: root/service/java/com/android/server/bluetooth/BluetoothManagerService.java
diff options
context:
space:
mode:
Diffstat (limited to 'service/java/com/android/server/bluetooth/BluetoothManagerService.java')
-rw-r--r--service/java/com/android/server/bluetooth/BluetoothManagerService.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/service/java/com/android/server/bluetooth/BluetoothManagerService.java b/service/java/com/android/server/bluetooth/BluetoothManagerService.java
index 5ad7f9d2f8..b153c04edf 100644
--- a/service/java/com/android/server/bluetooth/BluetoothManagerService.java
+++ b/service/java/com/android/server/bluetooth/BluetoothManagerService.java
@@ -1240,7 +1240,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
final int callingUid = Binder.getCallingUid();
final int callingPid = Binder.getCallingPid();
if (!isPrivileged(callingPid, callingUid) && !isDeviceOwner(callingUid, packageName)
- && !CompatChanges.isChangeEnabled(RESTRICT_ENABLE_DISABLE, callingUid)
+ && CompatChanges.isChangeEnabled(RESTRICT_ENABLE_DISABLE, callingUid)
&& !isSystem(packageName, callingUid)) {
return false;
}
@@ -3062,6 +3062,8 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
private boolean isPrivileged(int pid, int uid) {
return (mContext.checkPermission(android.Manifest.permission.BLUETOOTH_PRIVILEGED, pid, uid)
== PackageManager.PERMISSION_GRANTED)
+ || (mContext.checkPermission(android.Manifest.permission.NETWORK_SETTINGS, pid, uid)
+ == PackageManager.PERMISSION_GRANTED)
|| (mContext.getPackageManager().checkSignatures(uid, Process.SYSTEM_UID)
== PackageManager.SIGNATURE_MATCH);
}