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

Commit d5a8afd5 authored by Yiyi Shen's avatar Yiyi Shen Committed by Android (Google) Code Review
Browse files

Merge "[Audiosharing] Do not auto pick fallback in UI when flag on" into main

parents 8d212986 e8b2b6cf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -56,6 +56,7 @@ import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;

import com.android.settingslib.R;
import com.android.settingslib.flags.Flags;

import com.google.common.collect.ImmutableList;

@@ -1126,6 +1127,10 @@ public class LocalBluetoothLeBroadcast implements LocalBluetoothProfile {

    /** Update fallback active device if needed. */
    public void updateFallbackActiveDeviceIfNeeded() {
        if (Flags.disableAudioSharingAutoPickFallbackInUi()) {
            Log.d(TAG, "Skip updateFallbackActiveDeviceIfNeeded, disable flag is on");
            return;
        }
        if (isWorkProfile(mContext)) {
            Log.d(TAG, "Skip updateFallbackActiveDeviceIfNeeded for work profile.");
            return;
+1 −0
Original line number Diff line number Diff line
@@ -309,6 +309,7 @@ public class BluetoothEventManagerTest {

    private void setUpAudioSharing(boolean enableFlag, boolean enableFeature,
            boolean enableProfile, boolean workProfile) {
        mSetFlagsRule.disableFlags(Flags.FLAG_DISABLE_AUDIO_SHARING_AUTO_PICK_FALLBACK_IN_UI);
        if (enableFlag) {
            mSetFlagsRule.enableFlags(Flags.FLAG_ENABLE_LE_AUDIO_SHARING);
        } else {