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

Commit 4c30e561 authored by Jakub Rotkiewicz's avatar Jakub Rotkiewicz
Browse files

flag: rename adm_always_fallback_to_available_device

Bug: 351820274
Bug: 315241296
Test: mmm packages/modules/Bluetooth
Change-Id: I3c103ac3502490211693e5302d5e60a28e4fda22
parent 3d9d0ed4
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -1121,7 +1121,7 @@ public class ActiveDeviceManager implements AdapterService.BluetoothStateCallbac
            if (Objects.equals(a2dpFallbackDevice, device)) {
            if (Objects.equals(a2dpFallbackDevice, device)) {
                Log.d(TAG, "Found an A2DP fallback device: " + device);
                Log.d(TAG, "Found an A2DP fallback device: " + device);
                setA2dpActiveDevice(device);
                setA2dpActiveDevice(device);
                if (Flags.alwaysFallbackToAvailableDevice()) {
                if (Flags.admAlwaysFallbackToAvailableDevice()) {
                    setHfpActiveDevice(headsetFallbackDevice);
                    setHfpActiveDevice(headsetFallbackDevice);
                } else {
                } else {
                    if (Objects.equals(headsetFallbackDevice, device)) {
                    if (Objects.equals(headsetFallbackDevice, device)) {
@@ -1152,7 +1152,7 @@ public class ActiveDeviceManager implements AdapterService.BluetoothStateCallbac
            if (Objects.equals(headsetFallbackDevice, device)) {
            if (Objects.equals(headsetFallbackDevice, device)) {
                Log.d(TAG, "Found a HFP fallback device: " + device);
                Log.d(TAG, "Found a HFP fallback device: " + device);
                setHfpActiveDevice(device);
                setHfpActiveDevice(device);
                if (Flags.alwaysFallbackToAvailableDevice()) {
                if (Flags.admAlwaysFallbackToAvailableDevice()) {
                    setA2dpActiveDevice(a2dpFallbackDevice);
                    setA2dpActiveDevice(a2dpFallbackDevice);
                } else {
                } else {
                    if (Objects.equals(a2dpFallbackDevice, device)) {
                    if (Objects.equals(a2dpFallbackDevice, device)) {
+1 −1
Original line number Original line Diff line number Diff line
@@ -525,7 +525,7 @@ public class ActiveDeviceManagerTest {
    }
    }


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


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