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

Commit 520aef5f authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Prevent CommunicationDeviceTracker from use in refactored audio code." into main

parents 3e58fd4f 5754e2a9
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -89,6 +89,17 @@ flag {
  bug: "315865533"
}

# OWNER=tgunn TARGET=24Q3
flag {
  name: "dont_use_communication_device_tracker"
  namespace: "telecom"
  description: "Do not use the communication device tracker with useRefactoredAudioRouteSwitching."
  bug: "346472575"
  metadata {
    purpose: PURPOSE_BUGFIX
  }
}

# OWNER=pmadapurmath TARGET=24Q3
flag {
  name: "resolve_switching_bt_devices_computation"
+9 −3
Original line number Diff line number Diff line
@@ -334,10 +334,16 @@ public class CallAudioModeStateMachine extends StateMachine {
                    mAudioManager.abandonAudioFocusForCall();
                    // Clear requested communication device after the call ends.
                    if (mFeatureFlags.clearCommunicationDeviceAfterAudioOpsComplete()) {
                        // Oh flags!  If we're using the refactored audio route switching, we should
                        // not be using the communication device tracker; that is exclusively for
                        // the old code path.
                        if (!mFeatureFlags.dontUseCommunicationDeviceTracker()
                                || !mFeatureFlags.useRefactoredAudioRouteSwitching()) {
                            mCommunicationDeviceTracker.clearCommunicationDevice(
                                    mCommunicationDeviceTracker
                                            .getCurrentLocallyRequestedCommunicationDevice());
                        }
                    }
                    return HANDLED;
                default:
                    // The forced focus switch commands are handled by BaseState.