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

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

Merge cherrypicks of ['googleplex-android-review.googlesource.com/32858585'] into 25Q2-release.

Change-Id: I4edab026a2e4b77e3413a41bfdd99d728c5e5a61
parents 8cf4e3f4 49d59821
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -195,3 +195,14 @@ flag {
    purpose: PURPOSE_BUGFIX
  }
}

# OWNER=pmadapurmath TARGET=25Q3
flag {
  name: "maybe_default_speaker_after_unhold"
  namespace: "telecom"
  description: "If the call audio route was on speaker and the call is held/unheld, ensure that we route back to speaker."
  bug: "406898224"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}
+6 −3
Original line number Diff line number Diff line
@@ -1399,11 +1399,14 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
                    ? mEarpieceWiredRoute
                    : mSpeakerDockRoute;
            // Ensure that we default to speaker route if we're in a video call, but disregard it if
            // a wired headset is plugged in.
            if (skipEarpiece && defaultRoute != null
            // a wired headset is plugged in. Also consider the case when we're holding/unholding a
            // call. If the route was on speaker mode, ensure that we preserve the route selection.
            boolean shouldDefaultSpeaker = mFeatureFlags.maybeDefaultSpeakerAfterUnhold()
                    && mWasOnSpeaker;
            if ((skipEarpiece || shouldDefaultSpeaker) && defaultRoute != null
                    && defaultRoute.getType() == AudioRoute.TYPE_EARPIECE) {
                Log.i(this, "getPreferredAudioRouteFromDefault: Audio routing defaulting to "
                        + "speaker route for video call.");
                        + "speaker route for (video) call.");
                defaultRoute = mSpeakerDockRoute;
            }
            return defaultRoute;