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

Commit 5e5b52b2 authored by Daniel Bright's avatar Daniel Bright Committed by Gerrit Code Review
Browse files

Merge changes from topics "apn_throttle", "rename_retry_interval"

* changes:
  Add apn throttle status notifications to QNS
  Renamed retry interval to retry duration
parents 0298692f d7ff5f97
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ public abstract class BaseCommands implements CommandsInterface {
    protected RegistrantList mCallStateRegistrants = new RegistrantList();
    protected RegistrantList mNetworkStateRegistrants = new RegistrantList();
    protected RegistrantList mDataCallListChangedRegistrants = new RegistrantList();
    protected RegistrantList mApnUnthrottledRegistrants = new RegistrantList();
    @UnsupportedAppUsage
    protected RegistrantList mVoiceRadioTechChangedRegistrants = new RegistrantList();
    @UnsupportedAppUsage
@@ -303,6 +304,16 @@ public abstract class BaseCommands implements CommandsInterface {
        mDataCallListChangedRegistrants.remove(h);
    }

    @Override
    public void registerForApnUnthrottled(Handler h, int what, Object obj) {
        mApnUnthrottledRegistrants.addUnique(h, what, obj);
    }

    @Override
    public void unregisterForApnUnthrottled(Handler h) {
        mApnUnthrottledRegistrants.remove(h);
    }

    @Override
    public void registerForVoiceRadioTechChanged(Handler h, int what, Object obj) {
        mVoiceRadioTechChangedRegistrants.addUnique(h, what, obj);
+4 −0
Original line number Diff line number Diff line
@@ -220,6 +220,10 @@ public interface CommandsInterface {
    void registerForDataCallListChanged(Handler h, int what, Object obj);
    /** Unregister from data call list changed event */
    void unregisterForDataCallListChanged(Handler h);
    /** Register for the apn unthrottled event */
    void registerForApnUnthrottled(Handler h, int what, Object obj);
    /** Unregister for apn unthrottled event */
    void unregisterForApnUnthrottled(Handler h);

    /** InCall voice privacy notifications */
    void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj);
+4 −2
Original line number Diff line number Diff line
@@ -296,8 +296,10 @@ public class GsmCdmaPhone extends Phone {
        // DcTracker uses ServiceStateTracker and DisplayInfoController so needs to be created
        // after they are instantiated
        for (int transport : mTransportManager.getAvailableTransports()) {
            mDcTrackers.put(transport, mTelephonyComponentFactory.inject(DcTracker.class.getName())
                    .makeDcTracker(this, transport));
            DcTracker dcTracker = mTelephonyComponentFactory.inject(DcTracker.class.getName())
                    .makeDcTracker(this, transport);
            mDcTrackers.put(transport, dcTracker);
            mTransportManager.registerDataThrottler(dcTracker.getDataThrottler());
        }

        mCarrierResolver = mTelephonyComponentFactory.inject(CarrierResolver.class.getName())
+1 −1
Original line number Diff line number Diff line
@@ -7502,7 +7502,7 @@ public class RIL extends BaseCommands implements CommandsInterface {

        return new DataCallResponse.Builder()
                .setCause(cause)
                .setRetryIntervalMillis(suggestedRetryTime)
                .setRetryDurationMillis(suggestedRetryTime)
                .setId(cid)
                .setLinkStatus(active)
                .setProtocolType(protocolType)
+15 −2
Original line number Diff line number Diff line
@@ -65,6 +65,7 @@ import static com.android.internal.telephony.RILConstants.RIL_UNSOL_STK_SESSION_
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SUPP_SVC_NOTIFICATION;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_UICC_APPLICATIONS_ENABLEMENT_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_UICC_SUBSCRIPTION_STATUS_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_UNTHROTTLE_APN;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_VOICE_RADIO_TECH_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOl_CDMA_PRL_CHANGED;

@@ -86,6 +87,7 @@ import android.hardware.radio.V1_0.SuppSvcNotification;
import android.hardware.radio.V1_2.CellConnectionStatus;
import android.hardware.radio.V1_6.IRadioIndication;
import android.os.AsyncResult;
import android.os.RemoteException;
import android.sysprop.TelephonyProperties;
import android.telephony.Annotation.RadioPowerState;
import android.telephony.AnomalyReporter;
@@ -398,8 +400,10 @@ public class RadioIndication extends IRadioIndication.Stub {
        responseDataCallListChanged(indicationType, dcList);
    }

    /**  unthrottleApn */
    public void unthrottleApn(int indicationType, String apn) {
    @Override
    public void unthrottleApn(int indicationType, String apn)
            throws RemoteException {
        responseApnUnthrottled(indicationType, apn);
    }

    public void suppSvcNotify(int indicationType, SuppSvcNotification suppSvcNotification) {
@@ -1279,4 +1283,13 @@ public class RadioIndication extends IRadioIndication.Stub {
        mRil.mDataCallListChangedRegistrants.notifyRegistrants(
                new AsyncResult(null, response, null));
    }

    private void responseApnUnthrottled(int indicationType, String apn) {
        mRil.processIndication(indicationType);

        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_UNTHROTTLE_APN, apn);

        mRil.mApnUnthrottledRegistrants.notifyRegistrants(
                new AsyncResult(null, apn, null));
    }
}
Loading