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

Commit 14132e60 authored by Dominik Maier's avatar Dominik Maier Committed by Android (Google) Code Review
Browse files

Merge "Add isNullCipherAndIntegrityEnabled interface"

parents f73299c6 bd8ad1b8
Loading
Loading
Loading
Loading
+24 −7
Original line number Diff line number Diff line
@@ -477,6 +477,30 @@ public class NetworkResponse extends IRadioNetworkResponse.Stub {
        RadioResponse.responseVoid(HAL_SERVICE_NETWORK, mRil, responseInfo);
    }

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

    /**
     * @param responseInfo Response info struct containing response type, serial no. and error.
     * @param isEnabled Indicates whether null cipher and integrity is enabled, indicating
     *                  potentially unencrypted communication
     */
    public void isNullCipherAndIntegrityEnabledResponse(RadioResponseInfo responseInfo,
                    boolean isEnabled) {
        RILRequest rr = mRil.processResponse(HAL_SERVICE_NETWORK, responseInfo);

        if (rr != null) {
            if (responseInfo.error == RadioError.NONE) {
                RadioResponse.sendMessageResponse(rr.mResult, isEnabled);
            }
            mRil.processResponseDone(rr, responseInfo, isEnabled);
        }
    }

    /**
     * @param responseInfo Response info struct containing response type, serial no. and error.
     * @param isEnabled Indicates whether N1 mode is enabled or not.
@@ -525,11 +549,4 @@ public class NetworkResponse extends IRadioNetworkResponse.Stub {
        return IRadioNetworkResponse.VERSION;
    }

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

}
+14 −0
Original line number Diff line number Diff line
@@ -933,6 +933,20 @@ public class RadioNetworkProxy extends RadioServiceProxy {
        // Only supported on AIDL.
    }

    /**
     * Get if null ciphering / null integrity is permitted.
     * @param serial Serial number of the request.
     * @throws RemoteException
     *
     */
    public void isNullCipherAndIntegrityEnabled(int serial) throws RemoteException {
        if (isEmpty()) return;
        if (isAidl()) {
            mNetworkProxy.isNullCipherAndIntegrityEnabled(serial);
        }
        // Only supported on AIDL.
    }

    /**
     * Checks whether N1 mode is enabled.
     *