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

Commit 642c1303 authored by Sarah Chin's avatar Sarah Chin Committed by Automerger Merge Worker
Browse files

Merge "Create getSystemSelectionChannel API" am: 4832c35c

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

Change-Id: Ida9321bffe31b09e6e6e68075591dc7943dcd26d
parents e9b4ee4f 4832c35c
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2501,6 +2501,13 @@ public interface CommandsInterface {
    default void setSystemSelectionChannels(@NonNull List<RadioAccessSpecifier> specifiers,
            Message onComplete) {}

    /**
     * Get which bands the modem's background scan is acting on.
     *
     * @param onComplete a message to send when complete.
     */
    default void getSystemSelectionChannels(Message onComplete) {}

    /**
     * Whether uicc applications are enabled or not.
     *
+9 −0
Original line number Diff line number Diff line
@@ -2570,6 +2570,15 @@ public abstract class Phone extends Handler implements PhoneInternalInterface {
        mCi.setSystemSelectionChannels(specifiers, response);
    }

    /**
     * Get which bands the modem's background scan is acting on.
     *
     * @param response Callback message.
     */
    public void getSystemSelectionChannels(Message response) {
        mCi.getSystemSelectionChannels(response);
    }

    public void notifyDataActivity() {
        mNotifier.notifyDataActivity(this);
    }
+33 −0
Original line number Diff line number Diff line
@@ -1219,6 +1219,39 @@ public class RIL extends BaseCommands implements CommandsInterface {
        }
    }

    @Override
    public void getSystemSelectionChannels(Message onComplete) {
        IRadio radioProxy = getRadioProxy(onComplete);
        if (mRadioVersion.less(RADIO_HAL_VERSION_1_6)) {
            if (RILJ_LOGV) riljLog("getSystemSelectionChannels: not supported.");
            if (onComplete != null) {
                AsyncResult.forMessage(onComplete, null,
                        CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
                onComplete.sendToTarget();
            }
            return;
        }

        RILRequest rr = obtainRequest(RIL_REQUEST_SET_SYSTEM_SELECTION_CHANNELS, onComplete,
                mRILDefaultWorkSource);

        android.hardware.radio.V1_6.IRadio radioProxy16 =
                (android.hardware.radio.V1_6.IRadio) radioProxy;

        if (radioProxy16 != null) {
            if (RILJ_LOGD) {
                riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
                        + " getSystemSelectionChannels");
            }

            try {
                radioProxy16.getSystemSelectionChannels(rr.mSerial);
            } catch (RemoteException | RuntimeException e) {
                handleRadioProxyExceptionForRR(rr, "getSystemSelectionChannels", e);
            }
        }
    }

    @Override
    public void getModemStatus(Message result) {
        IRadio radioProxy = getRadioProxy(result);
+9 −0
Original line number Diff line number Diff line
@@ -2830,6 +2830,15 @@ public class RadioResponse extends IRadioResponse.Stub {
        responseVoid(info);
    }


    /**
     * @param info Response info struct containing response type, serial no. and error.
     */
    public void getSystemSelectionChannelsResponse(
            android.hardware.radio.V1_6.RadioResponseInfo info) {
        responseVoid_1_6(info);
    }

    /**
     * @param responseInfo Response info struct containing response type, serial no. and error.
     * @param cellIdentity CellIdentity for the barringInfos.