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

Commit bc4221ee authored by Pranav Madapurmath's avatar Pranav Madapurmath Committed by Android (Google) Code Review
Browse files

Merge "Clear communication device after audio ops finish" into main

parents d225bde8 8603adbe
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -62,3 +62,10 @@ flag {
  description: "Update supported route mask when Bluetooth devices audio connected."
  bug: "301695370"
}

flag {
  name: "clear_communication_device_after_audio_ops_complete"
  namespace: "telecom"
  description: "Clear the requested communication device after the audio operations are completed."
  bug: "315865533"
}
+10 −1
Original line number Diff line number Diff line
@@ -280,7 +280,10 @@ public class CallAudioModeStateMachine extends StateMachine {
            mLocalLog.log("Enter UNFOCUSED");
            if (mIsInitialized) {
                // Clear any communication device that was requested previously.
                if (mFeatureFlags.callAudioCommunicationDeviceRefactor()) {
                // Todo: Remove once clearCommunicationDeviceAfterAudioOpsComplete is
                // completely rolled out.
                if (mFeatureFlags.callAudioCommunicationDeviceRefactor()
                        && !mFeatureFlags.clearCommunicationDeviceAfterAudioOpsComplete()) {
                    mCommunicationDeviceTracker.clearCommunicationDevice(mCommunicationDeviceTracker
                            .getCurrentLocallyRequestedCommunicationDevice());
                }
@@ -353,6 +356,12 @@ public class CallAudioModeStateMachine extends StateMachine {
                    } else {
                        mAudioManager.abandonAudioFocusForCall();
                    }
                    // Clear requested communication device after the call ends.
                    if (mFeatureFlags.clearCommunicationDeviceAfterAudioOpsComplete()) {
                        mCommunicationDeviceTracker.clearCommunicationDevice(
                                mCommunicationDeviceTracker
                                        .getCurrentLocallyRequestedCommunicationDevice());
                    }
                    return HANDLED;
                default:
                    // The forced focus switch commands are handled by BaseState.