Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1286be1c authored by Jeff Sharkey's avatar Jeff Sharkey Committed by Android Git Automerger
Browse files

am 093aa477: Move bluetooth priorities from Secure to Global.

* commit '093aa477':
  Move bluetooth priorities from Secure to Global.
parents 49d7fb5f 093aa477
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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;
    }
+4 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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;
    }
+4 −4
Original line number Diff line number Diff line
@@ -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;
@@ -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;
    }