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

Commit 501b9b37 authored by Santos Cordon's avatar Santos Cordon
Browse files

Dynamic InCallService switching.

Be able to switch between in-call services UIs.

Created a tree data structure to handle switching between InCallServices
depending on the state of the system.  Tree looks like this:

           CarModeSwitchingConnection
                 |             |
          +------+             +-------+
          |                            |
    CarModeConnection          EmergencyConnection
                                       |
                                       |
                               DefaultDialerConnection

Bug: 24571147
Change-Id: I0999fad4185321d5211172aed2f1d60fe8f5fe3a
parent d9d8fb65
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */package com.android.server.telecom;
 */
package com.android.server.telecom;

import com.android.internal.telephony.CallerInfoAsyncQuery;

+5 −2
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@ import com.android.internal.telephony.AsyncEmergencyContactNotifier;
import com.android.internal.telephony.PhoneConstants;
import com.android.internal.telephony.TelephonyProperties;
import com.android.internal.util.IndentingPrintWriter;
import com.android.server.telecom.TelecomServiceImpl.DefaultDialerManagerAdapter;
import com.android.server.telecom.components.ErrorDialogActivity;

import java.util.Collection;
@@ -200,7 +201,8 @@ public class CallsManager extends Call.ListenerBase
            CallAudioManager.AudioServiceFactory audioServiceFactory,
            BluetoothManager bluetoothManager,
            WiredHeadsetManager wiredHeadsetManager,
            SystemStateProvider systemStateProvider) {
            SystemStateProvider systemStateProvider,
            DefaultDialerManagerAdapter defaultDialerAdapter) {
        mContext = context;
        mLock = lock;
        mContactsAsyncHelper = contactsAsyncHelper;
@@ -238,7 +240,8 @@ public class CallsManager extends Call.ListenerBase
        RingtoneFactory ringtoneFactory = new RingtoneFactory(this, context);
        SystemVibrator systemVibrator = new SystemVibrator(context);
        AsyncRingtonePlayer asyncRingtonePlayer = new AsyncRingtonePlayer();
        mInCallController = new InCallController(context, mLock, this, systemStateProvider);
        mInCallController = new InCallController(
                context, mLock, this, systemStateProvider, defaultDialerAdapter);
        mRinger = new Ringer(playerFactory, context, systemSettingsUtil, asyncRingtonePlayer,
                ringtoneFactory, systemVibrator, mInCallController);

Loading