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

Commit bae03f59 authored by Petri Gynther's avatar Petri Gynther Committed by android-build-merger
Browse files

Merge "A2DP offload: switch to new properties"

am: a9604846

Change-Id: I14d6526adb136741cdd78830b82a0f51c0d9d650
parents 3546ba7a a9604846
Loading
Loading
Loading
Loading
+7 −3
Original line number Original line Diff line number Diff line
@@ -62,8 +62,10 @@ class AdapterProperties {
            "persist.bluetooth.maxconnectedaudiodevices";
            "persist.bluetooth.maxconnectedaudiodevices";
    static final int MAX_CONNECTED_AUDIO_DEVICES_LOWER_BOND = 1;
    static final int MAX_CONNECTED_AUDIO_DEVICES_LOWER_BOND = 1;
    private static final int MAX_CONNECTED_AUDIO_DEVICES_UPPER_BOUND = 5;
    private static final int MAX_CONNECTED_AUDIO_DEVICES_UPPER_BOUND = 5;
    private static final String A2DP_OFFLOAD_ENABLE_PROPERTY =
    private static final String A2DP_OFFLOAD_SUPPORTED_PROPERTY =
            "persist.bluetooth.a2dp_offload.enable";
            "ro.bluetooth.a2dp_offload.supported";
    private static final String A2DP_OFFLOAD_DISABLED_PROPERTY =
            "persist.bluetooth.a2dp_offload.disabled";


    private static final long DEFAULT_DISCOVERY_TIMEOUT_MS = 12800;
    private static final long DEFAULT_DISCOVERY_TIMEOUT_MS = 12800;
    private static final int BD_ADDR_LEN = 6; // in bytes
    private static final int BD_ADDR_LEN = 6; // in bytes
@@ -193,7 +195,9 @@ class AdapterProperties {
                + propertyOverlayedMaxConnectedAudioDevices + ", finalValue="
                + propertyOverlayedMaxConnectedAudioDevices + ", finalValue="
                + mMaxConnectedAudioDevices);
                + mMaxConnectedAudioDevices);


        mA2dpOffloadEnabled = SystemProperties.getBoolean(A2DP_OFFLOAD_ENABLE_PROPERTY, false);
        mA2dpOffloadEnabled =
                SystemProperties.getBoolean(A2DP_OFFLOAD_SUPPORTED_PROPERTY, false)
                && !SystemProperties.getBoolean(A2DP_OFFLOAD_DISABLED_PROPERTY, false);


        IntentFilter filter = new IntentFilter();
        IntentFilter filter = new IntentFilter();
        filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);
        filter.addAction(BluetoothHeadset.ACTION_CONNECTION_STATE_CHANGED);