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

Commit c6daa806 authored by Tyler Gunn's avatar Tyler Gunn Committed by Automerger Merge Worker
Browse files

Merge "Move set speakerphone out of async task executor." into udc-dev am:...

Merge "Move set speakerphone out of async task executor." into udc-dev am: 623b05cc am: fc82152c am: f58cb04e

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telecomm/+/24027039



Change-Id: I5a152146e45afc2116c64e252487d78ba01ada7f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents daae8987 f58cb04e
Loading
Loading
Loading
Loading
+22 −20
Original line number Diff line number Diff line
@@ -1741,7 +1741,7 @@ public class CallAudioRouteStateMachine extends StateMachine {
        final boolean hasAnyCalls = mCallsManager.hasAnyCalls();
        // These APIs are all via two-way binder calls so can potentially block Telecom.  Since none
        // of this has to happen in the Telecom lock we'll offload it to the async executor.
        mAsyncTaskExecutor.execute(() -> {

        AudioDeviceInfo speakerDevice = null;
        for (AudioDeviceInfo info : mAudioManager.getAvailableCommunicationDevices()) {
            if (info.getType() == AudioDeviceInfo.TYPE_BUILTIN_SPEAKER) {
@@ -1762,7 +1762,9 @@ public class CallAudioRouteStateMachine extends StateMachine {
                mAudioManager.clearCommunicationDevice();
            }
        }
            mStatusBarNotifier.notifySpeakerphone(hasAnyCalls && speakerOn);
        final boolean isSpeakerOn = speakerOn;
        mAsyncTaskExecutor.execute(() -> {
            mStatusBarNotifier.notifySpeakerphone(hasAnyCalls && isSpeakerOn);
        });
    }