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

Commit bc58949f authored by Yomna Nasser's avatar Yomna Nasser Committed by Automerger Merge Worker
Browse files

Merge "Add isNullCipherAndIntegrityEnabled to RIL" into udc-dev am: a058dd53

parents 54affb5b a058dd53
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -2989,6 +2989,13 @@ public interface CommandsInterface {
     */
    default void setNullCipherAndIntegrityEnabled(boolean enabled, Message result) {}

    /**
     * Check whether null ciphering and/or null integrity-protected connections are allowed.
     *
     * @param result Callback message containing the success or failure status.
     */
    default void isNullCipherAndIntegrityEnabled(Message result) {}

    /**
     * Notifies the IMS call status to the modem.
     *
+35 −0
Original line number Diff line number Diff line
@@ -5669,6 +5669,41 @@ public class RIL extends BaseCommands implements CommandsInterface {
        }
    }

    /**
     * Get if null ciphering / null integrity are enabled / disabled.
     *
     * @param result Callback message containing the success or failure status.
     */
    @Override
    public void isNullCipherAndIntegrityEnabled(Message result) {
        RadioNetworkProxy networkProxy = getRadioServiceProxy(RadioNetworkProxy.class, result);
        if (networkProxy.isEmpty()) return;
        if (mHalVersion.get(HAL_SERVICE_NETWORK).greaterOrEqual(RADIO_HAL_VERSION_2_1)) {
            RILRequest rr = obtainRequest(RIL_REQUEST_IS_NULL_CIPHER_AND_INTEGRITY_ENABLED, result,
                    mRILDefaultWorkSource);

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

            try {
                networkProxy.isNullCipherAndIntegrityEnabled(rr.mSerial);
            } catch (RemoteException | RuntimeException e) {
                handleRadioProxyExceptionForRR(
                        HAL_SERVICE_NETWORK, "isNullCipherAndIntegrityEnabled", e);
            }
        } else {
            if (RILJ_LOGD) {
                Rlog.d(RILJ_LOG_TAG, "isNullCipherAndIntegrityEnabled: REQUEST_NOT_SUPPORTED");
            }
            if (result != null) {
                AsyncResult.forMessage(result, null,
                        CommandException.fromRilErrno(REQUEST_NOT_SUPPORTED));
                result.sendToTarget();
            }
        }
    }

    /**
     * {@inheritDoc}
     */
+3 −0
Original line number Diff line number Diff line
@@ -117,6 +117,7 @@ import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IMS_SEND_S
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_ISIM_AUTHENTICATION;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IS_N1_MODE_ENABLED;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IS_NR_DUAL_CONNECTIVITY_ENABLED;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IS_NULL_CIPHER_AND_INTEGRITY_ENABLED;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_IS_VONR_ENABLED;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_LAST_CALL_FAIL_CAUSE;
import static com.android.internal.telephony.RILConstants.RIL_REQUEST_LAST_DATA_CALL_FAIL_CAUSE;
@@ -5347,6 +5348,8 @@ public class RILUtils {
                return "TRIGGER_EPS_FALLBACK";
            case RIL_REQUEST_SET_NULL_CIPHER_AND_INTEGRITY_ENABLED:
                return "SET_NULL_CIPHER_AND_INTEGRITY_ENABLED";
            case RIL_REQUEST_IS_NULL_CIPHER_AND_INTEGRITY_ENABLED:
                return "IS_NULL_CIPHER_AND_INTEGRITY_ENABLED";
            case RIL_REQUEST_UPDATE_IMS_CALL_STATUS:
                return "UPDATE_IMS_CALL_STATUS";
            case RIL_REQUEST_SET_N1_MODE_ENABLED: