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

Commit a39be34a authored by Santos Cordon's avatar Santos Cordon Committed by Android Git Automerger
Browse files

am 03eab6e2: Merge "Plumb intent extras through to IMS Phone." into mnc-dev

* commit '03eab6e2':
  Plumb intent extras through to IMS Phone.
parents a53b7a41 03eab6e2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1047,7 +1047,7 @@ public final class CallManager {
     */
     */
    public Connection dial(Phone phone, String dialString, UUSInfo uusInfo, int videoState)
    public Connection dial(Phone phone, String dialString, UUSInfo uusInfo, int videoState)
            throws CallStateException {
            throws CallStateException {
        return phone.dial(dialString, uusInfo, videoState);
        return phone.dial(dialString, uusInfo, videoState, null);
    }
    }


    /**
    /**
+7 −1
Original line number Original line Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.internal.telephony;
import android.content.Context;
import android.content.Context;
import android.net.LinkProperties;
import android.net.LinkProperties;
import android.net.NetworkCapabilities;
import android.net.NetworkCapabilities;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler;
import android.os.Message;
import android.os.Message;
import android.telephony.CellInfo;
import android.telephony.CellInfo;
@@ -864,15 +865,20 @@ public interface Phone {
     * path is connected (or a call index has been assigned) until
     * path is connected (or a call index has been assigned) until
     * PhoneStateChanged notification has occurred.
     * 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 dialString The dial string.
     * @param uusInfo The UUSInfo.
     * @param uusInfo The UUSInfo.
     * @param videoState The desired video state for the connection.
     * @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
     * @exception CallStateException if a new outgoing call is not currently
     *                possible because no more call slots exist or a call exists
     *                possible because no more call slots exist or a call exists
     *                that is dialing, alerting, ringing, or waiting. Other
     *                that is dialing, alerting, ringing, or waiting. Other
     *                errors are handled asynchronously.
     *                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
     * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
+5 −2
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@ import android.net.NetworkCapabilities;
import android.net.wifi.WifiManager;
import android.net.wifi.WifiManager;
import android.os.AsyncResult;
import android.os.AsyncResult;
import android.os.Build;
import android.os.Build;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler;
import android.os.Looper;
import android.os.Looper;
import android.os.Message;
import android.os.Message;
@@ -599,7 +600,7 @@ public abstract class PhoneBase extends Handler implements Phone {
                    String dialString = (String) ar.result;
                    String dialString = (String) ar.result;
                    if (TextUtils.isEmpty(dialString)) return;
                    if (TextUtils.isEmpty(dialString)) return;
                    try {
                    try {
                        dialInternal(dialString, null, VideoProfile.STATE_AUDIO_ONLY);
                        dialInternal(dialString, null, VideoProfile.STATE_AUDIO_ONLY, null);
                    } catch (CallStateException e) {
                    } catch (CallStateException e) {
                        Rlog.e(LOG_TAG, "silent redial failed: " + e);
                        Rlog.e(LOG_TAG, "silent redial failed: " + e);
                    }
                    }
@@ -2135,10 +2136,12 @@ public abstract class PhoneBase extends Handler implements Phone {
     * @param dialString The number to dial.
     * @param dialString The number to dial.
     * @param uusInfo The UUSInfo.
     * @param uusInfo The UUSInfo.
     * @param videoState The video state for the call.
     * @param videoState The video state for the call.
     * @param intentExtras Extras from the original CALL intent.
     * @return The Connection.
     * @return The Connection.
     * @throws CallStateException
     * @throws CallStateException
     */
     */
    protected Connection dialInternal(String dialString, UUSInfo uusInfo, int videoState)
    protected Connection dialInternal(
            String dialString, UUSInfo uusInfo, int videoState, Bundle intentExtras)
            throws CallStateException {
            throws CallStateException {
        // dialInternal shall be overriden by GSMPhone and CDMAPhone
        // dialInternal shall be overriden by GSMPhone and CDMAPhone
        return null;
        return null;
+4 −2
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.Intent;
import android.net.LinkProperties;
import android.net.LinkProperties;
import android.net.NetworkCapabilities;
import android.net.NetworkCapabilities;
import android.os.AsyncResult;
import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler;
import android.os.Message;
import android.os.Message;
import android.os.SystemProperties;
import android.os.SystemProperties;
@@ -755,8 +756,9 @@ public class PhoneProxy extends Handler implements Phone {
    }
    }


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


    @Override
    @Override
+23 −18
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@ import android.content.SharedPreferences;
import android.database.SQLException;
import android.database.SQLException;
import android.net.Uri;
import android.net.Uri;
import android.os.AsyncResult;
import android.os.AsyncResult;
import android.os.Bundle;
import android.os.Handler;
import android.os.Handler;
import android.os.Message;
import android.os.Message;
import android.os.PowerManager;
import android.os.PowerManager;
@@ -406,6 +407,26 @@ public class CDMAPhone extends PhoneBase {
    @Override
    @Override
    public Connection
    public Connection
    dial (String dialString, int videoState) throws CallStateException {
    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;
        ImsPhone imsPhone = mImsPhone;


        boolean imsUseEnabled = isImsUseEnabled()
        boolean imsUseEnabled = isImsUseEnabled()
@@ -437,7 +458,7 @@ public class CDMAPhone extends PhoneBase {
        if (imsUseEnabled || useImsForEmergency) {
        if (imsUseEnabled || useImsForEmergency) {
            try {
            try {
                if (DBG) Rlog.d(LOG_TAG, "Trying IMS PS call");
                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) {
            } catch (CallStateException e) {
                if (DBG) Rlog.d(LOG_TAG, "IMS PS call exception " + e +
                if (DBG) Rlog.d(LOG_TAG, "IMS PS call exception " + e +
                        "imsUseEnabled =" + imsUseEnabled + ", imsPhone =" + imsPhone);
                        "imsUseEnabled =" + imsUseEnabled + ", imsPhone =" + imsPhone);
@@ -450,23 +471,7 @@ public class CDMAPhone extends PhoneBase {
        }
        }


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


    @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!");
    }
    }


    @Override
    @Override
Loading