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

Commit 3e124691 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Clean up maybe_default_speaker_after_unhold flag

This flag is ready for clean up.

Bug: 421006154
Flag: EXEMPT flag clean up
Test: m Telecom
Change-Id: I80575fd00440ebe18dd556d8ffc92469823d5d25
parent 2d16482b
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -89,14 +89,3 @@ 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
  }
}
+3 −3
Original line number Diff line number Diff line
@@ -1452,9 +1452,9 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
            // Ensure that we default to speaker route if we're in a video call, but disregard it if
            // 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
            // Todo: Clean this up once logic to maintain current audio routing during
            //  active/ringing focus switch is addressed.
            if ((skipEarpiece || mWasOnSpeaker) && defaultRoute != null
                    && defaultRoute.getType() == AudioRoute.TYPE_EARPIECE) {
                Log.i(this, "getPreferredAudioRouteFromDefault: Audio routing defaulting to "
                        + "speaker route for (video) call.");
+5 −3
Original line number Diff line number Diff line
@@ -328,9 +328,10 @@ public class CallAudioRouteControllerTest extends TelecomTestCase {
        verify(mCallsManager, timeout(TEST_TIMEOUT).atLeastOnce()).onCallAudioStateChanged(
                any(CallAudioState.class), eq(expectedState));

        // For sanity, verify that routing falls back on earpiece if focus is switched to active
        // again (we don't try to use the preferred device strategy).
        mController.sendMessageWithSessionInfo(SWITCH_FOCUS, ACTIVE_FOCUS, 0);
        // For sanity, verify that routing falls back on earpiece if we attempt to recalculate
        // audio routing.
        mController.sendMessageWithSessionInfo(USER_SWITCH_BASELINE_ROUTE,
                CallAudioRouteController.INCLUDE_BLUETOOTH_IN_BASELINE);
        mController.sendMessageWithSessionInfo(SPEAKER_OFF);
        expectedState = new CallAudioState(false, CallAudioState.ROUTE_EARPIECE,
                CallAudioState.ROUTE_EARPIECE | CallAudioState.ROUTE_SPEAKER, null,
@@ -589,6 +590,7 @@ public class CallAudioRouteControllerTest extends TelecomTestCase {
        verify(mCallsManager, timeout(TEST_TIMEOUT)).onCallAudioStateChanged(
                any(CallAudioState.class), eq(expectedState));

        mController.sendMessageWithSessionInfo(USER_SWITCH_EARPIECE);
        mController.sendMessageWithSessionInfo(SPEAKER_OFF);
        expectedState = new CallAudioState(false, CallAudioState.ROUTE_EARPIECE,
                CallAudioState.ROUTE_EARPIECE | CallAudioState.ROUTE_SPEAKER, null,