Loading android/app/src/com/android/bluetooth/a2dp/A2dpService.java +4 −4 Original line number Diff line number Diff line Loading @@ -139,8 +139,8 @@ public class A2dpService extends ProfileService { public boolean setPriority(BluetoothDevice device, int priority) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); Settings.Secure.putInt(getContentResolver(), Settings.Secure.getBluetoothA2dpSinkPriorityKey(device.getAddress()), Settings.Global.putInt(getContentResolver(), Settings.Global.getBluetoothA2dpSinkPriorityKey(device.getAddress()), priority); if (DBG) Log.d(TAG,"Saved priority " + device + " = " + priority); return true; Loading @@ -149,8 +149,8 @@ public class A2dpService extends ProfileService { public int getPriority(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); int priority = Settings.Secure.getInt(getContentResolver(), Settings.Secure.getBluetoothA2dpSinkPriorityKey(device.getAddress()), int priority = Settings.Global.getInt(getContentResolver(), Settings.Global.getBluetoothA2dpSinkPriorityKey(device.getAddress()), BluetoothProfile.PRIORITY_UNDEFINED); return priority; } Loading android/app/src/com/android/bluetooth/hfp/HeadsetService.java +4 −4 Original line number Diff line number Diff line Loading @@ -338,8 +338,8 @@ public class HeadsetService extends ProfileService { public boolean setPriority(BluetoothDevice device, int priority) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); Settings.Secure.putInt(getContentResolver(), Settings.Secure.getBluetoothHeadsetPriorityKey(device.getAddress()), Settings.Global.putInt(getContentResolver(), Settings.Global.getBluetoothHeadsetPriorityKey(device.getAddress()), priority); if (DBG) Log.d(TAG, "Saved priority " + device + " = " + priority); return true; Loading @@ -348,8 +348,8 @@ public class HeadsetService extends ProfileService { public int getPriority(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); int priority = Settings.Secure.getInt(getContentResolver(), Settings.Secure.getBluetoothHeadsetPriorityKey(device.getAddress()), int priority = Settings.Global.getInt(getContentResolver(), Settings.Global.getBluetoothHeadsetPriorityKey(device.getAddress()), BluetoothProfile.PRIORITY_UNDEFINED); return priority; } Loading android/app/src/com/android/bluetooth/hid/HidService.java +4 −4 Original line number Diff line number Diff line Loading @@ -409,8 +409,8 @@ public class HidService extends ProfileService { public boolean setPriority(BluetoothDevice device, int priority) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); Settings.Secure.putInt(getContentResolver(), Settings.Secure.getBluetoothInputDevicePriorityKey(device.getAddress()), Settings.Global.putInt(getContentResolver(), Settings.Global.getBluetoothInputDevicePriorityKey(device.getAddress()), priority); if (DBG) Log.d(TAG,"Saved priority " + device + " = " + priority); return true; Loading @@ -419,8 +419,8 @@ public class HidService extends ProfileService { public int getPriority(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); int priority = Settings.Secure.getInt(getContentResolver(), Settings.Secure.getBluetoothInputDevicePriorityKey(device.getAddress()), int priority = Settings.Global.getInt(getContentResolver(), Settings.Global.getBluetoothInputDevicePriorityKey(device.getAddress()), BluetoothProfile.PRIORITY_UNDEFINED); return priority; } Loading Loading
android/app/src/com/android/bluetooth/a2dp/A2dpService.java +4 −4 Original line number Diff line number Diff line Loading @@ -139,8 +139,8 @@ public class A2dpService extends ProfileService { public boolean setPriority(BluetoothDevice device, int priority) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); Settings.Secure.putInt(getContentResolver(), Settings.Secure.getBluetoothA2dpSinkPriorityKey(device.getAddress()), Settings.Global.putInt(getContentResolver(), Settings.Global.getBluetoothA2dpSinkPriorityKey(device.getAddress()), priority); if (DBG) Log.d(TAG,"Saved priority " + device + " = " + priority); return true; Loading @@ -149,8 +149,8 @@ public class A2dpService extends ProfileService { public int getPriority(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); int priority = Settings.Secure.getInt(getContentResolver(), Settings.Secure.getBluetoothA2dpSinkPriorityKey(device.getAddress()), int priority = Settings.Global.getInt(getContentResolver(), Settings.Global.getBluetoothA2dpSinkPriorityKey(device.getAddress()), BluetoothProfile.PRIORITY_UNDEFINED); return priority; } Loading
android/app/src/com/android/bluetooth/hfp/HeadsetService.java +4 −4 Original line number Diff line number Diff line Loading @@ -338,8 +338,8 @@ public class HeadsetService extends ProfileService { public boolean setPriority(BluetoothDevice device, int priority) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); Settings.Secure.putInt(getContentResolver(), Settings.Secure.getBluetoothHeadsetPriorityKey(device.getAddress()), Settings.Global.putInt(getContentResolver(), Settings.Global.getBluetoothHeadsetPriorityKey(device.getAddress()), priority); if (DBG) Log.d(TAG, "Saved priority " + device + " = " + priority); return true; Loading @@ -348,8 +348,8 @@ public class HeadsetService extends ProfileService { public int getPriority(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); int priority = Settings.Secure.getInt(getContentResolver(), Settings.Secure.getBluetoothHeadsetPriorityKey(device.getAddress()), int priority = Settings.Global.getInt(getContentResolver(), Settings.Global.getBluetoothHeadsetPriorityKey(device.getAddress()), BluetoothProfile.PRIORITY_UNDEFINED); return priority; } Loading
android/app/src/com/android/bluetooth/hid/HidService.java +4 −4 Original line number Diff line number Diff line Loading @@ -409,8 +409,8 @@ public class HidService extends ProfileService { public boolean setPriority(BluetoothDevice device, int priority) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); Settings.Secure.putInt(getContentResolver(), Settings.Secure.getBluetoothInputDevicePriorityKey(device.getAddress()), Settings.Global.putInt(getContentResolver(), Settings.Global.getBluetoothInputDevicePriorityKey(device.getAddress()), priority); if (DBG) Log.d(TAG,"Saved priority " + device + " = " + priority); return true; Loading @@ -419,8 +419,8 @@ public class HidService extends ProfileService { public int getPriority(BluetoothDevice device) { enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM, "Need BLUETOOTH_ADMIN permission"); int priority = Settings.Secure.getInt(getContentResolver(), Settings.Secure.getBluetoothInputDevicePriorityKey(device.getAddress()), int priority = Settings.Global.getInt(getContentResolver(), Settings.Global.getBluetoothInputDevicePriorityKey(device.getAddress()), BluetoothProfile.PRIORITY_UNDEFINED); return priority; } Loading