Merge "keymaster: provide instance name to getService()" into pi-dev
diff --git a/broadcastradio/2.0/ITunerCallback.hal b/broadcastradio/2.0/ITunerCallback.hal
index ede8350..b20a0b2 100644
--- a/broadcastradio/2.0/ITunerCallback.hal
+++ b/broadcastradio/2.0/ITunerCallback.hal
@@ -17,12 +17,14 @@
interface ITunerCallback {
/**
- * Method called by the HAL when a tuning operation fails
+ * Method called by the HAL when a tuning operation fails asynchronously
* following a step(), scan() or tune() command.
*
- * @param result OK if tune succeeded;
- * TIMEOUT in case of time out.
- * @param selector A ProgramSelector structure passed from tune(),
+ * This callback is only called when the step(), scan() or tune() command
+ * returned OK at first.
+ *
+ * @param result TIMEOUT in case of time out.
+ * @param selector A ProgramSelector structure passed from tune() call;
* empty for step() and scan().
*/
oneway onTuneFailed(Result result, ProgramSelector selector);
diff --git a/broadcastradio/2.0/types.hal b/broadcastradio/2.0/types.hal
index a9b9600..1ce61df 100644
--- a/broadcastradio/2.0/types.hal
+++ b/broadcastradio/2.0/types.hal
@@ -351,10 +351,16 @@
* related content (i.e. DAB soft-links). This field is a list of pointers
* to other programs on the program list.
*
- * Please note, that these identifiers does not have to exist on the program
+ * This is not a list of programs that carry the same content (i.e.
+ * DAB hard-links, RDS AF). Switching to programs from this list usually
+ * require user action.
+ *
+ * Please note, that these identifiers do not have to exist on the program
* list - i.e. DAB tuner may provide information on FM RDS alternatives
* despite not supporting FM RDS. If the system has multiple tuners, another
* one may have it on its list.
+ *
+ * This field is optional (can be empty).
*/
vec<ProgramIdentifier> relatedContent;
diff --git a/compatibility_matrices/compatibility_matrix.current.xml b/compatibility_matrices/compatibility_matrix.current.xml
index 467e11e..f2a93f2 100644
--- a/compatibility_matrices/compatibility_matrix.current.xml
+++ b/compatibility_matrices/compatibility_matrix.current.xml
@@ -287,6 +287,14 @@
</interface>
</hal>
<hal format="hidl" optional="true">
+ <name>android.hardware.radio.config</name>
+ <version>1.0</version>
+ <interface>
+ <name>IRadioConfig</name>
+ <instance>default</instance>
+ </interface>
+ </hal>
+ <hal format="hidl" optional="true">
<name>android.hardware.renderscript</name>
<version>1.0</version>
<interface>
diff --git a/current.txt b/current.txt
index 9965e85..06c94d9 100644
--- a/current.txt
+++ b/current.txt
@@ -250,6 +250,8 @@
c8bc853546dd55584611def2a9fa1d99f657e3366c976d2f60fe6b8aa6d2cb87 android.hardware.thermal@1.1::IThermalCallback
# ABI preserving changes to HALs during Android P
+eaeb3e4f3237430a7fdc206bffdf844713f5682990b2d49ea24392e15b5d343f android.hardware.broadcastradio@2.0::ITunerCallback
+2804120c1f8522ad15feb7695fe5eece527d399b406c671ea99618194118c316 android.hardware.broadcastradio@2.0::types
cf72ff5a52bfa4d08e9e1000cf3ab5952a2d280c7f13cdad5ab7905c08050766 android.hardware.camera.metadata@3.2::types
3902efc42097cba55f0655aa389e052ea70164e99ced1a6d1ef53dafc13f7650 android.hardware.camera.provider@2.4::ICameraProvider
6fa9804a17a8bb7923a56bd10493a5483c20007e4c9026fd04287bee7c945a8c android.hardware.gnss@1.0::IGnssCallback
@@ -343,9 +345,9 @@
7899b9305587b2d5cd74a3cc87e9090f58bf4ae74256ce3ee36e7ec011822840 android.hardware.power@1.2::types
ab132c990a62f0aca35871c092c22fb9c85d478e22124ef6a4d0a2302da76a9f android.hardware.radio@1.2::IRadio
cda752aeabaabc20486a82ac57a3dd107785c006094a349bc5e224e8aa22a17c android.hardware.radio@1.2::IRadioIndication
-c38b7e1f808565a535ff19fd4c1b512b22dfa0b58ec91dce03f72a8f1eaf6957 android.hardware.radio@1.2::IRadioResponse
+da8c6ae991c6a4b284cc6e445332e064e28ee8a09482ed5afff9d159ec6694b7 android.hardware.radio@1.2::IRadioResponse
b65332996eb39ba63300a1011404141fa59ce5c252bc17afae637be6eeca5f55 android.hardware.radio@1.2::ISap
-508ace7d4023b865b8b77c3ca3c86cc9525ef3803dc9c6b461b7c1f91b0fec00 android.hardware.radio@1.2::types
+a9361522cc97ef66209d39ba324095b2f08344054bb4d3481e803eee0480623a android.hardware.radio@1.2::types
87385469cf4409f0f33b01508e7a477cf71f2a11e466dd7e3ab5971a1baaa72b android.hardware.radio.config@1.0::IRadioConfig
228b2ee3c8c276c9f0afad2dc313ca3d6bbd9e482ddf313c7204c60ad9b636ab android.hardware.radio.config@1.0::IRadioConfigIndication
a2e9b7aa09f79426f765838174e04b6f9a3e6c8b76b923fc1705632207bad44b android.hardware.radio.config@1.0::IRadioConfigResponse
diff --git a/radio/1.2/Android.bp b/radio/1.2/Android.bp
index a9c80b7..c90a03c 100644
--- a/radio/1.2/Android.bp
+++ b/radio/1.2/Android.bp
@@ -24,6 +24,7 @@
"Call",
"CardStatus",
"CellConnectionStatus",
+ "CellIdentity",
"CellIdentityCdma",
"CellIdentityGsm",
"CellIdentityLte",
@@ -36,6 +37,7 @@
"CellInfoLte",
"CellInfoTdscdma",
"CellInfoWcdma",
+ "DataRegStateResult",
"DataRequestReason",
"IncrementalResultsPeriodicityRange",
"IndicationFilter",
@@ -48,6 +50,7 @@
"ScanIntervalRange",
"SignalStrength",
"TdscdmaSignalStrength",
+ "VoiceRegStateResult",
"WcdmaSignalStrength",
],
gen_java: true,
diff --git a/radio/1.2/IRadioResponse.hal b/radio/1.2/IRadioResponse.hal
index f26c9ec..300aa37 100644
--- a/radio/1.2/IRadioResponse.hal
+++ b/radio/1.2/IRadioResponse.hal
@@ -98,4 +98,31 @@
* RadioError:INTERNAL_ERR
*/
oneway getSignalStrengthResponse_1_2(RadioResponseInfo info, SignalStrength signalStrength);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param voiceRegResponse Current Voice registration response as defined by VoiceRegStateResult
+ * in types.hal
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ */
+ oneway getVoiceRegistrationStateResponse_1_2(RadioResponseInfo info,
+ VoiceRegStateResult voiceRegResponse);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param dataRegResponse Current Data registration response as defined by DataRegStateResult in
+ * types.hal
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NOT_PROVISIONED
+ */
+ oneway getDataRegistrationStateResponse_1_2(RadioResponseInfo info,
+ DataRegStateResult dataRegResponse);
};
diff --git a/radio/1.2/types.hal b/radio/1.2/types.hal
index 5e72b3b..4715fac 100644
--- a/radio/1.2/types.hal
+++ b/radio/1.2/types.hal
@@ -32,6 +32,7 @@
import @1.0::LteSignalStrength;
import @1.0::RadioConst;
import @1.0::RadioError;
+import @1.0::RegState;
import @1.0::SignalStrength;
import @1.0::TdScdmaSignalStrength;
import @1.0::TimeStampType;
@@ -462,3 +463,129 @@
TdScdmaSignalStrength tdScdma;
WcdmaSignalStrength wcdma;
};
+
+struct CellIdentity {
+ /**
+ * Cell type for selecting from union CellInfo.
+ * Only one of the below vectors must be of size 1 based on a
+ * valid CellInfoType and others must be of size 0.
+ * If cell info type is NONE, then all the vectors must be of size 0.
+ */
+ CellInfoType cellInfoType;
+ vec<CellIdentityGsm> cellIdentityGsm;
+ vec<CellIdentityWcdma> cellIdentityWcdma;
+ vec<CellIdentityCdma> cellIdentityCdma;
+ vec<CellIdentityLte> cellIdentityLte;
+ vec<CellIdentityTdscdma> cellIdentityTdscdma;
+};
+
+struct VoiceRegStateResult {
+ /**
+ * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
+ * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
+ * UNKNOWN, REG_ROAMING defined in RegState
+ */
+ RegState regState;
+ /**
+ * Indicates the available voice radio technology, valid values as
+ * defined by RadioTechnology.
+ */
+ int32_t rat;
+ /**
+ * concurrent services support indicator. if registered on a CDMA system.
+ * false - Concurrent services not supported,
+ * true - Concurrent services supported
+ */
+ bool cssSupported;
+ /**
+ * TSB-58 Roaming Indicator if registered on a CDMA or EVDO system or -1 if not.
+ * Valid values are 0-255.
+ */
+ int32_t roamingIndicator;
+ /**
+ * Indicates whether the current system is in the PRL if registered on a CDMA or EVDO system
+ * or -1 if not. 0=not in the PRL, 1=in the PRL
+ */
+ int32_t systemIsInPrl;
+ /**
+ * Default Roaming Indicator from the PRL if registered on a CDMA or EVDO system or -1 if not.
+ * Valid values are 0-255.
+ */
+ int32_t defaultRoamingIndicator;
+ /**
+ * reasonForDenial if registration state is 3
+ * (Registration denied) this is an enumerated reason why
+ * registration was denied. See 3GPP TS 24.008,
+ * 10.5.3.6 and Annex G.
+ * 0 - General
+ * 1 - Authentication Failure
+ * 2 - IMSI unknown in HLR
+ * 3 - Illegal MS
+ * 4 - Illegal ME
+ * 5 - PLMN not allowed
+ * 6 - Location area not allowed
+ * 7 - Roaming not allowed
+ * 8 - No Suitable Cells in this Location Area
+ * 9 - Network failure
+ * 10 - Persistent location update reject
+ * 11 - PLMN not allowed
+ * 12 - Location area not allowed
+ * 13 - Roaming not allowed in this Location Area
+ * 15 - No Suitable Cells in this Location Area
+ * 17 - Network Failure
+ * 20 - MAC Failure
+ * 21 - Sync Failure
+ * 22 - Congestion
+ * 23 - GSM Authentication unacceptable
+ * 25 - Not Authorized for this CSG
+ * 32 - Service option not supported
+ * 33 - Requested service option not subscribed
+ * 34 - Service option temporarily out of order
+ * 38 - Call cannot be identified
+ * 48-63 - Retry upon entry into a new cell
+ * 95 - Semantically incorrect message
+ * 96 - Invalid mandatory information
+ * 97 - Message type non-existent or not implemented
+ * 98 - Message type not compatible with protocol state
+ * 99 - Information element non-existent or not implemented
+ * 100 - Conditional IE error
+ * 101 - Message not compatible with protocol state
+ * 111 - Protocol error, unspecified
+ */
+ int32_t reasonForDenial;
+
+ CellIdentity cellIdentity;
+};
+
+struct DataRegStateResult {
+ /**
+ * Valid reg states are NOT_REG_MT_NOT_SEARCHING_OP,
+ * REG_HOME, NOT_REG_MT_SEARCHING_OP, REG_DENIED,
+ * UNKNOWN, REG_ROAMING defined in RegState
+ */
+ RegState regState;
+ /**
+ * Indicates the available data radio technology,
+ * valid values as defined by RadioTechnology.
+ */
+ int32_t rat;
+ /**
+ * If registration state is 3 (Registration
+ * denied) this is an enumerated reason why
+ * registration was denied. See 3GPP TS 24.008,
+ * Annex G.6 "Additional cause codes for GMM".
+ * 7 == GPRS services not allowed
+ * 8 == GPRS services and non-GPRS services not allowed
+ * 9 == MS identity cannot be derived by the network
+ * 10 == Implicitly detached
+ * 14 == GPRS services not allowed in this PLMN
+ * 16 == MSC temporarily not reachable
+ * 40 == No PDP context activated
+ */
+ int32_t reasonDataDenied;
+ /**
+ * The maximum number of simultaneous Data Calls must be established using setupDataCall().
+ */
+ int32_t maxDataCalls;
+ CellIdentity cellIdentity;
+};
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
index 34a87e1..ee130f8 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.2/vts/functional/radio_hidl_hal_api.cpp
@@ -673,3 +673,40 @@
ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
{RadioError::NONE, RadioError::NO_NETWORK_FOUND}));
}
+
+/*
+ * Test IRadio.getVoiceRegistrationState() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_2, getVoiceRegistrationState) {
+ int serial = GetRandomSerialNumber();
+
+ Return<void> res = radio_v1_2->getVoiceRegistrationState(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial);
+
+ ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n",
+ toString(radioRsp_v1_2->rspInfo.error).c_str());
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_2->rspInfo.error,
+ {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE}));
+}
+
+/*
+ * Test IRadio.getDataRegistrationState() for the response returned.
+ */
+TEST_F(RadioHidlTest_v1_2, getDataRegistrationState) {
+ int serial = GetRandomSerialNumber();
+
+ Return<void> res = radio_v1_2->getDataRegistrationState(serial);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_2->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_2->rspInfo.serial);
+
+ ALOGI("getVoiceRegistrationStateResponse_1_2, rspInfo.error = %s\n",
+ toString(radioRsp_v1_2->rspInfo.error).c_str());
+ ASSERT_TRUE(CheckAnyOfErrors(
+ radioRsp_v1_2->rspInfo.error,
+ {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE, RadioError::NOT_PROVISIONED}));
+}
diff --git a/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h b/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h
index 66d8ca4..c61913c 100644
--- a/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h
+++ b/radio/1.2/vts/functional/radio_hidl_hal_utils_v1_2.h
@@ -417,6 +417,12 @@
Return<void> getCellInfoListResponse_1_2(
const RadioResponseInfo& info, const ::android::hardware::hidl_vec<CellInfo>& cellInfo);
+
+ Return<void> getVoiceRegistrationStateResponse_1_2(
+ const RadioResponseInfo& info, const V1_2::VoiceRegStateResult& voiceRegResponse);
+
+ Return<void> getDataRegistrationStateResponse_1_2(
+ const RadioResponseInfo& info, const V1_2::DataRegStateResult& dataRegResponse);
};
/* Callback class for radio indication */
diff --git a/radio/1.2/vts/functional/radio_response.cpp b/radio/1.2/vts/functional/radio_response.cpp
index d96f76b..9195689 100644
--- a/radio/1.2/vts/functional/radio_response.cpp
+++ b/radio/1.2/vts/functional/radio_response.cpp
@@ -731,4 +731,14 @@
rspInfo = info;
parent_v1_2.notify();
return Void();
-}
\ No newline at end of file
+}
+
+Return<void> RadioResponse_v1_2::getVoiceRegistrationStateResponse_1_2(
+ const RadioResponseInfo& /*info*/, const V1_2::VoiceRegStateResult& /*voiceRegResponse*/) {
+ return Void();
+}
+
+Return<void> RadioResponse_v1_2::getDataRegistrationStateResponse_1_2(
+ const RadioResponseInfo& /*info*/, const V1_2::DataRegStateResult& /*dataRegResponse*/) {
+ return Void();
+}
diff --git a/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp b/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
index 59c354f..dab81e2 100644
--- a/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
+++ b/secure_element/1.0/vts/functional/VtsHalSecureElementV1_0TargetTest.cpp
@@ -34,14 +34,13 @@
using ::android::sp;
using ::testing::VtsHalHidlTargetTestEnvBase;
-#define SELECT_ISD \
- { 0x00, 0xA4, 0x04, 0x00, 0x00 }
-#define SEQUENCE_COUNTER \
- { 0x80, 0xCA, 0x00, 0xC1, 0x00 }
-#define MANAGE_SELECT \
- { 0x00, 0xA4, 0x04, 0x00, 0x00 }
-#define CRS_AID \
- { 0xA0, 0x00, 0x00, 0x01, 0x51, 0x43, 0x52, 0x53, 0x00 }
+#define DATA_APDU \
+ { 0x00, 0x08, 0x00, 0x00, 0x00 }
+#define ANDROID_TEST_AID \
+ { \
+ 0xA0, 0x00, 0x00, 0x04, 0x76, 0x41, 0x6E, 0x64, 0x72, 0x6F, 0x69, 0x64, 0x43, 0x54, 0x53, \
+ 0x31 \
+ }
constexpr char kCallbackNameOnStateChange[] = "onStateChange";
@@ -115,7 +114,7 @@
* Check status word in the response
*/
TEST_F(SecureElementHidlTest, transmit) {
- std::vector<uint8_t> aid = CRS_AID;
+ std::vector<uint8_t> aid = ANDROID_TEST_AID;
SecureElementStatus statusReturned;
LogicalChannelResponse response;
se_->openLogicalChannel(
@@ -132,9 +131,9 @@
}
});
EXPECT_EQ(SecureElementStatus::SUCCESS, statusReturned);
- EXPECT_LE((unsigned int)3, response.selectResponse.size());
+ EXPECT_LE((unsigned int)2, response.selectResponse.size());
EXPECT_LE(1, response.channelNumber);
- std::vector<uint8_t> command = SELECT_ISD;
+ std::vector<uint8_t> command = DATA_APDU;
std::vector<uint8_t> transmitResponse;
se_->transmit(command, [&transmitResponse](std::vector<uint8_t> res) {
transmitResponse.resize(res.size());
@@ -145,16 +144,6 @@
EXPECT_LE((unsigned int)3, transmitResponse.size());
EXPECT_EQ(0x90, transmitResponse[transmitResponse.size() - 2]);
EXPECT_EQ(0x00, transmitResponse[transmitResponse.size() - 1]);
- command = SEQUENCE_COUNTER;
- se_->transmit(command, [&transmitResponse](std::vector<uint8_t> res) {
- transmitResponse.resize(res.size());
- for (size_t i = 0; i < res.size(); i++) {
- transmitResponse[i] = res[i];
- }
- });
- EXPECT_LE((unsigned int)3, transmitResponse.size());
- EXPECT_EQ(0x90, transmitResponse[transmitResponse.size() - 2]);
- EXPECT_EQ(0x00, transmitResponse[transmitResponse.size() - 1]);
EXPECT_EQ(SecureElementStatus::SUCCESS, se_->closeChannel(response.channelNumber));
}
@@ -164,7 +153,7 @@
* open channel, check the length of selectResponse and close the channel
*/
TEST_F(SecureElementHidlTest, openBasicChannel) {
- std::vector<uint8_t> aid = CRS_AID;
+ std::vector<uint8_t> aid = ANDROID_TEST_AID;
SecureElementStatus statusReturned;
std::vector<uint8_t> response;
se_->openBasicChannel(aid, 0x00,
@@ -180,17 +169,6 @@
});
if (statusReturned == SecureElementStatus::SUCCESS) {
EXPECT_LE((unsigned int)3, response.size());
- std::vector<uint8_t> command = SELECT_ISD;
- std::vector<uint8_t> transmitResponse;
- se_->transmit(command, [&transmitResponse](std::vector<uint8_t> res) {
- transmitResponse.resize(res.size());
- for (size_t i = 0; i < res.size(); i++) {
- transmitResponse[i] = res[i];
- }
- });
- EXPECT_LE((unsigned int)3, transmitResponse.size());
- EXPECT_EQ(0x90, transmitResponse[transmitResponse.size() - 2]);
- EXPECT_EQ(0x00, transmitResponse[transmitResponse.size() - 1]);
return;
}
EXPECT_EQ(SecureElementStatus::UNSUPPORTED_OPERATION, statusReturned);
@@ -221,7 +199,7 @@
* Close Channel
*/
TEST_F(SecureElementHidlTest, openCloseLogicalChannel) {
- std::vector<uint8_t> aid = CRS_AID;
+ std::vector<uint8_t> aid = ANDROID_TEST_AID;
SecureElementStatus statusReturned;
LogicalChannelResponse response;
se_->openLogicalChannel(
@@ -238,7 +216,7 @@
}
});
EXPECT_EQ(SecureElementStatus::SUCCESS, statusReturned);
- EXPECT_LE((unsigned int)3, response.selectResponse.size());
+ EXPECT_LE((unsigned int)2, response.selectResponse.size());
EXPECT_LE(1, response.channelNumber);
EXPECT_EQ(SecureElementStatus::SUCCESS, se_->closeChannel(response.channelNumber));
}