mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Indication API for IMEI mapping change from radio
Bug: 294127356 Test: Built successfully Change-Id: I8c95e2132bf70ec5fcae7a4c7f447e329bf3843d
This commit is contained in:
@@ -40,4 +40,5 @@ interface IRadioModemIndication {
|
||||
oneway void radioCapabilityIndication(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.modem.RadioCapability rc);
|
||||
oneway void radioStateChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.modem.RadioState radioState);
|
||||
oneway void rilConnected(in android.hardware.radio.RadioIndicationType type);
|
||||
oneway void onImeiMappingChanged(in android.hardware.radio.RadioIndicationType type, in android.hardware.radio.modem.ImeiInfo imeiInfo);
|
||||
}
|
||||
|
||||
@@ -20,6 +20,7 @@ import android.hardware.radio.RadioIndicationType;
|
||||
import android.hardware.radio.modem.HardwareConfig;
|
||||
import android.hardware.radio.modem.RadioCapability;
|
||||
import android.hardware.radio.modem.RadioState;
|
||||
import android.hardware.radio.modem.ImeiInfo;
|
||||
|
||||
/**
|
||||
* Interface declaring unsolicited radio indications for modem APIs.
|
||||
@@ -76,4 +77,12 @@ oneway interface IRadioModemIndication {
|
||||
* @param type Type of radio indication
|
||||
*/
|
||||
void rilConnected(in RadioIndicationType type);
|
||||
|
||||
/**
|
||||
* Indicates when there is a change in the IMEI mapping.
|
||||
*
|
||||
* @param type Type of radio indication
|
||||
* @param imeiInfo IMEI information
|
||||
*/
|
||||
void onImeiMappingChanged(in RadioIndicationType type, in ImeiInfo imeiInfo);
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
#include <aidl/android/hardware/radio/sim/IRadioSimIndication.h>
|
||||
#include <aidl/android/hardware/radio/voice/IRadioVoiceIndication.h>
|
||||
#include <android/hardware/radio/1.6/IRadioIndication.h>
|
||||
#include <aidl/android/hardware/radio/modem/ImeiInfo.h>
|
||||
|
||||
namespace android::hardware::radio::compat {
|
||||
|
||||
@@ -208,7 +209,8 @@ class RadioIndication : public V1_6::IRadioIndication {
|
||||
Return<void> simPhonebookRecordsReceived(
|
||||
V1_0::RadioIndicationType type, V1_6::PbReceivedStatus status,
|
||||
const hidl_vec<V1_6::PhonebookRecordInfo>& records) override;
|
||||
|
||||
Return<void> onImeiMappingChanged(V1_0::RadioIndicationType type,
|
||||
::aidl::android::hardware::radio::modem::ImeiInfo config);
|
||||
public:
|
||||
RadioIndication(std::shared_ptr<DriverContext> context);
|
||||
|
||||
|
||||
@@ -68,4 +68,11 @@ Return<void> RadioIndication::rilConnected(V1_0::RadioIndicationType type) {
|
||||
return {};
|
||||
}
|
||||
|
||||
Return<void> RadioIndication::onImeiMappingChanged(V1_0::RadioIndicationType type,
|
||||
::aidl::android::hardware::radio::modem::ImeiInfo imeiInfo) {
|
||||
LOG_CALL << type;
|
||||
modemCb()->onImeiMappingChanged(toAidl(type), imeiInfo);
|
||||
return {};
|
||||
}
|
||||
|
||||
} // namespace android::hardware::radio::compat
|
||||
|
||||
@@ -41,3 +41,8 @@ ndk::ScopedAStatus RadioModemIndication::radioStateChanged(RadioIndicationType /
|
||||
ndk::ScopedAStatus RadioModemIndication::rilConnected(RadioIndicationType /*type*/) {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
ndk::ScopedAStatus RadioModemIndication::onImeiMappingChanged(RadioIndicationType /*type*/,
|
||||
const ::aidl::android::hardware::radio::modem::ImeiInfo& /*imeiInfo*/) {
|
||||
return ndk::ScopedAStatus::ok();
|
||||
}
|
||||
|
||||
@@ -109,6 +109,9 @@ class RadioModemIndication : public BnRadioModemIndication {
|
||||
RadioState radioState) override;
|
||||
|
||||
virtual ndk::ScopedAStatus rilConnected(RadioIndicationType type) override;
|
||||
|
||||
virtual ndk::ScopedAStatus onImeiMappingChanged(RadioIndicationType type,
|
||||
const ::aidl::android::hardware::radio::modem::ImeiInfo& imeiInfo) override;
|
||||
};
|
||||
|
||||
// The main test class for Radio AIDL Modem.
|
||||
|
||||
Reference in New Issue
Block a user