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

Commit 50081b28 authored by Yomna Nasser's avatar Yomna Nasser
Browse files

Add setNullCipherAndIntegrityEnabled to IRadioNetwork

Expose control of allowing/disallowing null encryption & null
integrity modes to Android.

Bug: b/237529943
Test: m
Change-Id: I5ea99cb0637e8d508d74846b3e99bf8a7f5d559a
parent e934535b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -74,4 +74,5 @@ interface IRadioNetwork {
  oneway void triggerEmergencyNetworkScan(int serial, in android.hardware.radio.network.EmergencyNetworkScanTrigger request);
  oneway void cancelEmergencyNetworkScan(int serial, boolean resetScan);
  oneway void exitEmergencyMode(in int serial);
  oneway void setNullCipherAndIntegrityEnabled(in int serial, in boolean enabled);
}
+1 −0
Original line number Diff line number Diff line
@@ -73,4 +73,5 @@ interface IRadioNetworkResponse {
  oneway void triggerEmergencyNetworkScanResponse(in android.hardware.radio.RadioResponseInfo info);
  oneway void exitEmergencyModeResponse(in android.hardware.radio.RadioResponseInfo info);
  oneway void cancelEmergencyNetworkScanResponse(in android.hardware.radio.RadioResponseInfo info);
  oneway void setNullCipherAndIntegrityEnabledResponse(in android.hardware.radio.RadioResponseInfo info);
}
+20 −0
Original line number Diff line number Diff line
@@ -482,4 +482,24 @@ oneway interface IRadioNetwork {
     * Response function is IRadioEmergencyResponse.exitEmergencyModeResponse()
     */
    void exitEmergencyMode(in int serial);

    /**
     * Set if null encryption and integrity modes are enabled. If the value of enabled is false
     * the modem must not allow any network communications with null ciphering or null integrity
     * modes. In case of an emergency call, the modem must bypass this setting.
     *
     * Null ciphering and integrity modes include (but are not limited to):
     * 2G: A5/0
     * 3G: UEA0 and UIA0
     * 4G: EEA0 and EIA0
     * 5G: NEA0 and NIA0
     *
     *
     * @param serial Serial number of the request.
     * @param enabled To allow null encryption/integrity, set to true.
     *                Otherwise, false.
     *
     * Response callback is IRadioResponse.setNullCipherAndIntegrityEnabledResponse()
     */
    void setNullCipherAndIntegrityEnabled(in int serial, in boolean enabled);
}
+10 −0
Original line number Diff line number Diff line
@@ -632,4 +632,14 @@ oneway interface IRadioNetworkResponse {
     *   RadioError:MODEM_ERR
     */
    void cancelEmergencyNetworkScanResponse(in RadioResponseInfo info);

    /**
     * @param info Response info struct containing response type, serial no. and error
     *
     * Valid errors returned:
     *   RadioError:NONE
     *   RadioError:RADIO_NOT_AVAILABLE
     *   RadioError:MODEM_ERR
     */
    void setNullCipherAndIntegrityEnabledResponse(in RadioResponseInfo info);
}
+2 −0
Original line number Diff line number Diff line
@@ -100,6 +100,8 @@ class RadioNetwork : public RadioCompatBase,
    ::ndk::ScopedAStatus cancelEmergencyNetworkScan(int32_t serial, bool resetScan) override;
    ::ndk::ScopedAStatus exitEmergencyMode(int32_t serial) override;

    ::ndk::ScopedAStatus setNullCipherAndIntegrityEnabled(int32_t serial, bool enabled) override;

  protected:
    std::shared_ptr<::aidl::android::hardware::radio::network::IRadioNetworkResponse> respond();

Loading