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

Commit 6d9f6c2d authored by Sarah Chin's avatar Sarah Chin Committed by Gerrit Code Review
Browse files

Merge changes from topics "deactivate_all_errors", "deactivate_no_tds",...

Merge changes from topics "deactivate_all_errors", "deactivate_no_tds", "deactivate_no_tds_revert", "deactivate_radio_not_available"

* changes:
  Move onSetupDataFailed and onDisconnected logic to DisconnectedState
  Revert "Deactivate data network if TDs are empty"
  Trigger anomaly when data stuck in transient states
  Deactivate data network if TDs are empty
  DeactivateDataCall remove network on all errors
  Handle RADIO_NOT_AVAILABLE in deactivateDataCall
parents fe84e6d0 b96463a9
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -71,7 +71,13 @@ public class DataResponse extends IRadioDataResponse.Stub {
     * @param responseInfo Response info struct containing response type, serial no. and error
     */
    public void deactivateDataCallResponse(RadioResponseInfo responseInfo) {
        RadioResponse.responseVoid(RIL.DATA_SERVICE, mRil, responseInfo);
        RILRequest rr = mRil.processResponse(RIL.DATA_SERVICE, responseInfo);

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

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

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

    /**
+7 −4
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ 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;
@@ -51,7 +52,7 @@ public class CellularDataService extends DataService {
    private static final boolean DBG = false;

    private static final int SETUP_DATA_CALL_COMPLETE               = 1;
    private static final int DEACTIVATE_DATA_ALL_COMPLETE           = 2;
    private static final int DEACTIVATE_DATA_CALL_COMPLETE          = 2;
    private static final int SET_INITIAL_ATTACH_APN_COMPLETE        = 3;
    private static final int SET_DATA_PROFILE_COMPLETE              = 4;
    private static final int REQUEST_DATA_CALL_LIST_COMPLETE        = 5;
@@ -87,10 +88,12 @@ public class CellularDataService extends DataService {
                                    : RESULT_SUCCESS,
                                    response);
                            break;
                        case DEACTIVATE_DATA_ALL_COMPLETE:
                        case DEACTIVATE_DATA_CALL_COMPLETE:
                            int error = (int) ar.result;
                            callback.onDeactivateDataCallComplete(ar.exception != null
                                    ? DataServiceCallback.RESULT_ERROR_ILLEGAL_STATE
                                    : RESULT_SUCCESS);
                                    : error == RadioError.NONE ? RESULT_SUCCESS
                                            : DataServiceCallback.RESULT_ERROR_INVALID_RESPONSE);
                            break;
                        case SET_INITIAL_ATTACH_APN_COMPLETE:
                            callback.onSetInitialAttachApnComplete(ar.exception != null
@@ -189,7 +192,7 @@ public class CellularDataService extends DataService {
            // Only obtain the message when the caller wants a callback. If the caller doesn't care
            // the request completed or results, then no need to pass the message down.
            if (callback != null) {
                message = Message.obtain(mHandler, DEACTIVATE_DATA_ALL_COMPLETE);
                message = Message.obtain(mHandler, DEACTIVATE_DATA_CALL_COMPLETE);
                mCallbackMap.put(message, callback);
            }

+154 −46

File changed.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -17,6 +17,7 @@
package com.android.internal.telephony.test;

import android.compat.annotation.UnsupportedAppUsage;
import android.hardware.radio.RadioError;
import android.hardware.radio.V1_0.DataRegStateResult;
import android.hardware.radio.V1_0.SetupDataCallResult;
import android.hardware.radio.V1_0.VoiceRegStateResult;
@@ -1239,7 +1240,7 @@ public class SimulatedCommands extends BaseCommands
    @Override
    public void deactivateDataCall(int cid, int reason, Message result) {
        SimulatedCommandsVerifier.getInstance().deactivateDataCall(cid, reason, result);
        resultSuccess(result, null);
        resultSuccess(result, RadioError.NONE);
    }

    @Override
Loading