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

Commit 2870e4b6 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6325693 from d1e49fb7 to rvc-release

Change-Id: Idd83efefc5ebc95a93e001cb46d451d238457b37
parents 11d06b83 d1e49fb7
Loading
Loading
Loading
Loading
+7 −14
Original line number Diff line number Diff line
@@ -107,7 +107,6 @@ public class GsmCdmaCallTracker extends CallTracker {
    private boolean mPendingCallInEcm;
    private boolean mIsInEmergencyCall;
    private int mPendingCallClirMode;
    private boolean mIsEcmTimerCanceled;
    private int m3WayCallFlashDelay;

    /**
@@ -189,7 +188,7 @@ public class GsmCdmaCallTracker extends CallTracker {
            mPendingCallInEcm = false;
            mIsInEmergencyCall = false;
            mPendingCallClirMode = CommandsInterface.CLIR_DEFAULT;
            mIsEcmTimerCanceled = false;
            mPhone.setEcmCanceledForEmergency(false /*isCanceled*/);
            m3WayCallFlashDelay = 0;
            mCi.registerForCallWaitingInfo(this, EVENT_CALL_WAITING_INFO_CDMA, null);
        }
@@ -369,12 +368,6 @@ public class GsmCdmaCallTracker extends CallTracker {
    @UnsupportedAppUsage
    private void handleEcmTimer(int action) {
        mPhone.handleTimerInEmergencyCallbackMode(action);
        switch(action) {
            case GsmCdmaPhone.CANCEL_ECM_TIMER: mIsEcmTimerCanceled = true; break;
            case GsmCdmaPhone.RESTART_ECM_TIMER: mIsEcmTimerCanceled = false; break;
            default:
                Rlog.e(LOG_TAG, "handleEcmTimer, unsupported action " + action);
        }
    }

    //CDMA
@@ -435,7 +428,7 @@ public class GsmCdmaCallTracker extends CallTracker {

        // Cancel Ecm timer if a second emergency call is originating in Ecm mode
        if (isPhoneInEcmMode && isEmergencyCall) {
            handleEcmTimer(GsmCdmaPhone.CANCEL_ECM_TIMER);
            mPhone.handleTimerInEmergencyCallbackMode(GsmCdmaPhone.CANCEL_ECM_TIMER);
        }

        // The new call must be assigned to the foreground call.
@@ -862,8 +855,9 @@ public class GsmCdmaCallTracker extends CallTracker {
                        mHangupPendingMO = false;

                        // Re-start Ecm timer when an uncompleted emergency call ends
                        if (!isPhoneTypeGsm() && mIsEcmTimerCanceled) {
                            handleEcmTimer(GsmCdmaPhone.RESTART_ECM_TIMER);
                        if (!isPhoneTypeGsm() && mPhone.isEcmCanceledForEmergency()) {
                            mPhone.handleTimerInEmergencyCallbackMode(
                                    GsmCdmaPhone.RESTART_ECM_TIMER);
                        }

                        try {
@@ -953,8 +947,8 @@ public class GsmCdmaCallTracker extends CallTracker {
                    }

                    // Re-start Ecm timer when the connected emergency call ends
                    if (mIsEcmTimerCanceled) {
                        handleEcmTimer(GsmCdmaPhone.RESTART_ECM_TIMER);
                    if (mPhone.isEcmCanceledForEmergency()) {
                        mPhone.handleTimerInEmergencyCallbackMode(GsmCdmaPhone.RESTART_ECM_TIMER);
                    }
                    // If emergency call is not going through while dialing
                    checkAndEnableDataCallAfterEmergencyCallDropped();
@@ -1816,7 +1810,6 @@ public class GsmCdmaCallTracker extends CallTracker {
            pw.println(" mPendingCallInEcm=" + mPendingCallInEcm);
            pw.println(" mIsInEmergencyCall=" + mIsInEmergencyCall);
            pw.println(" mPendingCallClirMode=" + mPendingCallClirMode);
            pw.println(" mIsEcmTimerCanceled=" + mIsEcmTimerCanceled);
        }

    }
+3 −1
Original line number Diff line number Diff line
@@ -793,7 +793,7 @@ public class GsmCdmaPhone extends Phone {
    public void sendEmergencyCallStateChange(boolean callActive) {
        if (!isPhoneTypeCdma()) {
            // It possible that this method got called from ImsPhoneCallTracker#
            logi("sendEmergencyCallbackModeChange - skip for non-cdma");
            logi("sendEmergencyCallStateChange - skip for non-cdma");
            return;
        }
        if (mBroadcastEmergencyCallStateChanges) {
@@ -3479,12 +3479,14 @@ public class GsmCdmaPhone extends Phone {
            case CANCEL_ECM_TIMER:
                removeCallbacks(mExitEcmRunnable);
                mEcmTimerResetRegistrants.notifyResult(Boolean.TRUE);
                setEcmCanceledForEmergency(true /*isCanceled*/);
                break;
            case RESTART_ECM_TIMER:
                long delayInMillis = TelephonyProperties.ecm_exit_timer()
                        .orElse(DEFAULT_ECM_EXIT_TIMER_VALUE);
                postDelayed(mExitEcmRunnable, delayInMillis);
                mEcmTimerResetRegistrants.notifyResult(Boolean.FALSE);
                setEcmCanceledForEmergency(false /*isCanceled*/);
                break;
            default:
                Rlog.e(LOG_TAG, "handleTimerInEmergencyCallbackMode, unsupported action " + action);
+29 −1
Original line number Diff line number Diff line
@@ -178,7 +178,8 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
    @VisibleForTesting
    protected static final int EVENT_ICC_CHANGED                    = 30;
    // Single Radio Voice Call Continuity
    private static final int EVENT_SRVCC_STATE_CHANGED              = 31;
    @VisibleForTesting
    protected static final int EVENT_SRVCC_STATE_CHANGED             = 31;
    private static final int EVENT_INITIATE_SILENT_REDIAL           = 32;
    private static final int EVENT_RADIO_NOT_AVAILABLE              = 33;
    private static final int EVENT_UNSOL_OEM_HOOK_RAW               = 34;
@@ -290,6 +291,9 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
    // Keep track of whether or not the phone is in Emergency Callback Mode for Phone and
    // subclasses
    protected boolean mIsPhoneInEcmState = false;
    // Keep track of the case where ECM was cancelled to place another outgoing emergency call.
    // We will need to restart it after the emergency call ends.
    protected boolean mEcmCanceledForEmergency = false;
    private volatile long mTimeLastEmergencySmsSentMs = EMERGENCY_SMS_NO_TIME_RECORDED;

    // Variable to cache the video capability. When RAT changes, we lose this info and are unable
@@ -997,9 +1001,14 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        if (from.isInEmergencyCall()) {
            setIsInEmergencyCall();
        }
        setEcmCanceledForEmergency(from.isEcmCanceledForEmergency());
    }

    protected void migrate(RegistrantList to, RegistrantList from) {
        if (from == null) {
            // May be null in some cases, such as testing.
            return;
        }
        from.removeCleared();
        for (int i = 0, n = from.size(); i < n; i++) {
            Registrant r = (Registrant) from.get(i);
@@ -2525,6 +2534,24 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mIsPhoneInEcmState = isInEcm;
    }

    /**
     * @return true if this Phone is in an emergency call that caused emergency callback mode to be
     * canceled, false if not.
     */
    public boolean isEcmCanceledForEmergency() {
        return mEcmCanceledForEmergency;
    }

    /**
     * Set whether or not this Phone has an active emergency call that was placed during emergency
     * callback mode and caused it to be temporarily canceled.
     * @param isCanceled true if an emergency call was placed that caused ECM to be canceled, false
     *                   if it is not in this state.
     */
    public void setEcmCanceledForEmergency(boolean isCanceled) {
        mEcmCanceledForEmergency = isCanceled;
    }

    @UnsupportedAppUsage
    private static int getVideoState(Call call) {
        int videoState = VideoProfile.STATE_AUDIO_ONLY;
@@ -4245,6 +4272,7 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        pw.println(" getActiveApnTypes()=" + getActiveApnTypes());
        pw.println(" needsOtaServiceProvisioning=" + needsOtaServiceProvisioning());
        pw.println(" isInEmergencySmsMode=" + isInEmergencySmsMode());
        pw.println(" isEcmCanceledForEmergency=" + isEcmCanceledForEmergency());
        pw.println(" service state=" + getServiceState());
        pw.flush();
        pw.println("++++++++++++++++++++++++++++++++");
+1 −0
Original line number Diff line number Diff line
@@ -3750,6 +3750,7 @@ public class SubscriptionController extends ISub.Stub {
                callingFeatureId, message)) {
            result = new SubscriptionInfo(subInfo);
            result.clearIccId();
            result.clearCardString();
        }
        return result;
    }
+3 −3
Original line number Diff line number Diff line
@@ -884,10 +884,10 @@ public class SubscriptionInfoUpdater extends Handler {
            // If cardId = unsupported or unitialized, we have no reason to update DB.
            // Additionally, if the device does not support cardId for default eUICC, the CARD_ID
            // field should not contain the EID
            if (cardId >= 0 && UiccController.getInstance().getCardIdForDefaultEuicc()
            UiccController uiccController = UiccController.getInstance();
            if (cardId >= 0 && uiccController.getCardIdForDefaultEuicc()
                    != TelephonyManager.UNSUPPORTED_CARD_ID) {
                values.put(SubscriptionManager.CARD_ID,
                        mEuiccManager.createForCardId(cardId).getEid());
                values.put(SubscriptionManager.CARD_ID, uiccController.convertToCardString(cardId));
            }
            hasChanges = true;
            contentResolver.update(SubscriptionManager.CONTENT_URI, values,
Loading