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

Commit 0ce228c5 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Merge cherrypicks of ['googleplex-android-review.googlesource.com/29393068'] into 24Q4-release.

Change-Id: Ied35ffadb72c8bbd1aecafddba5155f00a614813
parents cddbd9c1 4970edf8
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -911,7 +911,7 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
    }

    private void handleSwitchBaselineRoute(boolean includeBluetooth, String btAddressToExclude) {
        routeTo(mIsActive, getBaseRoute(includeBluetooth, btAddressToExclude));
        routeTo(mIsActive, calculateBaselineRoute(includeBluetooth, btAddressToExclude));
    }

    private void handleSpeakerOn() {
@@ -1225,6 +1225,16 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
        return destRoute;
    }

    private AudioRoute calculateBaselineRoute(boolean includeBluetooth, String btAddressToExclude) {
        AudioRoute destRoute = getPreferredAudioRouteFromDefault(
                includeBluetooth, btAddressToExclude);
        if (destRoute != null && !getCallSupportedRoutes().contains(destRoute)) {
            destRoute = null;
        }
        Log.i(this, "getBaseRoute - audio routing to %s", destRoute);
        return destRoute;
    }

    /**
     * Don't add additional AudioRoute when a hearing aid pair is detected. The devices have
     * separate addresses, so we need to perform explicit handling to ensure we don't