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

Commit a428dbae authored by Danesh M's avatar Danesh M Committed by Gerrit Code Review
Browse files

Revert "Bluetooth: Move Global settings to CMSettings"

This was added by CAF

Change-Id: Ib80b3946fe66a3a5425be4b7f523810cae734ec8
parent 22b93f2e
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -24,8 +24,6 @@ import android.provider.Settings;
import android.util.Log;
import com.android.bluetooth.btservice.ProfileService;
import com.android.bluetooth.Utils;
import cyanogenmod.providers.CMSettings;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;
@@ -149,8 +147,8 @@ public class A2dpSinkService extends ProfileService {
    public boolean setPriority(BluetoothDevice device, int priority) {
        enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
                                       "Need BLUETOOTH_ADMIN permission");
        CMSettings.Global.putInt(getContentResolver(),
            CMSettings.Global.getBluetoothA2dpSrcPriorityKey(device.getAddress()),
        Settings.Global.putInt(getContentResolver(),
            Settings.Global.getBluetoothA2dpSrcPriorityKey(device.getAddress()),
            priority);
        Log.d(TAG,"Saved priority " + device + " = " + priority);
        return true;
@@ -159,8 +157,8 @@ public class A2dpSinkService extends ProfileService {
    public int getPriority(BluetoothDevice device) {
        enforceCallingOrSelfPermission(BLUETOOTH_ADMIN_PERM,
                                       "Need BLUETOOTH_ADMIN permission");
        int priority = CMSettings.Global.getInt(getContentResolver(),
                CMSettings.Global.getBluetoothA2dpSrcPriorityKey(device.getAddress()),
        int priority = Settings.Global.getInt(getContentResolver(),
            Settings.Global.getBluetoothA2dpSrcPriorityKey(device.getAddress()),
            BluetoothProfile.PRIORITY_UNDEFINED);
        return priority;
    }