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

Commit 59469e84 authored by Hakjun Choi's avatar Hakjun Choi Committed by Android (Google) Code Review
Browse files

Merge "Add internal implementation for setSatellitePlmn" into main

parents ad89e63a a48724b6
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -3151,4 +3151,16 @@ public interface CommandsInterface {
     * @param h Handler to be removed from the registrant list.
     */
    default void unregisterForSatelliteProvisionStateChanged(@NonNull Handler h) {}

    /**
     * Set the non-terrestrial PLMN with lower priority than terrestrial networks.
     * MCC/MNC broadcast by the non-terrestrial networks may not be included in OPLMNwACT file on
     * SIM profile. Acquisition of satellite based system is lower priority to terrestrial
     * networks. UE shall make all attempts to acquire terrestrial service prior to camping on
     * satellite LTE service.
     *
     * @param result Message that will be sent back to the requester.
     * @param plmnList The list of roaming PLMN used for connecting to satellite networks.
     */
    default void setSatellitePlmn(@NonNull Message result, @NonNull List<String> plmnList) {}
}
+7 −0
Original line number Diff line number Diff line
@@ -504,6 +504,13 @@ public class NetworkResponse extends IRadioNetworkResponse.Stub {
        RadioResponse.responseVoid(HAL_SERVICE_NETWORK, mRil, responseInfo);
    }

    /**
     * @param responseInfo Response info struct containing serial no. and error
     */
    public void setSatellitePlmnResponse(RadioResponseInfo responseInfo) {
        RadioResponse.responseVoid(HAL_SERVICE_NETWORK, mRil, responseInfo);
    }

    @Override
    public String getInterfaceHash() {
        return IRadioNetworkResponse.HASH;
+15 −0
Original line number Diff line number Diff line
@@ -5415,6 +5415,21 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mCi.getTimeForNextSatelliteVisibility(result);
    }

    /**
     * Set the non-terrestrial PLMN with lower priority than terrestrial networks.
     * MCC/MNC broadcast by the non-terrestrial networks may not be included in OPLMNwACT file on
     * SIM profile. Acquisition of satellite based system is lower priority to terrestrial
     * networks. UE shall make all attempts to acquire terrestrial service prior to camping on
     * satellite LTE service.
     *
     * @param result The result receiver that returns whether the modem has
     *               successfully set the satellite PLMN
     * @param plmnList The list of roaming PLMN used for connecting to satellite networks.
     */
    public void setSatellitePlmn(@NonNull Message result, @NonNull List<String> plmnList) {
        mCi.setSatellitePlmn(result, plmnList);
    }

    /**
     * Start callback mode
     * @param type for callback mode entry.
+31 −1
Original line number Diff line number Diff line
@@ -5539,7 +5539,6 @@ public class RIL extends BaseCommands implements CommandsInterface {
                mRILDefaultWorkSource);

        if (RILJ_LOGD) {
            // Do not log function arg for privacy
            riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest));
        }

@@ -5549,6 +5548,37 @@ public class RIL extends BaseCommands implements CommandsInterface {
                });
    }

    /**
     * Set the non-terrestrial PLMN with lower priority than terrestrial networks.
     * MCC/MNC broadcast by the non-terrestrial networks may not be included in OPLMNwACT file on
     * SIM profile. Acquisition of satellite based system is lower priority to terrestrial
     * networks. UE shall make all attempts to acquire terrestrial service prior to camping on
     * satellite LTE service.
     *
     * @param result Message that will be sent back to the requester.
     * @param plmnList The list of roaming PLMN used for connecting to satellite networks.
     */
    @Override
    public void setSatellitePlmn(Message result, List<String> plmnList) {
        RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class);
        if (!canMakeRequest("setSatellitePlmn", networkProxy, result,
                RADIO_HAL_VERSION_2_2)) {
            return;
        }

        RILRequest rr = obtainRequest(RIL_REQUEST_SET_SATELLITE_PLMN, result,
                mRILDefaultWorkSource);

        if (RILJ_LOGD) {
            riljLog(rr.serialString() + "> " + RILUtils.requestToString(rr.mRequest)
                    + " plmnList=" + plmnList);
        }

        radioServiceInvokeHelper(HAL_SERVICE_NETWORK, rr, "setSatellitePlmn", () -> {
            networkProxy.setSatellitePlmn(rr.mSerial, plmnList);
        });
    }

    //***** Private Methods
    /**
     * This is a helper function to be called when an indication callback is called for any radio
+3 −0
Original line number Diff line number Diff line
@@ -187,6 +187,7 @@ import static com.android.internal.telephony.RILConstants.RIL_REQUEST_SET_PREFER
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_SET_PREFERRED_NETWORK_TYPE;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_SET_RADIO_CAPABILITY;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_SET_SATELLITE_INDICATION_FILTER;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_SET_SATELLITE_PLMN;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_SET_SATELLITE_POWER;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_SET_SIGNAL_STRENGTH_REPORTING_CRITERIA;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_SET_SIM_CARD_POWER;
@@ -5173,6 +5174,8 @@ public class RILUtils {
                return "GET_MAX_CHARACTERS_PER_SATELLITE_TEXT_MESSAGE";
            case RIL_REQUEST_GET_TIME_FOR_NEXT_SATELLITE_VISIBILITY:
                return "GET_TIME_FOR_NEXT_SATELLITE_VISIBILITY";
            case RIL_REQUEST_SET_SATELLITE_PLMN:
                return "SET_SATELLITE_PLMN";
            default:
                return "<unknown request " + request + ">";
        }
Loading