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

Commit 6bc5ab27 authored by Pranav Madapurmath's avatar Pranav Madapurmath
Browse files

Clean up new speaker broadcast flag

Clean up the flag as it has already rolled out.

Bug: 409609916
Flag: EXEMPT cleanup
Test: atest CallAudioRouteControllerTest
Change-Id: I52ccfd26561b03e579a7735085d96c5766c0812b
parent 6f721b62
Loading
Loading
Loading
Loading
+0 −11
Original line number Diff line number Diff line
@@ -119,17 +119,6 @@ flag {
  }
}

# OWNER=pmadapurmath TARGET=25Q1
flag {
  name: "new_audio_path_speaker_broadcast_and_unfocused_routing"
  namespace: "telecom"
  description: "Replace the speaker broadcasts with the communication device changed listener and resolve baseline routing issues when a call ends."
  bug: "353419513"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

# OWNER=tgunn TARGET=25Q2
flag {
  name: "only_clear_communication_device_on_inactive"
+2 −13
Original line number Diff line number Diff line
@@ -220,14 +220,6 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
            handlerThread.start();
        }

        // Register broadcast receivers
        if (!mFeatureFlags.newAudioPathSpeakerBroadcastAndUnfocusedRouting()) {
            IntentFilter speakerChangedFilter = new IntentFilter(
                    AudioManager.ACTION_SPEAKERPHONE_STATE_CHANGED);
            speakerChangedFilter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
            context.registerReceiver(mSpeakerPhoneChangeReceiver, speakerChangedFilter);
        }

        IntentFilter micMuteChangedFilter = new IntentFilter(
                AudioManager.ACTION_MICROPHONE_MUTE_CHANGED);
        micMuteChangedFilter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
@@ -472,11 +464,8 @@ public class CallAudioRouteController implements CallAudioRouteAdapter {
        mIsActive = false;
        mCallAudioState = new CallAudioState(mIsMute, ROUTE_MAP.get(mCurrentRoute.getType()),
                supportMask, null, new HashSet<>());
        if (mFeatureFlags.newAudioPathSpeakerBroadcastAndUnfocusedRouting()) {
        mAudioManager.addOnCommunicationDeviceChangedListener(
                    mCommunicationDeviceChangedExecutor,
                    mCommunicationDeviceListener);
        }
                mCommunicationDeviceChangedExecutor, mCommunicationDeviceListener);
    }

    @Override
+1 −2
Original line number Diff line number Diff line
@@ -215,7 +215,6 @@ public class CallAudioRouteControllerTest extends TelecomTestCase {
        when(mFeatureFlags.ignoreAutoRouteToWatchDevice()).thenReturn(false);
        when(mFeatureFlags.useRefactoredAudioRouteSwitching()).thenReturn(true);
        when(mFeatureFlags.resolveActiveBtRoutingAndBtTimingIssue()).thenReturn(false);
        when(mFeatureFlags.newAudioPathSpeakerBroadcastAndUnfocusedRouting()).thenReturn(false);
        when(mFeatureFlags.callAudioRoutingPerformanceImprovemenent()).thenReturn(true);
        BLUETOOTH_DEVICES.add(BLUETOOTH_DEVICE_1);
    }
@@ -739,7 +738,7 @@ public class CallAudioRouteControllerTest extends TelecomTestCase {
        ArgumentCaptor<BroadcastReceiver> brCaptor = ArgumentCaptor.forClass(
                BroadcastReceiver.class);
        ArgumentCaptor<IntentFilter> filterCaptor = ArgumentCaptor.forClass(IntentFilter.class);
        verify(mContext, times(3)).registerReceiver(brCaptor.capture(), filterCaptor.capture());
        verify(mContext, times(2)).registerReceiver(brCaptor.capture(), filterCaptor.capture());
        boolean foundValid = false;
        for (int ix = 0; ix < brCaptor.getAllValues().size(); ix++) {
            BroadcastReceiver receiver = brCaptor.getAllValues().get(ix);