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;
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;
}
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;
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;
}
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;
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;
}