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

Commit 88f900a5 authored by Bryce Lee's avatar Bryce Lee
Browse files

Make rerouting audio to speaker when docked configurable.

Bug: 25485578
Change-Id: Ie2a04e9d96b9c1e3d8167679a1137b65bdad3379
parent 7bab6651
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -42,4 +42,7 @@
    <!-- Component name for the notification handler. The presence of this value will disable
         MissedCallNotifierImpl's presentation of missed call/voice notifications [DO NOT TRANSLATE] -->
    <string name="notification_component" translatable="false"></string>

    <!-- Flag indicating whether audio should be routed to speaker when docked -->
    <bool name="use_speaker_when_docked">true</bool>
</resources>
+6 −1
Original line number Diff line number Diff line
@@ -712,7 +712,12 @@ public class CallsManager extends Call.ListenerBase implements VideoProviderProx
        } else {
            Log.i(this, "%s Starting with speakerphone because car is docked.", call);
        }
        call.setStartWithSpeakerphoneOn(speakerphoneOn || mDockManager.isDocked());

        final boolean useSpeakerWhenDocked = mContext.getResources().getBoolean(
                R.bool.use_speaker_when_docked);

        call.setStartWithSpeakerphoneOn(speakerphoneOn
                || (useSpeakerWhenDocked && mDockManager.isDocked()));

        if (call.isEmergencyCall()) {
            // Emergency -- CreateConnectionProcessor will choose accounts automatically