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

Commit fbe3e5b1 authored by Jakub Rotkiewicz (xWF)'s avatar Jakub Rotkiewicz (xWF) Committed by Automerger Merge Worker
Browse files

Merge "flag: rename adm_always_fallback_to_available_device" into main am:...

Merge "flag: rename adm_always_fallback_to_available_device" into main am: aa575a0b am: e8630b79

Original change: https://android-review.googlesource.com/c/platform/packages/modules/Bluetooth/+/3204516



Change-Id: I14e07e34ae0f9bf97760bbdb09e8313d05bcca06
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents d7670ba1 e8630b79
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1121,7 +1121,7 @@ public class ActiveDeviceManager implements AdapterService.BluetoothStateCallbac
            if (Objects.equals(a2dpFallbackDevice, device)) {
                Log.d(TAG, "Found an A2DP fallback device: " + device);
                setA2dpActiveDevice(device);
                if (Flags.alwaysFallbackToAvailableDevice()) {
                if (Flags.admAlwaysFallbackToAvailableDevice()) {
                    setHfpActiveDevice(headsetFallbackDevice);
                } else {
                    if (Objects.equals(headsetFallbackDevice, device)) {
@@ -1152,7 +1152,7 @@ public class ActiveDeviceManager implements AdapterService.BluetoothStateCallbac
            if (Objects.equals(headsetFallbackDevice, device)) {
                Log.d(TAG, "Found a HFP fallback device: " + device);
                setHfpActiveDevice(device);
                if (Flags.alwaysFallbackToAvailableDevice()) {
                if (Flags.admAlwaysFallbackToAvailableDevice()) {
                    setA2dpActiveDevice(a2dpFallbackDevice);
                } else {
                    if (Objects.equals(a2dpFallbackDevice, device)) {
+1 −1
Original line number Diff line number Diff line
@@ -525,7 +525,7 @@ public class ActiveDeviceManagerTest {
    }

    @Test
    @EnableFlags(Flags.FLAG_ALWAYS_FALLBACK_TO_AVAILABLE_DEVICE)
    @EnableFlags(Flags.FLAG_ADM_ALWAYS_FALLBACK_TO_AVAILABLE_DEVICE)
    public void a2dpHeadsetActivated_checkFallbackMeachanismOneA2dpOneHeadset() {
        // Active call
        when(mAudioManager.getMode()).thenReturn(AudioManager.MODE_IN_CALL);
+1 −1
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ flag {
}

flag {
    name: "always_fallback_to_available_device"
    name: "adm_always_fallback_to_available_device"
    namespace: "bluetooth"
    description: "Fix audio path and always fallback to available device"
    bug: "351820274"