mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Add HAL API to optimize exiting APM for emergency call case.
am: 8f8e3d7b1c
Change-Id: I3ddc6447d9b36b5916952f854eef66e0feac331d
This commit is contained in:
@@ -605,9 +605,9 @@ a64467bae843569f0d465c5be7f0c7a5b987985b55a3ef4794dd5afc68538650 android.hardwar
|
||||
c9273429fcf98d797d3bb07fdba6f1be95bf960f9255cde169fd1ca4db85f856 android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork
|
||||
9b0a3ab6f4f74b971ed094426d8a443e29b512ff03e1ab50c07156396cdb2483 android.hardware.wifi.supplicant@1.3::types
|
||||
0e3c23f1c815469fdcdc39bc33a486817771c7c6b6e5303f2f25569499fc6c69 android.hardware.radio@1.5::types
|
||||
52abfa4c94104189fa4b2bc3132fc7c9852b7428283463b020d1a3671a4f374c android.hardware.radio@1.5::IRadio
|
||||
2bc87cde08fcd8d9a0f5d4a2b8560ea793264d94f5b763a6b22d4a63d0f3cd5a android.hardware.radio@1.5::IRadio
|
||||
3afac66f21a33bc9c4b80481c7d5540038348651d9a7d8af64ea13610af138da android.hardware.radio@1.5::IRadioIndication
|
||||
957ffbaf195aa046431ebe05a5906d215e80650e8e4933b394d6454b217ef3a9 android.hardware.radio@1.5::IRadioResponse
|
||||
67c8d90dab3f5b8f1e9cf123d6d1f9e581d382846eacc14476335798b9670885 android.hardware.radio@1.5::IRadioResponse
|
||||
55f0a15642869ec98a55ea0a5ac049d3e1a6245ff7750deb6bcb7182057eee83 android.hardware.radio.config@1.3::types
|
||||
b27ab0cd40b0b078cdcd024bfe1061c4c4c065f3519eeb9347fa359a3268a5ae android.hardware.radio.config@1.3::IRadioConfig
|
||||
742360c775313438b0f82256eac62fb5bbc76a6ae6f388573f3aa142fb2c1eea android.hardware.radio.config@1.3::IRadioConfigIndication
|
||||
|
||||
@@ -194,4 +194,31 @@ interface IRadio extends @1.4::IRadio {
|
||||
* as the input param.
|
||||
*/
|
||||
oneway setDataProfile_1_5(int32_t serial, vec<DataProfileInfo> profiles);
|
||||
|
||||
/**
|
||||
* Toggle radio on and off (for "airplane" mode)
|
||||
* If the radio is turned off/on the radio modem subsystem
|
||||
* is expected return to an initialized state. For instance,
|
||||
* any voice and data calls must be terminated and all associated
|
||||
* lists emptied.
|
||||
*
|
||||
* When setting radio power on to exit from airplane mode to place an emergency call on this
|
||||
* logical modem, powerOn, forEmergencyCall and preferredForEmergencyCall must be true. In
|
||||
* this case, this modem is optimized to scan only emergency call bands, until:
|
||||
* 1) Emergency call is completed; or
|
||||
* 2) Another setRadioPower_1_5 is issued with forEmergencyCall being false or
|
||||
* preferredForEmergencyCall being false; or
|
||||
* 3) Timeout after a long period of time.
|
||||
*
|
||||
* @param serial Serial number of request.
|
||||
* @param powerOn To turn on radio -> on = true, to turn off radio -> on = false.
|
||||
* @param forEmergencyCall To indication to radio if this request is due to emergency call.
|
||||
* No effect if powerOn is false.
|
||||
* @param preferredForEmergencyCall indicate whether the following emergency call will be sent
|
||||
* on this modem or not. No effect if forEmergencyCall is false, or powerOn is false.
|
||||
*
|
||||
* Response callback is IRadioConfigResponse. setRadioPowerResponse_1_5.
|
||||
*/
|
||||
oneway setRadioPower_1_5(int32_t serial, bool powerOn, bool forEmergencyCall,
|
||||
bool preferredForEmergencyCall);
|
||||
};
|
||||
|
||||
@@ -135,4 +135,14 @@ interface IRadioResponse extends @1.4::IRadioResponse {
|
||||
* RadioError:SIM_ABSENT
|
||||
*/
|
||||
oneway setDataProfileResponse_1_5(RadioResponseInfo info);
|
||||
|
||||
/**
|
||||
* @param info Response info struct containing response type, serial no. and error
|
||||
*
|
||||
* Valid errors returned:
|
||||
* RadioError:NONE
|
||||
* RadioError:INTERNAL_ERR
|
||||
* RadioError:INVALID_ARGUMENTS
|
||||
*/
|
||||
oneway setRadioPowerResponse_1_5(RadioResponseInfo info);
|
||||
};
|
||||
|
||||
@@ -958,3 +958,31 @@ TEST_F(RadioHidlTest_v1_5, setDataProfile_1_5) {
|
||||
{RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE}));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_F(RadioHidlTest_v1_5, setRadioPower_1_5_emergencyCall_cancalled) {
|
||||
// Set radio power to off.
|
||||
serial = GetRandomSerialNumber();
|
||||
radio_v1_5->setRadioPower_1_5(serial, false, false, false);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
|
||||
EXPECT_EQ(RadioError::NONE, radioRsp_v1_5->rspInfo.error);
|
||||
|
||||
// Set radio power to on with forEmergencyCall being true. This should put modem to only scan
|
||||
// emergency call bands.
|
||||
serial = GetRandomSerialNumber();
|
||||
radio_v1_5->setRadioPower_1_5(serial, true, true, true);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
|
||||
EXPECT_EQ(RadioError::NONE, radioRsp_v1_5->rspInfo.error);
|
||||
|
||||
// Set radio power to on with forEmergencyCall being false. This should put modem in regular
|
||||
// operation modem.
|
||||
serial = GetRandomSerialNumber();
|
||||
radio_v1_5->setRadioPower_1_5(serial, true, false, false);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
|
||||
EXPECT_EQ(RadioError::NONE, radioRsp_v1_5->rspInfo.error);
|
||||
}
|
||||
@@ -549,6 +549,8 @@ class RadioResponse_v1_5 : public ::android::hardware::radio::V1_5::IRadioRespon
|
||||
Return<void> setInitialAttachApnResponse_1_5(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> setDataProfileResponse_1_5(const RadioResponseInfo& info);
|
||||
|
||||
Return<void> setRadioPowerResponse_1_5(const RadioResponseInfo& info);
|
||||
};
|
||||
|
||||
/* Callback class for radio indication */
|
||||
|
||||
@@ -948,3 +948,9 @@ Return<void> RadioResponse_v1_5::setDataProfileResponse_1_5(const RadioResponseI
|
||||
parent_v1_5.notify(info.serial);
|
||||
return Void();
|
||||
}
|
||||
|
||||
Return<void> RadioResponse_v1_5::setRadioPowerResponse_1_5(const RadioResponseInfo& info) {
|
||||
rspInfo = info;
|
||||
parent_v1_5.notify(info.serial);
|
||||
return Void();
|
||||
}
|
||||
Reference in New Issue
Block a user