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

Commit 6b083b43 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 11464157 from dfa4fb62 to 24Q2-release

Change-Id: I80d1ae8c19abbac8554d13a2341e37c28870ea77
parents 0da72c82 dfa4fb62
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -29,6 +29,13 @@ flag{
  bug: "310669304"
}

flag{
  name: "get_registered_phone_accounts"
  namespace: "telecom"
  description: "When set, self-managed clients can get their own phone accounts"
  bug: "317132586"
}

flag{
  name: "transactional_video_state"
  namespace: "telecom"
+8 −8
Original line number Diff line number Diff line
@@ -82,13 +82,9 @@ public class AudioRoute {
                }
            }
            if (routeInfo == null) {
                CompletableFuture<Boolean> future = new CompletableFuture<>();
                mScheduledExecutorService.schedule(new Runnable() {
                    @Override
                    public void run() {
                        createRetry(type, bluetoothAddress, audioManager, retryCount - 1);
                    }
                }, RETRY_TIME_DELAY, TimeUnit.MILLISECONDS);
                mScheduledExecutorService.schedule(
                        () -> createRetry(type, bluetoothAddress, audioManager, retryCount - 1),
                        RETRY_TIME_DELAY, TimeUnit.MILLISECONDS);
            } else {
                mAudioRouteFuture.complete(new AudioRoute(type, bluetoothAddress, routeInfo));
            }
@@ -105,6 +101,7 @@ public class AudioRoute {
    public static final int TYPE_BLUETOOTH_SCO = 5;
    public static final int TYPE_BLUETOOTH_HA = 6;
    public static final int TYPE_BLUETOOTH_LE = 7;
    public static final int TYPE_STREAMING = 8;
    @IntDef(prefix = "TYPE", value = {
            TYPE_INVALID,
            TYPE_EARPIECE,
@@ -113,7 +110,8 @@ public class AudioRoute {
            TYPE_DOCK,
            TYPE_BLUETOOTH_SCO,
            TYPE_BLUETOOTH_HA,
            TYPE_BLUETOOTH_LE
            TYPE_BLUETOOTH_LE,
            TYPE_STREAMING
    })
    @Retention(RetentionPolicy.SOURCE)
    public @interface AudioRouteType {}
@@ -145,6 +143,7 @@ public class AudioRoute {
        DEVICE_TYPE_STRINGS.put(TYPE_BLUETOOTH_SCO, "TYPE_BLUETOOTH_SCO");
        DEVICE_TYPE_STRINGS.put(TYPE_BLUETOOTH_HA, "TYPE_BLUETOOTH_HA");
        DEVICE_TYPE_STRINGS.put(TYPE_BLUETOOTH_LE, "TYPE_BLUETOOTH_LE");
        DEVICE_TYPE_STRINGS.put(TYPE_STREAMING, "TYPE_STREAMING");
    }

    public static final HashMap<Integer, Integer> DEVICE_INFO_TYPETO_AUDIO_ROUTE_TYPE;
@@ -225,6 +224,7 @@ public class AudioRoute {
    void onDestRouteAsPendingRoute(boolean active, PendingAudioRoute pendingAudioRoute,
                                   AudioManager audioManager) {
        if (pendingAudioRoute.isActive() && !active) {
            Log.i(this, "clearCommunicationDevice");
            audioManager.clearCommunicationDevice();
        } else if (active) {
            if (mAudioRouteType == TYPE_BLUETOOTH_SCO) {
+3 −0
Original line number Diff line number Diff line
@@ -97,6 +97,9 @@ public interface CallAudioRouteAdapter {
        put(SPEAKER_ON, "SPEAKER_ON");
        put(SPEAKER_OFF, "SPEAKER_OFF");

        put(STREAMING_FORCE_ENABLED, "STREAMING_FORCE_ENABLED");
        put(STREAMING_FORCE_DISABLED, "STREAMING_FORCE_DISABLED");

        put(USER_SWITCH_EARPIECE, "USER_SWITCH_EARPIECE");
        put(USER_SWITCH_BLUETOOTH, "USER_SWITCH_BLUETOOTH");
        put(USER_SWITCH_HEADSET, "USER_SWITCH_HEADSET");
+498 −74

File changed.

Preview size limit exceeded, changes collapsed.

+7 −2
Original line number Diff line number Diff line
@@ -118,6 +118,7 @@ import android.widget.Button;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.app.IntentForwarderActivity;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.telecom.bluetooth.BluetoothDeviceManager;
import com.android.server.telecom.bluetooth.BluetoothRouteManager;
import com.android.server.telecom.bluetooth.BluetoothStateReceiver;
import com.android.server.telecom.callfiltering.BlockCheckerAdapter;
@@ -607,6 +608,7 @@ public class CallsManager extends Call.ListenerBase
            EmergencyCallDiagnosticLogger emergencyCallDiagnosticLogger,
            CallAudioCommunicationDeviceTracker communicationDeviceTracker,
            CallStreamingNotification callStreamingNotification,
            BluetoothDeviceManager bluetoothDeviceManager,
            FeatureFlags featureFlags,
            IncomingCallFilterGraphProvider incomingCallFilterGraphProvider) {

@@ -632,6 +634,9 @@ public class CallsManager extends Call.ListenerBase
        mDtmfLocalTonePlayer =
                new DtmfLocalTonePlayer(new DtmfLocalTonePlayer.ToneGeneratorProxy());
        CallAudioRouteAdapter callAudioRouteAdapter;
        // TODO: add another flag check when
        // bluetoothDeviceManager.getBluetoothHeadset().isScoManagedByAudio()
        // available and return true
        if (!featureFlags.useRefactoredAudioRouteSwitching()) {
            callAudioRouteAdapter = callAudioRouteStateMachineFactory.create(
                    context,
@@ -646,8 +651,8 @@ public class CallsManager extends Call.ListenerBase
                    featureFlags
            );
        } else {
            callAudioRouteAdapter = new CallAudioRouteController(
                    context, this, new AudioRoute.Factory(), wiredHeadsetManager);
            callAudioRouteAdapter = new CallAudioRouteController(context, this, audioServiceFactory,
                    new AudioRoute.Factory(), wiredHeadsetManager, mBluetoothRouteManager);
        }
        callAudioRouteAdapter.initialize();
        bluetoothStateReceiver.setCallAudioRouteAdapter(callAudioRouteAdapter);
Loading