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

Commit 6a8ebd6c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6500447 from 193c2b5a to rvc-release

Change-Id: I1c215b1ba2ff6675bfe06d53eaa4ad560b77c705
parents bf06543f 193c2b5a
Loading
Loading
Loading
Loading
+17 −3
Original line number Original line Diff line number Diff line
@@ -160,6 +160,9 @@ public class GsmCdmaPhone extends Phone {
    // string to define how the carrier specifies its own ota sp number
    // string to define how the carrier specifies its own ota sp number
    private String mCarrierOtaSpNumSchema;
    private String mCarrierOtaSpNumSchema;
    private Boolean mUiccApplicationsEnabled = null;
    private Boolean mUiccApplicationsEnabled = null;
    // keeps track of when we have triggered an emergency call due to the ril.test.emergencynumber
    // param being set and we should generate a simulated exit from the modem upon exit of ECbM.
    private boolean mIsTestingEmergencyCallbackMode = false;


    // A runnable which is used to automatically exit from Ecm after a period of time.
    // A runnable which is used to automatically exit from Ecm after a period of time.
    private Runnable mExitEcmRunnable = new Runnable() {
    private Runnable mExitEcmRunnable = new Runnable() {
@@ -1413,6 +1416,7 @@ public class GsmCdmaPhone extends Phone {
        if (isDialedNumberSwapped && isEmergency) {
        if (isDialedNumberSwapped && isEmergency) {
            // Triggers ECM when CS call ends only for test emergency calls using
            // Triggers ECM when CS call ends only for test emergency calls using
            // ril.test.emergencynumber.
            // ril.test.emergencynumber.
            mIsTestingEmergencyCallbackMode = true;
            mCi.testingEmergencyCall();
            mCi.testingEmergencyCall();
        }
        }
        if (isPhoneTypeGsm()) {
        if (isPhoneTypeGsm()) {
@@ -3435,7 +3439,15 @@ public class GsmCdmaPhone extends Phone {
            if (mWakeLock.isHeld()) {
            if (mWakeLock.isHeld()) {
                mWakeLock.release();
                mWakeLock.release();
            }
            }
            mCi.exitEmergencyCallbackMode(null);
            Message msg = null;
            if (mIsTestingEmergencyCallbackMode) {
                // prevent duplicate exit messages from happening due to this message being handled
                // as well as an UNSOL when the modem exits ECbM. Instead, only register for this
                // message callback when this is a test and we will not be receiving the UNSOL from
                // the modem.
                msg = obtainMessage(EVENT_EXIT_EMERGENCY_CALLBACK_RESPONSE);
            }
            mCi.exitEmergencyCallbackMode(msg);
        }
        }
    }
    }


@@ -3475,8 +3487,9 @@ public class GsmCdmaPhone extends Phone {
        if (mEcmExitRespRegistrant != null) {
        if (mEcmExitRespRegistrant != null) {
            mEcmExitRespRegistrant.notifyRegistrant(ar);
            mEcmExitRespRegistrant.notifyRegistrant(ar);
        }
        }
        // if exiting ecm success
        // if exiting is successful or we are testing and the modem responded with an error upon
        if (ar.exception == null) {
        // exit, which may occur in some IRadio implementations.
        if (ar.exception == null || mIsTestingEmergencyCallbackMode) {
            if (isInEcm()) {
            if (isInEcm()) {
                setIsInEcm(false);
                setIsInEcm(false);
            }
            }
@@ -3492,6 +3505,7 @@ public class GsmCdmaPhone extends Phone {
            mDataEnabledSettings.setInternalDataEnabled(true);
            mDataEnabledSettings.setInternalDataEnabled(true);
            notifyEmergencyCallRegistrants(false);
            notifyEmergencyCallRegistrants(false);
        }
        }
        mIsTestingEmergencyCallbackMode = false;
    }
    }


    //CDMA
    //CDMA
+2 −0
Original line number Original line Diff line number Diff line
@@ -500,6 +500,8 @@ public class NetworkTypeController extends StateMachine {
                        transitionTo(mNrConnectedState);
                        transitionTo(mNrConnectedState);
                    } else if (isLte(rat) && isNrNotRestricted()) {
                    } else if (isLte(rat) && isNrNotRestricted()) {
                        transitionWithTimerTo(isDataActive() ? mLteConnectedState : mIdleState);
                        transitionWithTimerTo(isDataActive() ? mLteConnectedState : mIdleState);
                    } else {
                        updateOverrideNetworkType();
                    }
                    }
                    break;
                    break;
                case EVENT_NR_STATE_CHANGED:
                case EVENT_NR_STATE_CHANGED:
+6 −3
Original line number Original line Diff line number Diff line
@@ -209,8 +209,10 @@ public class RIL extends BaseCommands implements CommandsInterface {
    //***** Instance Variables
    //***** Instance Variables


    @UnsupportedAppUsage
    @UnsupportedAppUsage
    final WakeLock mWakeLock;           // Wake lock associated with request/response
    @VisibleForTesting
    final WakeLock mAckWakeLock;        // Wake lock associated with ack sent
    public final WakeLock mWakeLock;           // Wake lock associated with request/response
    @VisibleForTesting
    public final WakeLock mAckWakeLock;        // Wake lock associated with ack sent
    final int mWakeLockTimeout;         // Timeout associated with request/response
    final int mWakeLockTimeout;         // Timeout associated with request/response
    final int mAckWakeLockTimeout;      // Timeout associated with ack sent
    final int mAckWakeLockTimeout;      // Timeout associated with ack sent
    // The number of wakelock requests currently active.  Don't release the lock
    // The number of wakelock requests currently active.  Don't release the lock
@@ -228,7 +230,8 @@ public class RIL extends BaseCommands implements CommandsInterface {


    Object[] mLastNITZTimeInfo;
    Object[] mLastNITZTimeInfo;


    // When we are testing emergency calls
    // When we are testing emergency calls using ril.test.emergencynumber, this will trigger test
    // ECbM when the call is ended.
    @UnsupportedAppUsage
    @UnsupportedAppUsage
    AtomicBoolean mTestingEmergencyCall = new AtomicBoolean(false);
    AtomicBoolean mTestingEmergencyCall = new AtomicBoolean(false);


+7 −0
Original line number Original line Diff line number Diff line
@@ -144,6 +144,7 @@ public class TelephonyTester {
    private static final String EXTRA_NR_FREQUENCY_RANGE = "nr_frequency_range";
    private static final String EXTRA_NR_FREQUENCY_RANGE = "nr_frequency_range";
    private static final String EXTRA_NR_STATE = "nr_state";
    private static final String EXTRA_NR_STATE = "nr_state";
    private static final String EXTRA_OPERATOR = "operator";
    private static final String EXTRA_OPERATOR = "operator";
    private static final String EXTRA_OPERATOR_RAW = "operator_raw";


    private static final String ACTION_RESET = "reset";
    private static final String ACTION_RESET = "reset";


@@ -403,6 +404,12 @@ public class TelephonyTester {
            ss.setOperatorName(operator, operator, "");
            ss.setOperatorName(operator, operator, "");
            log("Override operator with " + operator);
            log("Override operator with " + operator);
        }
        }
        if (mServiceStateTestIntent.hasExtra(EXTRA_OPERATOR_RAW)) {
            String operator_raw = mServiceStateTestIntent.getStringExtra(EXTRA_OPERATOR_RAW);
            ss.setOperatorAlphaLongRaw(operator_raw);
            ss.setOperatorAlphaShortRaw(operator_raw);
            log("Override operator_raw with " + operator_raw);
        }
        if (mServiceStateTestIntent.hasExtra(EXTRA_NR_FREQUENCY_RANGE)) {
        if (mServiceStateTestIntent.hasExtra(EXTRA_NR_FREQUENCY_RANGE)) {
            ss.setNrFrequencyRange(mServiceStateTestIntent.getIntExtra(EXTRA_NR_FREQUENCY_RANGE,
            ss.setNrFrequencyRange(mServiceStateTestIntent.getIntExtra(EXTRA_NR_FREQUENCY_RANGE,
                    ServiceState.FREQUENCY_RANGE_UNKNOWN));
                    ServiceState.FREQUENCY_RANGE_UNKNOWN));
+14 −3
Original line number Original line Diff line number Diff line
@@ -655,6 +655,7 @@ public class DcTracker extends Handler {
    private final int mTransportType;
    private final int mTransportType;


    private DataStallRecoveryHandler mDsRecoveryHandler;
    private DataStallRecoveryHandler mDsRecoveryHandler;
    private HandlerThread mHandlerThread;


    /**
    /**
     * Request network completion message map. Key is the APN type, value is the list of completion
     * Request network completion message map. Key is the APN type, value is the list of completion
@@ -711,9 +712,9 @@ public class DcTracker extends Handler {
                .getSystemService(Context.NETWORK_POLICY_SERVICE);
                .getSystemService(Context.NETWORK_POLICY_SERVICE);
        mNetworkPolicyManager.registerSubscriptionCallback(mSubscriptionCallback);
        mNetworkPolicyManager.registerSubscriptionCallback(mSubscriptionCallback);


        HandlerThread dcHandlerThread = new HandlerThread("DcHandlerThread");
        mHandlerThread = new HandlerThread("DcHandlerThread");
        dcHandlerThread.start();
        mHandlerThread.start();
        Handler dcHandler = new Handler(dcHandlerThread.getLooper());
        Handler dcHandler = new Handler(mHandlerThread.getLooper());
        mDcc = DcController.makeDcc(mPhone, this, mDataServiceManager, dcHandler, tagSuffix);
        mDcc = DcController.makeDcc(mPhone, this, mDataServiceManager, dcHandler, tagSuffix);
        mDcTesterFailBringUpAll = new DcTesterFailBringUpAll(mPhone, dcHandler);
        mDcTesterFailBringUpAll = new DcTesterFailBringUpAll(mPhone, dcHandler);


@@ -830,6 +831,16 @@ public class DcTracker extends Handler {
        destroyDataConnections();
        destroyDataConnections();
    }
    }


    /**
     * Stop the internal handler thread
     *
     * TESTING ONLY
     */
    @VisibleForTesting
    public void stopHandlerThread() {
        mHandlerThread.quit();
    }

    private void unregisterForAllEvents() {
    private void unregisterForAllEvents() {
         //Unregister for all events
         //Unregister for all events
        if (mTransportType == AccessNetworkConstants.TRANSPORT_TYPE_WWAN) {
        if (mTransportType == AccessNetworkConstants.TRANSPORT_TYPE_WWAN) {
Loading