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

Commit 03eab6e2 authored by Santos Cordon's avatar Santos Cordon Committed by Android (Google) Code Review
Browse files

Merge "Plumb intent extras through to IMS Phone." into mnc-dev

parents 1b9d05de df028023
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1023,7 +1023,7 @@ public final class CallManager {
     */
    public Connection dial(Phone phone, String dialString, UUSInfo uusInfo, int videoState)
            throws CallStateException {
        return phone.dial(dialString, uusInfo, videoState);
        return phone.dial(dialString, uusInfo, videoState, null);
    }

    /**
+7 −1
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.internal.telephony;
import android.content.Context;
import android.net.LinkProperties;
import android.net.NetworkCapabilities;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.telephony.CellInfo;
@@ -864,15 +865,20 @@ public interface Phone {
     * path is connected (or a call index has been assigned) until
     * PhoneStateChanged notification has occurred.
     *
     * NOTE: If adding another parameter, consider creating a DialArgs parameter instead to
     * encapsulate all dial arguments and decrease scaffolding headache.
     *
     * @param dialString The dial string.
     * @param uusInfo The UUSInfo.
     * @param videoState The desired video state for the connection.
     * @param intentExtras The extras from the original CALL intent.
     * @exception CallStateException if a new outgoing call is not currently
     *                possible because no more call slots exist or a call exists
     *                that is dialing, alerting, ringing, or waiting. Other
     *                errors are handled asynchronously.
     */
    Connection dial(String dialString, UUSInfo uusInfo, int videoState) throws CallStateException;
    Connection dial(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras)
            throws CallStateException;

    /**
     * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
+5 −2
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.net.NetworkCapabilities;
import android.net.wifi.WifiManager;
import android.os.AsyncResult;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Message;
@@ -599,7 +600,7 @@ public abstract class PhoneBase extends Handler implements Phone {
                    String dialString = (String) ar.result;
                    if (TextUtils.isEmpty(dialString)) return;
                    try {
                        dialInternal(dialString, null, VideoProfile.STATE_AUDIO_ONLY);
                        dialInternal(dialString, null, VideoProfile.STATE_AUDIO_ONLY, null);
                    } catch (CallStateException e) {
                        Rlog.e(LOG_TAG, "silent redial failed: " + e);
                    }
@@ -2114,10 +2115,12 @@ public abstract class PhoneBase extends Handler implements Phone {
     * @param dialString The number to dial.
     * @param uusInfo The UUSInfo.
     * @param videoState The video state for the call.
     * @param intentExtras Extras from the original CALL intent.
     * @return The Connection.
     * @throws CallStateException
     */
    protected Connection dialInternal(String dialString, UUSInfo uusInfo, int videoState)
    protected Connection dialInternal(
            String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras)
            throws CallStateException {
        // dialInternal shall be overriden by GSMPhone and CDMAPhone
        return null;
+4 −2
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.Intent;
import android.net.LinkProperties;
import android.net.NetworkCapabilities;
import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.SystemProperties;
@@ -755,8 +756,9 @@ public class PhoneProxy extends Handler implements Phone {
    }

    @Override
    public Connection dial(String dialString, UUSInfo uusInfo, int videoState) throws CallStateException {
        return mActivePhone.dial(dialString, uusInfo, videoState);
    public Connection dial(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras)
            throws CallStateException {
        return mActivePhone.dial(dialString, uusInfo, videoState, intentExtras);
    }

    @Override
+23 −18
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.SharedPreferences;
import android.database.SQLException;
import android.net.Uri;
import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.PowerManager;
@@ -406,6 +407,26 @@ public class CDMAPhone extends PhoneBase {
    @Override
    public Connection
    dial (String dialString, int videoState) throws CallStateException {
        return dial(dialString, null, videoState, null);
    }


    @Override
    protected Connection
    dialInternal (String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras)
            throws CallStateException {
        // Need to make sure dialString gets parsed properly
        String newDialString = PhoneNumberUtils.stripSeparators(dialString);
        return mCT.dial(newDialString);
    }

    @Override
    public Connection dial(String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras)
            throws CallStateException {
        if (uusInfo != null) {
            throw new CallStateException("Sending UUS information NOT supported in CDMA!");
        }

        ImsPhone imsPhone = mImsPhone;

        boolean imsUseEnabled = isImsUseEnabled()
@@ -437,7 +458,7 @@ public class CDMAPhone extends PhoneBase {
        if (imsUseEnabled || useImsForEmergency) {
            try {
                if (DBG) Rlog.d(LOG_TAG, "Trying IMS PS call");
                return imsPhone.dial(dialString, videoState);
                return imsPhone.dial(dialString, uusInfo, videoState, intentExtras);
            } catch (CallStateException e) {
                if (DBG) Rlog.d(LOG_TAG, "IMS PS call exception " + e +
                        "imsUseEnabled =" + imsUseEnabled + ", imsPhone =" + imsPhone);
@@ -450,23 +471,7 @@ public class CDMAPhone extends PhoneBase {
        }

        if (DBG) Rlog.d(LOG_TAG, "Trying (non-IMS) CS call");
        return dialInternal(dialString, null, videoState);
    }


    @Override
    protected Connection
    dialInternal (String dialString, UUSInfo uusInfo,
            int videoState) throws CallStateException {
        // Need to make sure dialString gets parsed properly
        String newDialString = PhoneNumberUtils.stripSeparators(dialString);
        return mCT.dial(newDialString);
    }

    @Override
    public Connection dial(String dialString, UUSInfo uusInfo, int videoState)
            throws CallStateException {
        throw new CallStateException("Sending UUS information NOT supported in CDMA!");
        return dialInternal(dialString, null, videoState, intentExtras);
    }

    @Override
Loading