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

Commit 6ee71e79 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8345013 from 516fd52e to tm-d1-release

Change-Id: Id4ec9e9aec4f00ae2bb3923fc9ee587e6aedc2a6
parents 074e70ea 516fd52e
Loading
Loading
Loading
Loading
+1 −9
Original line number Diff line number Diff line
@@ -71,15 +71,7 @@ public class DataResponse extends IRadioDataResponse.Stub {
     * @param responseInfo Response info struct containing response type, serial no. and error
     */
    public void deactivateDataCallResponse(RadioResponseInfo responseInfo) {
        RILRequest rr = mRil.processResponse(RIL.DATA_SERVICE, responseInfo);

        if (rr != null) {
            int response = responseInfo.error;
            if (responseInfo.error == RadioError.NONE) {
                RadioResponse.sendMessageResponse(rr.mResult, response);
            }
            mRil.processResponseDone(rr, responseInfo, response);
        }
        RadioResponse.responseVoid(RIL.DATA_SERVICE, mRil, responseInfo);
    }

    /**
+26 −16
Original line number Diff line number Diff line
@@ -22,10 +22,12 @@ import static android.telephony.TelephonyManager.EXTRA_ACTIVE_SIM_SUPPORTED_COUN
import android.content.Context;
import android.content.Intent;
import android.os.AsyncResult;
import android.os.Build;
import android.os.Handler;
import android.os.Message;
import android.os.PowerManager;
import android.os.RegistrantList;
import android.os.SystemProperties;
import android.os.storage.StorageManager;
import android.sysprop.TelephonyProperties;
import android.telephony.PhoneCapability;
@@ -70,7 +72,8 @@ public class PhoneConfigurationManager {
    private MockableInterface mMi = new MockableInterface();
    private TelephonyManager mTelephonyManager;
    private static final RegistrantList sMultiSimConfigChangeRegistrants = new RegistrantList();

    private static final String ALLOW_MOCK_MODEM_PROPERTY = "persist.radio.allow_mock_modem";
    private static final boolean DEBUG = !"user".equals(Build.TYPE);
    /**
     * Init method to instantiate the object
     * Should only be called once.
@@ -457,7 +460,10 @@ public class PhoneConfigurationManager {
        log("setModemService: " + serviceName);
        boolean statusRadioConfig = false;
        boolean statusRil = false;
        final boolean isAllowed = SystemProperties.getBoolean(ALLOW_MOCK_MODEM_PROPERTY, false);

        // Check for ALLOW_MOCK_MODEM_PROPERTY on user builds
        if (isAllowed || DEBUG) {
            if (serviceName != null) {
                // Only CTS mock modem service is allowed to swith.
                if (!serviceName.equals(CTS_MOCK_MODEM_SERVICE)) {
@@ -477,6 +483,10 @@ public class PhoneConfigurationManager {
            }

            return statusRadioConfig && statusRil;
        } else {
            loge("setModemService is not allowed");
            return false;
        }
    }

     /**
+1 −9
Original line number Diff line number Diff line
@@ -740,15 +740,7 @@ public class RadioResponse extends IRadioResponse.Stub {
     * @param responseInfo Response info struct containing response type, serial no. and error
     */
    public void deactivateDataCallResponse(RadioResponseInfo responseInfo) {
        RILRequest rr = mRil.processResponse(responseInfo);

        if (rr != null) {
            int response = responseInfo.error;
            if (responseInfo.error == RadioError.NONE) {
                sendMessageResponse(rr.mResult, response);
            }
            mRil.processResponseDone(rr, responseInfo, response);
        }
        responseVoid(responseInfo);
    }

    /**
+1 −4
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package com.android.internal.telephony.data;
import static android.telephony.data.DataServiceCallback.RESULT_SUCCESS;

import android.annotation.Nullable;
import android.hardware.radio.RadioError;
import android.net.LinkProperties;
import android.os.AsyncResult;
import android.os.Handler;
@@ -89,11 +88,9 @@ public class CellularDataService extends DataService {
                                    response);
                            break;
                        case DEACTIVATE_DATA_CALL_COMPLETE:
                            int error = (int) ar.result;
                            callback.onDeactivateDataCallComplete(ar.exception != null
                                    ? DataServiceCallback.RESULT_ERROR_ILLEGAL_STATE
                                    : error == RadioError.NONE ? RESULT_SUCCESS
                                            : DataServiceCallback.RESULT_ERROR_INVALID_RESPONSE);
                                    : RESULT_SUCCESS);
                            break;
                        case SET_INITIAL_ATTACH_APN_COMPLETE:
                            callback.onSetInitialAttachApnComplete(ar.exception != null
+2 −2
Original line number Diff line number Diff line
@@ -1328,7 +1328,7 @@ public class DataNetwork extends StateMachine {
                                    MAXIMUM_DISCONNECTING_DURATION_MILLIS) + " seconds.";
                    logl(message);
                    AnomalyReporter.reportAnomaly(
                            UUID.fromString("d0e4fa1c-c57b-4ba5-b4b6-8955487012ca"), message);
                            UUID.fromString("d0e4fa1c-c57b-4ba5-b4b6-8955487012cb"), message);
                    mFailCause = DataFailCause.LOST_CONNECTION;
                    transitionTo(mDisconnectedState);
                    break;
@@ -2099,7 +2099,7 @@ public class DataNetwork extends StateMachine {
    private void onDeactivateResponse(@DataServiceCallback.ResultCode int resultCode) {
        logl("onDeactivateResponse: resultCode="
                + DataServiceCallback.resultCodeToString(resultCode));
        if (resultCode == DataServiceCallback.RESULT_ERROR_INVALID_RESPONSE) {
        if (resultCode == DataServiceCallback.RESULT_ERROR_ILLEGAL_STATE) {
            log("Remove network since deactivate request returned an error.");
            mFailCause = DataFailCause.RADIO_NOT_AVAILABLE;
            transitionTo(mDisconnectedState);
Loading