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

Commit 1edba5bb authored by Sooraj Sasindran's avatar Sooraj Sasindran Committed by Automerger Merge Worker
Browse files

Merge "add slicing config changed indication" am: ac748750 am: 18c93be9

Original change: https://android-review.googlesource.com/c/platform/frameworks/opt/telephony/+/1945430

Change-Id: I051ca0a2ba9423d8cbef2aa496cee2e8bbf280e4
parents 420ac032 18c93be9
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -55,6 +55,7 @@ public abstract class BaseCommands implements CommandsInterface {
    protected RegistrantList mNetworkStateRegistrants = new RegistrantList();
    protected RegistrantList mDataCallListChangedRegistrants = new RegistrantList();
    protected RegistrantList mApnUnthrottledRegistrants = new RegistrantList();
    protected RegistrantList mSlicingConfigChangedRegistrants = new RegistrantList();
    @UnsupportedAppUsage
    protected RegistrantList mVoiceRadioTechChangedRegistrants = new RegistrantList();
    @UnsupportedAppUsage
@@ -318,6 +319,16 @@ public abstract class BaseCommands implements CommandsInterface {
        mApnUnthrottledRegistrants.remove(h);
    }

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

    @Override
    public void unregisterForSlicingConfigChanged(Handler h) {
        mSlicingConfigChangedRegistrants.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
@@ -228,6 +228,10 @@ public interface CommandsInterface {
    void registerForApnUnthrottled(Handler h, int what, Object obj);
    /** Unregister for apn unthrottled event */
    void unregisterForApnUnthrottled(Handler h);
    /** Register for the slicing config changed event */
    void registerForSlicingConfigChanged(Handler h, int what, Object obj);
    /** Unregister for slicing config changed event */
    void unregisterForSlicingConfigChanged(Handler h);

    /** InCall voice privacy notifications */
    void registerForInCallVoicePrivacyOn(Handler h, int what, Object obj);
+16 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ package com.android.internal.telephony;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_DATA_CALL_LIST_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_KEEPALIVE_STATUS;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_PCO_DATA;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_SLICING_CONFIG_CHANGED;
import static com.android.internal.telephony.RILConstants.RIL_UNSOL_UNTHROTTLE_APN;

import android.hardware.radio.data.IRadioDataIndication;
@@ -27,6 +28,7 @@ import android.os.RemoteException;
import android.telephony.PcoData;
import android.telephony.data.DataCallResponse;
import android.telephony.data.DataProfile;
import android.telephony.data.NetworkSlicingConfig;

import com.android.internal.telephony.dataconnection.KeepaliveStatus;

@@ -107,4 +109,18 @@ public class DataIndication extends IRadioDataIndication.Stub {

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

    /**
     * Current slicing configuration including URSP rules and NSSAIs
     * (configured, allowed and rejected).
     * @param indicationType Type of radio indication
     * @param slicingConfig Current slicing configuration
     */
    public void slicingConfigChanged(int indicationType,
            android.hardware.radio.data.SlicingConfig slicingConfig) throws RemoteException {
        mRil.processIndication(RIL.DATA_SERVICE, indicationType);
        if (RIL.RILJ_LOGD) mRil.unsljLogRet(RIL_UNSOL_SLICING_CONFIG_CHANGED, slicingConfig);
        NetworkSlicingConfig ret = RILUtils.convertHalSlicingConfig(slicingConfig);
        mRil.mApnUnthrottledRegistrants.notifyRegistrants(new AsyncResult(null, ret, null));
    }
}
+8 −0
Original line number Diff line number Diff line
@@ -1525,4 +1525,12 @@ public class SimulatedCommandsVerifier implements CommandsInterface {
    @Override
    public void unregisterForSimPhonebookRecordsReceived(Handler h){
    }

    @Override
    public void registerForSlicingConfigChanged(Handler h, int what, Object obj) {
    }

    @Override
    public void unregisterForSlicingConfigChanged(Handler h) {
    }
}