Merge "Bluetooth: deal with framework going away."
diff --git a/bluetooth/1.0/default/async_fd_watcher.cc b/bluetooth/1.0/default/async_fd_watcher.cc
index a88aa27..287d007 100644
--- a/bluetooth/1.0/default/async_fd_watcher.cc
+++ b/bluetooth/1.0/default/async_fd_watcher.cc
@@ -41,12 +41,7 @@
}
// Start the thread if not started yet
- int started = tryStartThread();
- if (started != 0) {
- return started;
- }
-
- return 0;
+ return tryStartThread();
}
int AsyncFdWatcher::ConfigureTimeout(
diff --git a/nfc/1.0/default/Nfc.cpp b/nfc/1.0/default/Nfc.cpp
index 3bd5e41..c610406 100644
--- a/nfc/1.0/default/Nfc.cpp
+++ b/nfc/1.0/default/Nfc.cpp
@@ -14,12 +14,14 @@
sp<INfcClientCallback> Nfc::mCallback = NULL;
-Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device) {
+Nfc::Nfc(nfc_nci_device_t* device) : mDevice(device),
+ mDeathRecipient(new NfcDeathRecipient(this)) {
}
// Methods from ::android::hardware::nfc::V1_0::INfc follow.
::android::hardware::Return<NfcStatus> Nfc::open(const sp<INfcClientCallback>& clientCallback) {
mCallback = clientCallback;
+ mCallback->linkToDeath(mDeathRecipient, 0 /*cookie*/);
int ret = mDevice->open(mDevice, eventCallback, dataCallback);
return ret == 0 ? NfcStatus::OK : NfcStatus::FAILED;
}
@@ -39,6 +41,7 @@
}
::android::hardware::Return<NfcStatus> Nfc::close() {
+ mCallback->unlinkToDeath(mDeathRecipient);
return mDevice->close(mDevice) ? NfcStatus::FAILED : NfcStatus::OK;
}
diff --git a/nfc/1.0/default/Nfc.h b/nfc/1.0/default/Nfc.h
index 13004a5..d8787fd 100644
--- a/nfc/1.0/default/Nfc.h
+++ b/nfc/1.0/default/Nfc.h
@@ -19,6 +19,16 @@
using ::android::hardware::hidl_string;
using ::android::sp;
+struct NfcDeathRecipient : hidl_death_recipient {
+ NfcDeathRecipient(const sp<INfc> nfc) : mNfc(nfc) {
+ }
+
+ virtual void serviceDied(uint64_t /*cookie*/, const wp<::android::hidl::base::V1_0::IBase>& /*who*/) {
+ mNfc->close();
+ }
+ sp<INfc> mNfc;
+};
+
struct Nfc : public INfc {
Nfc(nfc_nci_device_t* device);
::android::hardware::Return<NfcStatus> open(const sp<INfcClientCallback>& clientCallback) override;
@@ -31,21 +41,28 @@
static void eventCallback(uint8_t event, uint8_t status) {
if (mCallback != nullptr) {
- mCallback->sendEvent(
+ auto ret = mCallback->sendEvent(
(::android::hardware::nfc::V1_0::NfcEvent) event,
(::android::hardware::nfc::V1_0::NfcStatus) status);
+ if (!ret.isOk()) {
+ ALOGW("Failed to call back into NFC process.");
+ }
}
}
static void dataCallback(uint16_t data_len, uint8_t* p_data) {
hidl_vec<uint8_t> data;
data.setToExternal(p_data, data_len);
if (mCallback != nullptr) {
- mCallback->sendData(data);
+ auto ret = mCallback->sendData(data);
+ if (!ret.isOk()) {
+ ALOGW("Failed to call back into NFC process.");
+ }
}
}
private:
static sp<INfcClientCallback> mCallback;
const nfc_nci_device_t* mDevice;
+ sp<NfcDeathRecipient> mDeathRecipient;
};
extern "C" INfc* HIDL_FETCH_INfc(const char* name);
diff --git a/radio/1.0/IRadio.hal b/radio/1.0/IRadio.hal
index bda7d65..baa4df6 100644
--- a/radio/1.0/IRadio.hal
+++ b/radio/1.0/IRadio.hal
@@ -726,26 +726,6 @@
oneway getDataCallList(int32_t serial);
/*
- * This request is reserved for OEM-specific uses. It passes raw byte arrays back and forth.
- *
- * @param serial Serial number of request.
- * @param data data passed as raw bytes to oem
- *
- * Response function is IRadioResponse.sendOemRadioRequestRawResponse()
- */
- oneway sendOemRadioRequestRaw(int32_t serial, vec<uint8_t> data);
-
- /*
- * This request is reserved for OEM-specific uses. It passes strings back and forth.
- *
- * @param serial Serial number of request.
- * @param data data passed as strings to oem
- *
- * Response function is IRadioResponse.sendOemRadioRequestStringsResponse()
- */
- oneway sendOemRadioRequestStrings(int32_t serial, vec<string> data);
-
- /*
* Indicates the current state of the screen. When the screen is off, the
* Radio must notify the baseband to suppress certain notifications (eg,
* signal strength and changes in LAC/CID or BID/SID/NID/latitude/longitude)
diff --git a/radio/1.0/IRadioIndication.hal b/radio/1.0/IRadioIndication.hal
index 81ac13a..0b95821 100644
--- a/radio/1.0/IRadioIndication.hal
+++ b/radio/1.0/IRadioIndication.hal
@@ -293,14 +293,6 @@
oneway cdmaInfoRec(RadioIndicationType type, CdmaInformationRecords records);
/*
- * This is for OEM specific use.
- *
- * @param type Type of radio indication
- * @param data data passed as raw bytes
- */
- oneway oemHookRaw(RadioIndicationType type, vec<uint8_t> data);
-
- /*
* Indicates that nework doesn't have in-band information, need to
* play out-band tone.
*
diff --git a/radio/1.0/IRadioResponse.hal b/radio/1.0/IRadioResponse.hal
index 637f697..11a1d03 100644
--- a/radio/1.0/IRadioResponse.hal
+++ b/radio/1.0/IRadioResponse.hal
@@ -923,30 +923,6 @@
/*
* @param info Response info struct containing response type, serial no. and error
- * @param data data returned by oem
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:INVALID_ARGUMENTS
- * RadioError:OEM_ERROR_X
- */
- oneway sendOemRilRequestRawResponse(RadioResponseInfo info, vec<uint8_t> data);
-
- /*
- * @param info Response info struct containing response type, serial no. and error
- * @param data data returned by oem
- *
- * Valid errors returned:
- * RadioError:NONE
- * RadioError:RADIO_NOT_AVAILABLE
- * RadioError:INVALID_ARGUMENTS
- * RadioError:OEM_ERROR_X
- */
- oneway sendOemRilRequestStringsResponse(RadioResponseInfo info, vec<string> data);
-
- /*
- * @param info Response info struct containing response type, serial no. and error
*
* Valid errors returned:
* RadioError:NONE
diff --git a/radio/1.0/vts/RadioResponse.vts b/radio/1.0/vts/RadioResponse.vts
deleted file mode 100644
index a6c5223..0000000
--- a/radio/1.0/vts/RadioResponse.vts
+++ /dev/null
@@ -1,1415 +0,0 @@
-component_class: HAL_HIDL
-component_type_version: 1.0
-component_name: "IRadioResponse"
-
-package: "android.hardware.radio"
-
-import: "android.hardware.radio@1.0::types"
-import: "android.hidl.base@1.0::types"
-
-interface: {
- api: {
- name: "getIccCardStatusResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::CardStatus"
- }
- }
-
- api: {
- name: "supplyIccPinForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "supplyIccPukForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "supplyIccPin2ForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "supplyIccPuk2ForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "changeIccPinForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "changeIccPin2ForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "supplyNetworkDepersonalizationResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "getCurrentCallsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::Call"
- }
- }
- }
-
- api: {
- name: "dialResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getIMSIForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "hangupConnectionResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "hangupWaitingOrBackgroundResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "hangupForegroundResumeBackgroundResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "switchWaitingOrHoldingAndActiveResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "conferenceResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "rejectCallResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getLastCallFailCauseResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::LastCallFailCauseInfo"
- }
- }
-
- api: {
- name: "getSignalStrengthResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::SignalStrength"
- }
- }
-
- api: {
- name: "getVoiceRegistrationStateResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::VoiceRegStateResult"
- }
- }
-
- api: {
- name: "getDataRegistrationStateResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::DataRegStateResult"
- }
- }
-
- api: {
- name: "getOperatorResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "setRadioPowerResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "sendDtmfResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "sendSmsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::SendSmsResult"
- }
- }
-
- api: {
- name: "sendSMSExpectMoreResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::SendSmsResult"
- }
- }
-
- api: {
- name: "setupDataCallResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::SetupDataCallResult"
- }
- }
-
- api: {
- name: "iccIOForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
- }
- }
-
- api: {
- name: "sendUssdResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "cancelPendingUssdResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getClirResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "setClirResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getCallForwardStatusResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::CallForwardInfo"
- }
- }
- }
-
- api: {
- name: "setCallForwardResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getCallWaitingResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "setCallWaitingResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "acknowledgeLastIncomingGsmSmsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "acceptCallResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "deactivateDataCallResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getFacilityLockForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "setFacilityLockForAppResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "setBarringPasswordResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getNetworkSelectionModeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- }
-
- api: {
- name: "setNetworkSelectionModeAutomaticResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setNetworkSelectionModeManualResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getAvailableNetworksResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::OperatorInfo"
- }
- }
- }
-
- api: {
- name: "startDtmfResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "stopDtmfResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getBasebandVersionResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "separateConnectionResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setMuteResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getMuteResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- }
-
- api: {
- name: "getClipResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::radio::V1_0::ClipStatus"
- }
- }
-
- api: {
- name: "getDataCallListResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::SetupDataCallResult"
- }
- }
- }
-
- api: {
- name: "sendOemRilRequestRawResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "uint8_t"
- }
- }
- }
-
- api: {
- name: "sendOemRilRequestStringsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRING
- }
- }
- }
-
- api: {
- name: "sendScreenStateResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setSuppServiceNotificationsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "writeSmsToSimResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "deleteSmsOnSimResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setBandModeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getAvailableBandModesResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::radio::V1_0::RadioBandMode"
- }
- }
- }
-
- api: {
- name: "sendEnvelopeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "sendTerminalResponseToSimResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "handleStkCallSetupRequestFromSimResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "explicitCallTransferResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setPreferredNetworkTypeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getPreferredNetworkTypeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::radio::V1_0::PreferredNetworkType"
- }
- }
-
- api: {
- name: "getNeighboringCidsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::NeighboringCell"
- }
- }
- }
-
- api: {
- name: "setLocationUpdatesResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setCdmaSubscriptionSourceResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setCdmaRoamingPreferenceResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getCdmaRoamingPreferenceResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::radio::V1_0::CdmaRoamingType"
- }
- }
-
- api: {
- name: "setTTYModeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getTTYModeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::radio::V1_0::TtyMode"
- }
- }
-
- api: {
- name: "setPreferredVoicePrivacyResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getPreferredVoicePrivacyResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- }
-
- api: {
- name: "sendCDMAFeatureCodeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "sendBurstDtmfResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "sendCdmaSmsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::SendSmsResult"
- }
- }
-
- api: {
- name: "acknowledgeLastIncomingCdmaSmsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getGsmBroadcastConfigResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::GsmBroadcastSmsConfigInfo"
- }
- }
- }
-
- api: {
- name: "setGsmBroadcastConfigResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setGsmBroadcastActivationResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getCdmaBroadcastConfigResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::CdmaBroadcastSmsConfigInfo"
- }
- }
- }
-
- api: {
- name: "setCdmaBroadcastConfigResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setCdmaBroadcastActivationResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getCDMASubscriptionResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "writeSmsToRuimResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "uint32_t"
- }
- }
-
- api: {
- name: "deleteSmsOnRuimResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getDeviceIdentityResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "exitEmergencyCallbackModeResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getSmscAddressResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "setSmscAddressResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "reportSmsMemoryStatusResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "reportStkServiceIsRunningResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getCdmaSubscriptionSourceResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::radio::V1_0::CdmaSubscriptionSource"
- }
- }
-
- api: {
- name: "requestIsimAuthenticationResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "acknowledgeIncomingGsmSmsWithPduResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "sendEnvelopeWithStatusResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
- }
- }
-
- api: {
- name: "getVoiceRadioTechnologyResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::radio::V1_0::RadioTechnology"
- }
- }
-
- api: {
- name: "getCellInfoListResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::CellInfo"
- }
- }
- }
-
- api: {
- name: "setCellInfoListRateResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setInitialAttachApnResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getImsRegistrationStateResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- arg: {
- type: TYPE_ENUM
- predefined_type: "::android::hardware::radio::V1_0::RadioTechnologyFamily"
- }
- }
-
- api: {
- name: "sendImsSmsResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::SendSmsResult"
- }
- }
-
- api: {
- name: "iccTransmitApduBasicChannelResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
- }
- }
-
- api: {
- name: "iccOpenLogicalChannelResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_SCALAR
- scalar_type: "int8_t"
- }
- }
- }
-
- api: {
- name: "iccCloseLogicalChannelResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "iccTransmitApduLogicalChannelResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
- }
- }
-
- api: {
- name: "nvReadItemResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRING
- }
- }
-
- api: {
- name: "nvWriteItemResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "nvWriteCdmaPrlResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "nvResetConfigResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setUiccSubscriptionResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setDataAllowedResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getHardwareConfigResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_VECTOR
- vector_value: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::HardwareConfig"
- }
- }
- }
-
- api: {
- name: "requestIccSimAuthenticationResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::IccIoResult"
- }
- }
-
- api: {
- name: "setDataProfileResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "requestShutdownResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "getRadioCapabilityResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioCapability"
- }
- }
-
- api: {
- name: "setRadioCapabilityResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioCapability"
- }
- }
-
- api: {
- name: "startLceServiceResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::LceStatusInfo"
- }
- }
-
- api: {
- name: "stopLceServiceResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::LceStatusInfo"
- }
- }
-
- api: {
- name: "pullLceDataResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::LceDataInfo"
- }
- }
-
- api: {
- name: "getModemActivityInfoResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::ActivityStatsInfo"
- }
- }
-
- api: {
- name: "setAllowedCarriersResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
- api: {
- name: "getAllowedCarriersResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- arg: {
- type: TYPE_SCALAR
- scalar_type: "bool_t"
- }
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::CarrierRestrictions"
- }
- }
-
- api: {
- name: "sendDeviceStateResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setIndicationFilterResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "setSimCardPowerResponse"
- arg: {
- type: TYPE_STRUCT
- predefined_type: "::android::hardware::radio::V1_0::RadioResponseInfo"
- }
- }
-
- api: {
- name: "acknowledgeRequest"
- arg: {
- type: TYPE_SCALAR
- scalar_type: "int32_t"
- }
- }
-
-}
diff --git a/radio/Android.bp b/radio/Android.bp
index 33f70eb..8bda000 100644
--- a/radio/Android.bp
+++ b/radio/Android.bp
@@ -2,4 +2,5 @@
subdirs = [
"1.0",
"1.0/vts/functional",
+ "deprecated/1.0",
]
diff --git a/radio/deprecated/1.0/Android.bp b/radio/deprecated/1.0/Android.bp
new file mode 100644
index 0000000..f8a9c64
--- /dev/null
+++ b/radio/deprecated/1.0/Android.bp
@@ -0,0 +1,75 @@
+// This file is autogenerated by hidl-gen. Do not edit manually.
+
+filegroup {
+ name: "android.hardware.radio.deprecated@1.0_hal",
+ srcs: [
+ "IOemHook.hal",
+ "IOemHookIndication.hal",
+ "IOemHookResponse.hal",
+ ],
+}
+
+genrule {
+ name: "android.hardware.radio.deprecated@1.0_genc++",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
+ srcs: [
+ ":android.hardware.radio.deprecated@1.0_hal",
+ ],
+ out: [
+ "android/hardware/radio/deprecated/1.0/OemHookAll.cpp",
+ "android/hardware/radio/deprecated/1.0/OemHookIndicationAll.cpp",
+ "android/hardware/radio/deprecated/1.0/OemHookResponseAll.cpp",
+ ],
+}
+
+genrule {
+ name: "android.hardware.radio.deprecated@1.0_genc++_headers",
+ tools: ["hidl-gen"],
+ cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.radio.deprecated@1.0",
+ srcs: [
+ ":android.hardware.radio.deprecated@1.0_hal",
+ ],
+ out: [
+ "android/hardware/radio/deprecated/1.0/IOemHook.h",
+ "android/hardware/radio/deprecated/1.0/IHwOemHook.h",
+ "android/hardware/radio/deprecated/1.0/BnHwOemHook.h",
+ "android/hardware/radio/deprecated/1.0/BpHwOemHook.h",
+ "android/hardware/radio/deprecated/1.0/BsOemHook.h",
+ "android/hardware/radio/deprecated/1.0/IOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/IHwOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/BnHwOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/BpHwOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/BsOemHookIndication.h",
+ "android/hardware/radio/deprecated/1.0/IOemHookResponse.h",
+ "android/hardware/radio/deprecated/1.0/IHwOemHookResponse.h",
+ "android/hardware/radio/deprecated/1.0/BnHwOemHookResponse.h",
+ "android/hardware/radio/deprecated/1.0/BpHwOemHookResponse.h",
+ "android/hardware/radio/deprecated/1.0/BsOemHookResponse.h",
+ ],
+}
+
+cc_library_shared {
+ name: "android.hardware.radio.deprecated@1.0",
+ generated_sources: ["android.hardware.radio.deprecated@1.0_genc++"],
+ generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
+ export_generated_headers: ["android.hardware.radio.deprecated@1.0_genc++_headers"],
+ shared_libs: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "liblog",
+ "libutils",
+ "libcutils",
+ "android.hardware.radio@1.0",
+ "android.hidl.base@1.0",
+ ],
+ export_shared_lib_headers: [
+ "libhidlbase",
+ "libhidltransport",
+ "libhwbinder",
+ "libutils",
+ "android.hardware.radio@1.0",
+ "android.hidl.base@1.0",
+ ],
+}
diff --git a/radio/deprecated/1.0/Android.mk b/radio/deprecated/1.0/Android.mk
new file mode 100644
index 0000000..4cce633
--- /dev/null
+++ b/radio/deprecated/1.0/Android.mk
@@ -0,0 +1,162 @@
+# This file is autogenerated by hidl-gen. Do not edit manually.
+
+LOCAL_PATH := $(call my-dir)
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.radio.deprecated@1.0-java
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_JAVA_LIBRARIES := \
+ android.hardware.radio@1.0-java \
+ android.hidl.base@1.0-java \
+
+
+#
+# Build IOemHook.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHook.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHook.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.radio.deprecated@1.0::IOemHook
+
+$(GEN): $(LOCAL_PATH)/IOemHook.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookIndication.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookIndication.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.radio.deprecated@1.0::IOemHookIndication
+
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookResponse.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookResponse.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.radio.deprecated@1.0::IOemHookResponse
+
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_JAVA_LIBRARY)
+
+
+################################################################################
+
+include $(CLEAR_VARS)
+LOCAL_MODULE := android.hardware.radio.deprecated@1.0-java-static
+LOCAL_MODULE_CLASS := JAVA_LIBRARIES
+
+intermediates := $(call local-generated-sources-dir, COMMON)
+
+HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
+
+LOCAL_STATIC_JAVA_LIBRARIES := \
+ android.hardware.radio@1.0-java-static \
+ android.hidl.base@1.0-java-static \
+
+
+#
+# Build IOemHook.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHook.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHook.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_DEPS += $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.radio.deprecated@1.0::IOemHook
+
+$(GEN): $(LOCAL_PATH)/IOemHook.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookIndication.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookIndication.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookIndication.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.radio.deprecated@1.0::IOemHookIndication
+
+$(GEN): $(LOCAL_PATH)/IOemHookIndication.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
+# Build IOemHookResponse.hal
+#
+GEN := $(intermediates)/android/hardware/radio/deprecated/V1_0/IOemHookResponse.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/IOemHookResponse.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.radio.deprecated@1.0::IOemHookResponse
+
+$(GEN): $(LOCAL_PATH)/IOemHookResponse.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+include $(BUILD_STATIC_JAVA_LIBRARY)
+
+
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
diff --git a/radio/deprecated/1.0/IOemHook.hal b/radio/deprecated/1.0/IOemHook.hal
new file mode 100644
index 0000000..2b6db65
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHook.hal
@@ -0,0 +1,57 @@
+/**
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import IOemHookResponse;
+import IOemHookIndication;
+
+/**
+ * This interface has APIs for OEM-specific use-cases.
+ * USE OF THIS INTERFACE IS DISCOURATED. IT IS PRESENT ONLY FOR BACKWARD COMPATIBILITY AND WILL BE
+ * REMOVED IN O (ATTEMPTING TO REMOVE IT IN O, BUT IF NOT IN O WILL BE REMOVED IN P).
+ * ALSO NOTE THAT FRAMEWORK EXPECTS THE SERVICE IMPLEMENTING THIS INTERFACE TO RESIDE
+ * IN THE SAME PROCESS AS IRADIO SERVICE.
+ */
+interface IOemHook {
+ /**
+ * Set response functions for oem hook requests & oem hook indications.
+ *
+ * @param oemHookResponse Object containing response functions
+ * @param oemHookIndication Object containing oem hook indications
+ */
+ setResponseFunctions(IOemHookResponse oemHookResponse, IOemHookIndication oemHookIndication);
+
+ /**
+ * This request passes raw byte arrays between framework and vendor code.
+ *
+ * @param serial Serial number of request.
+ * @param data data passed as raw bytes
+ *
+ * Response function is IOemHookResponse.sendRequestRawResponse()
+ */
+ oneway sendRequestRaw(int32_t serial, vec<uint8_t> data);
+
+ /**
+ * This request passes strings between framework and vendor code.
+ *
+ * @param serial Serial number of request.
+ * @param data data passed as strings
+ *
+ * Response function is IOemHookResponse.sendRequestStringsResponse()
+ */
+ oneway sendRequestStrings(int32_t serial, vec<string> data);
+};
\ No newline at end of file
diff --git a/radio/deprecated/1.0/IOemHookIndication.hal b/radio/deprecated/1.0/IOemHookIndication.hal
new file mode 100644
index 0000000..936779f
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHookIndication.hal
@@ -0,0 +1,32 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import android.hardware.radio@1.0::types;
+
+/*
+ * Interface declaring unsolicited oem hook indications.
+ */
+interface IOemHookIndication {
+ /*
+ * This is for OEM specific use.
+ *
+ * @param type Type of radio indication
+ * @param data data passed as raw bytes
+ */
+ oneway oemHookRaw(RadioIndicationType type, vec<uint8_t> data);
+};
\ No newline at end of file
diff --git a/radio/deprecated/1.0/IOemHookResponse.hal b/radio/deprecated/1.0/IOemHookResponse.hal
new file mode 100644
index 0000000..4e49acc
--- /dev/null
+++ b/radio/deprecated/1.0/IOemHookResponse.hal
@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2017 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.hardware.radio.deprecated@1.0;
+
+import android.hardware.radio@1.0::types;
+
+/*
+ * Interface declaring response functions to solicited oem hook requests.
+ * Response functions defined in this interface are as per following convention:
+ * <xyz>Response is response to IOemHook.<xyz>
+ */
+interface IOemHookResponse {
+ /*
+ * @param info Response info struct containing response type, serial no. and error
+ * @param data data returned by oem
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:OEM_ERROR_X
+ */
+ oneway sendRequestRawResponse(RadioResponseInfo info, vec<uint8_t> data);
+
+ /*
+ * @param info Response info struct containing response type, serial no. and error
+ * @param data data returned by oem
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:OEM_ERROR_X
+ */
+ oneway sendRequestStringsResponse(RadioResponseInfo info, vec<string> data);
+};
\ No newline at end of file
diff --git a/renderscript/1.0/Android.bp b/renderscript/1.0/Android.bp
index 5ae7027..cce34e7 100644
--- a/renderscript/1.0/Android.bp
+++ b/renderscript/1.0/Android.bp
@@ -1,13 +1,20 @@
// This file is autogenerated by hidl-gen. Do not edit manually.
+filegroup {
+ name: "android.hardware.renderscript@1.0_hal",
+ srcs: [
+ "types.hal",
+ "IContext.hal",
+ "IDevice.hal",
+ ],
+}
+
genrule {
name: "android.hardware.renderscript@1.0_genc++",
tools: ["hidl-gen"],
cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
srcs: [
- "types.hal",
- "IContext.hal",
- "IDevice.hal",
+ ":android.hardware.renderscript@1.0_hal",
],
out: [
"android/hardware/renderscript/1.0/types.cpp",
@@ -21,9 +28,7 @@
tools: ["hidl-gen"],
cmd: "$(location hidl-gen) -o $(genDir) -Lc++ -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0",
srcs: [
- "types.hal",
- "IContext.hal",
- "IDevice.hal",
+ ":android.hardware.renderscript@1.0_hal",
],
out: [
"android/hardware/renderscript/1.0/types.h",
@@ -62,114 +67,3 @@
"android.hidl.base@1.0",
],
}
-
-genrule {
- name: "android.hardware.renderscript.vts.driver@1.0_genc++",
- tools: ["hidl-gen", "vtsc"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
- srcs: [
- "types.hal",
- "IContext.hal",
- "IDevice.hal",
- ],
- out: [
- "android/hardware/renderscript/1.0/types.vts.cpp",
- "android/hardware/renderscript/1.0/Context.vts.cpp",
- "android/hardware/renderscript/1.0/Device.vts.cpp",
- ],
-}
-
-genrule {
- name: "android.hardware.renderscript.vts.driver@1.0_genc++_headers",
- tools: ["hidl-gen", "vtsc"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mDRIVER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
- srcs: [
- "types.hal",
- "IContext.hal",
- "IDevice.hal",
- ],
- out: [
- "android/hardware/renderscript/1.0/types.vts.h",
- "android/hardware/renderscript/1.0/Context.vts.h",
- "android/hardware/renderscript/1.0/Device.vts.h",
- ],
-}
-
-cc_library_shared {
- name: "android.hardware.renderscript.vts.driver@1.0",
- generated_sources: ["android.hardware.renderscript.vts.driver@1.0_genc++"],
- generated_headers: ["android.hardware.renderscript.vts.driver@1.0_genc++_headers"],
- export_generated_headers: ["android.hardware.renderscript.vts.driver@1.0_genc++_headers"],
- shared_libs: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "liblog",
- "libutils",
- "libcutils",
- "libvts_common",
- "libvts_datatype",
- "libvts_measurement",
- "libvts_multidevice_proto",
- "libcamera_metadata",
- "libprotobuf-cpp-full",
- "android.hidl.base@1.0",
- "android.hardware.renderscript@1.0",
- ],
- export_shared_lib_headers: [
- "libhidlbase",
- "libhidltransport",
- "libhwbinder",
- "libutils",
- "android.hidl.base@1.0",
- ],
-}
-
-genrule {
- name: "android.hardware.renderscript@1.0-vts.profiler_genc++",
- tools: ["hidl-gen", "vtsc"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tSOURCE -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
- srcs: [
- "types.hal",
- "IContext.hal",
- "IDevice.hal",
- ],
- out: [
- "android/hardware/renderscript/1.0/types.vts.cpp",
- "android/hardware/renderscript/1.0/Context.vts.cpp",
- "android/hardware/renderscript/1.0/Device.vts.cpp",
- ],
-}
-
-genrule {
- name: "android.hardware.renderscript@1.0-vts.profiler_genc++_headers",
- tools: ["hidl-gen", "vtsc"],
- cmd: "$(location hidl-gen) -o $(genDir) -Lvts -randroid.hardware:hardware/interfaces -randroid.hidl:system/libhidl/transport android.hardware.renderscript@1.0 && $(location vtsc) -mPROFILER -tHEADER -b$(genDir) android/hardware/renderscript/1.0/ $(genDir)/android/hardware/renderscript/1.0/",
- srcs: [
- "types.hal",
- "IContext.hal",
- "IDevice.hal",
- ],
- out: [
- "android/hardware/renderscript/1.0/types.vts.h",
- "android/hardware/renderscript/1.0/Context.vts.h",
- "android/hardware/renderscript/1.0/Device.vts.h",
- ],
-}
-
-cc_library_shared {
- name: "android.hardware.renderscript@1.0-vts.profiler",
- generated_sources: ["android.hardware.renderscript@1.0-vts.profiler_genc++"],
- generated_headers: ["android.hardware.renderscript@1.0-vts.profiler_genc++_headers"],
- export_generated_headers: ["android.hardware.renderscript@1.0-vts.profiler_genc++_headers"],
- shared_libs: [
- "libbase",
- "libhidlbase",
- "libhidltransport",
- "libvts_profiling",
- "libvts_multidevice_proto",
- "libprotobuf-cpp-full",
- "android.hidl.base@1.0",
- "android.hardware.renderscript@1.0",
- ],
-}
diff --git a/renderscript/1.0/Android.mk b/renderscript/1.0/Android.mk
index 3a7babd..5c3a37d 100644
--- a/renderscript/1.0/Android.mk
+++ b/renderscript/1.0/Android.mk
@@ -8,7 +8,7 @@
LOCAL_MODULE := android.hardware.renderscript@1.0-java-constants
LOCAL_MODULE_CLASS := JAVA_LIBRARIES
-intermediates := $(local-generated-sources-dir)
+intermediates := $(call local-generated-sources-dir, COMMON)
HIDL := $(HOST_OUT_EXECUTABLES)/hidl-gen$(HOST_EXECUTABLE_SUFFIX)
#
diff --git a/tests/versioning/2.3/Android.bp b/tests/versioning/2.3/Android.bp
index 3cc2076..122c484 100644
--- a/tests/versioning/2.3/Android.bp
+++ b/tests/versioning/2.3/Android.bp
@@ -63,7 +63,6 @@
"libcutils",
"android.hardware.tests.versioning@1.0",
"android.hardware.tests.versioning@2.2",
- "android.hidl.base@1.0",
],
export_shared_lib_headers: [
"libhidlbase",
@@ -72,6 +71,5 @@
"libutils",
"android.hardware.tests.versioning@1.0",
"android.hardware.tests.versioning@2.2",
- "android.hidl.base@1.0",
],
}
diff --git a/wifi/1.0/Android.mk b/wifi/1.0/Android.mk
index 4476b14..fa6ef6c 100644
--- a/wifi/1.0/Android.mk
+++ b/wifi/1.0/Android.mk
@@ -796,25 +796,6 @@
LOCAL_GENERATED_SOURCES += $(GEN)
#
-# Build types.hal (StaBackgroundScanBand)
-#
-GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBand.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.wifi@1.0::types.StaBackgroundScanBand
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
# Build types.hal (StaBackgroundScanBucketEventReportSchemeMask)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBucketEventReportSchemeMask.java
@@ -1081,6 +1062,25 @@
LOCAL_GENERATED_SOURCES += $(GEN)
#
+# Build types.hal (WifiBand)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiBand.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.wifi@1.0::types.WifiBand
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
# Build types.hal (WifiChannelInfo)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiChannelInfo.java
@@ -2599,25 +2599,6 @@
LOCAL_GENERATED_SOURCES += $(GEN)
#
-# Build types.hal (StaBackgroundScanBand)
-#
-GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBand.java
-$(GEN): $(HIDL)
-$(GEN): PRIVATE_HIDL := $(HIDL)
-$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
-$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
-$(GEN): PRIVATE_CUSTOM_TOOL = \
- $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
- -Ljava \
- -randroid.hardware:hardware/interfaces \
- -randroid.hidl:system/libhidl/transport \
- android.hardware.wifi@1.0::types.StaBackgroundScanBand
-
-$(GEN): $(LOCAL_PATH)/types.hal
- $(transform-generated-source)
-LOCAL_GENERATED_SOURCES += $(GEN)
-
-#
# Build types.hal (StaBackgroundScanBucketEventReportSchemeMask)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/StaBackgroundScanBucketEventReportSchemeMask.java
@@ -2884,6 +2865,25 @@
LOCAL_GENERATED_SOURCES += $(GEN)
#
+# Build types.hal (WifiBand)
+#
+GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiBand.java
+$(GEN): $(HIDL)
+$(GEN): PRIVATE_HIDL := $(HIDL)
+$(GEN): PRIVATE_DEPS := $(LOCAL_PATH)/types.hal
+$(GEN): PRIVATE_OUTPUT_DIR := $(intermediates)
+$(GEN): PRIVATE_CUSTOM_TOOL = \
+ $(PRIVATE_HIDL) -o $(PRIVATE_OUTPUT_DIR) \
+ -Ljava \
+ -randroid.hardware:hardware/interfaces \
+ -randroid.hidl:system/libhidl/transport \
+ android.hardware.wifi@1.0::types.WifiBand
+
+$(GEN): $(LOCAL_PATH)/types.hal
+ $(transform-generated-source)
+LOCAL_GENERATED_SOURCES += $(GEN)
+
+#
# Build types.hal (WifiChannelInfo)
#
GEN := $(intermediates)/android/hardware/wifi/V1_0/WifiChannelInfo.java
diff --git a/wifi/1.0/IWifiApIface.hal b/wifi/1.0/IWifiApIface.hal
index aeca2cd..1f6ee7c 100644
--- a/wifi/1.0/IWifiApIface.hal
+++ b/wifi/1.0/IWifiApIface.hal
@@ -33,4 +33,21 @@
* |WifiStatusCode.FAILURE_IFACE_INVALID|
*/
setCountryCode(int8_t[2] code) generates (WifiStatus status);
+
+ /**
+ * Used to query the list of valid frequencies (depending on country code set)
+ * for the provided band.
+ *
+ * @param band Band for which the frequency list is being generated.
+ * @return status WifiStatus of the operation.
+ * Possible status codes:
+ * |WifiStatusCode.SUCCESS|,
+ * |WifiStatusCode.ERROR_WIFI_IFACE_INVALID|,
+ * |WifiStatusCode.ERROR_NOT_SUPPORTED|,
+ * |WifiStatusCode.ERROR_NOT_AVAILABLE|,
+ * |WifiStatusCode.ERROR_UNKNOWN|
+ * @return frequencies vector of valid frequencies for the provided band.
+ */
+ getValidFrequenciesForBand(WifiBand band)
+ generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
};
diff --git a/wifi/1.0/IWifiStaIface.hal b/wifi/1.0/IWifiStaIface.hal
index 96dc54a..43c3126 100644
--- a/wifi/1.0/IWifiStaIface.hal
+++ b/wifi/1.0/IWifiStaIface.hal
@@ -180,7 +180,6 @@
* for the provided band. These channels may be specifed in the
* |BackgroundScanBucketParameters.frequenciesInMhz| for a background scan
* request.
- * Must fail if |StaIfaceCapabilityMask.BACKGROUND_SCAN| is not set.
*
* @param band Band for which the frequency list is being generated.
* @return status WifiStatus of the operation.
@@ -192,7 +191,7 @@
* |WifiStatusCode.ERROR_UNKNOWN|
* @return frequencies vector of valid frequencies for the provided band.
*/
- getValidFrequenciesForBackgroundScan(StaBackgroundScanBand band)
+ getValidFrequenciesForBand(WifiBand band)
generates (WifiStatus status, vec<WifiChannelInMhz> frequencies);
/**
diff --git a/wifi/1.0/default/hidl_callback_util.h b/wifi/1.0/default/hidl_callback_util.h
index a1c6819..7136279 100644
--- a/wifi/1.0/default/hidl_callback_util.h
+++ b/wifi/1.0/default/hidl_callback_util.h
@@ -82,14 +82,12 @@
return true;
}
- const std::set<android::sp<CallbackType>> getCallbacks() {
- return cb_set_;
- }
+ const std::set<android::sp<CallbackType>> getCallbacks() { return cb_set_; }
// Death notification for callbacks.
void onObjectDeath(uint64_t cookie) {
- CallbackType *cb = reinterpret_cast<CallbackType*>(cookie);
- const auto& iter = cb_set_.find(cb);
+ CallbackType* cb = reinterpret_cast<CallbackType*>(cookie);
+ const auto& iter = cb_set_.find(cb);
if (iter == cb_set_.end()) {
LOG(ERROR) << "Unknown callback death notification received";
return;
diff --git a/wifi/1.0/default/hidl_struct_util.cpp b/wifi/1.0/default/hidl_struct_util.cpp
index 7dbc8eb..c7b8c41 100644
--- a/wifi/1.0/default/hidl_struct_util.cpp
+++ b/wifi/1.0/default/hidl_struct_util.cpp
@@ -306,21 +306,21 @@
return true;
}
-legacy_hal::wifi_band convertHidlGscanBandToLegacy(StaBackgroundScanBand band) {
+legacy_hal::wifi_band convertHidlWifiBandToLegacy(WifiBand band) {
switch (band) {
- case StaBackgroundScanBand::BAND_UNSPECIFIED:
+ case WifiBand::BAND_UNSPECIFIED:
return legacy_hal::WIFI_BAND_UNSPECIFIED;
- case StaBackgroundScanBand::BAND_24GHZ:
+ case WifiBand::BAND_24GHZ:
return legacy_hal::WIFI_BAND_BG;
- case StaBackgroundScanBand::BAND_5GHZ:
+ case WifiBand::BAND_5GHZ:
return legacy_hal::WIFI_BAND_A;
- case StaBackgroundScanBand::BAND_5GHZ_DFS:
+ case WifiBand::BAND_5GHZ_DFS:
return legacy_hal::WIFI_BAND_A_DFS;
- case StaBackgroundScanBand::BAND_5GHZ_WITH_DFS:
+ case WifiBand::BAND_5GHZ_WITH_DFS:
return legacy_hal::WIFI_BAND_A_WITH_DFS;
- case StaBackgroundScanBand::BAND_24GHZ_5GHZ:
+ case WifiBand::BAND_24GHZ_5GHZ:
return legacy_hal::WIFI_BAND_ABG;
- case StaBackgroundScanBand::BAND_24GHZ_5GHZ_WITH_DFS:
+ case WifiBand::BAND_24GHZ_5GHZ_WITH_DFS:
return legacy_hal::WIFI_BAND_ABG_WITH_DFS;
};
CHECK(false);
diff --git a/wifi/1.0/default/hidl_struct_util.h b/wifi/1.0/default/hidl_struct_util.h
index 490dcae..41e97b3 100644
--- a/wifi/1.0/default/hidl_struct_util.h
+++ b/wifi/1.0/default/hidl_struct_util.h
@@ -60,7 +60,7 @@
bool convertLegacyGscanCapabilitiesToHidl(
const legacy_hal::wifi_gscan_capabilities& legacy_caps,
StaBackgroundScanCapabilities* hidl_caps);
-legacy_hal::wifi_band convertHidlGscanBandToLegacy(StaBackgroundScanBand band);
+legacy_hal::wifi_band convertHidlWifiBandToLegacy(WifiBand band);
bool convertHidlGscanParamsToLegacy(
const StaBackgroundScanParameters& hidl_scan_params,
legacy_hal::wifi_scan_cmd_params* legacy_scan_params);
diff --git a/wifi/1.0/default/wifi_ap_iface.cpp b/wifi/1.0/default/wifi_ap_iface.cpp
index 1a8b31d..e2beec2 100644
--- a/wifi/1.0/default/wifi_ap_iface.cpp
+++ b/wifi/1.0/default/wifi_ap_iface.cpp
@@ -17,6 +17,7 @@
#include <android-base/logging.h>
#include "hidl_return_util.h"
+#include "hidl_struct_util.h"
#include "wifi_ap_iface.h"
#include "wifi_status_util.h"
@@ -64,6 +65,15 @@
code);
}
+Return<void> WifiApIface::getValidFrequenciesForBand(
+ WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) {
+ return validateAndCall(this,
+ WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+ &WifiApIface::getValidFrequenciesForBandInternal,
+ hidl_status_cb,
+ band);
+}
+
std::pair<WifiStatus, std::string> WifiApIface::getNameInternal() {
return {createWifiStatus(WifiStatusCode::SUCCESS), ifname_};
}
@@ -79,6 +89,16 @@
return createWifiStatusFromLegacyError(legacy_status);
}
+std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
+WifiApIface::getValidFrequenciesForBandInternal(WifiBand band) {
+ static_assert(sizeof(WifiChannelInMhz) == sizeof(uint32_t), "Size mismatch");
+ legacy_hal::wifi_error legacy_status;
+ std::vector<uint32_t> valid_frequencies;
+ std::tie(legacy_status, valid_frequencies) =
+ legacy_hal_.lock()->getValidFrequenciesForBand(
+ hidl_struct_util::convertHidlWifiBandToLegacy(band));
+ return {createWifiStatusFromLegacyError(legacy_status), valid_frequencies};
+}
} // namespace implementation
} // namespace V1_0
} // namespace wifi
diff --git a/wifi/1.0/default/wifi_ap_iface.h b/wifi/1.0/default/wifi_ap_iface.h
index 23d6435..efc168a 100644
--- a/wifi/1.0/default/wifi_ap_iface.h
+++ b/wifi/1.0/default/wifi_ap_iface.h
@@ -44,12 +44,16 @@
Return<void> getType(getType_cb hidl_status_cb) override;
Return<void> setCountryCode(const hidl_array<int8_t, 2>& code,
setCountryCode_cb hidl_status_cb) override;
+ Return<void> getValidFrequenciesForBand(
+ WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) override;
private:
// Corresponding worker functions for the HIDL methods.
std::pair<WifiStatus, std::string> getNameInternal();
std::pair<WifiStatus, IfaceType> getTypeInternal();
WifiStatus setCountryCodeInternal(const std::array<int8_t, 2>& code);
+ std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
+ getValidFrequenciesForBandInternal(WifiBand band);
std::string ifname_;
std::weak_ptr<legacy_hal::WifiLegacyHal> legacy_hal_;
diff --git a/wifi/1.0/default/wifi_legacy_hal.cpp b/wifi/1.0/default/wifi_legacy_hal.cpp
index 7d58254..7390b65 100644
--- a/wifi/1.0/default/wifi_legacy_hal.cpp
+++ b/wifi/1.0/default/wifi_legacy_hal.cpp
@@ -562,7 +562,7 @@
}
std::pair<wifi_error, std::vector<uint32_t>>
-WifiLegacyHal::getValidFrequenciesForGscan(wifi_band band) {
+WifiLegacyHal::getValidFrequenciesForBand(wifi_band band) {
static_assert(sizeof(uint32_t) >= sizeof(wifi_channel),
"Wifi Channel cannot be represented in output");
std::vector<uint32_t> freqs;
diff --git a/wifi/1.0/default/wifi_legacy_hal.h b/wifi/1.0/default/wifi_legacy_hal.h
index ed020b0..c8fd5bd 100644
--- a/wifi/1.0/default/wifi_legacy_hal.h
+++ b/wifi/1.0/default/wifi_legacy_hal.h
@@ -175,7 +175,7 @@
const on_gscan_results_callback& on_results_callback,
const on_gscan_full_result_callback& on_full_result_callback);
wifi_error stopGscan(wifi_request_id id);
- std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForGscan(
+ std::pair<wifi_error, std::vector<uint32_t>> getValidFrequenciesForBand(
wifi_band band);
// Link layer stats functions.
wifi_error enableLinkLayerStats(bool debug);
diff --git a/wifi/1.0/default/wifi_sta_iface.cpp b/wifi/1.0/default/wifi_sta_iface.cpp
index 55c9cf7..0c84102 100644
--- a/wifi/1.0/default/wifi_sta_iface.cpp
+++ b/wifi/1.0/default/wifi_sta_iface.cpp
@@ -106,15 +106,13 @@
hidl_status_cb);
}
-Return<void> WifiStaIface::getValidFrequenciesForBackgroundScan(
- StaBackgroundScanBand band,
- getValidFrequenciesForBackgroundScan_cb hidl_status_cb) {
- return validateAndCall(
- this,
- WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
- &WifiStaIface::getValidFrequenciesForBackgroundScanInternal,
- hidl_status_cb,
- band);
+Return<void> WifiStaIface::getValidFrequenciesForBand(
+ WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) {
+ return validateAndCall(this,
+ WifiStatusCode::ERROR_WIFI_IFACE_INVALID,
+ &WifiStaIface::getValidFrequenciesForBandInternal,
+ hidl_status_cb,
+ band);
}
Return<void> WifiStaIface::startBackgroundScan(
@@ -363,14 +361,13 @@
}
std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
-WifiStaIface::getValidFrequenciesForBackgroundScanInternal(
- StaBackgroundScanBand band) {
+WifiStaIface::getValidFrequenciesForBandInternal(WifiBand band) {
static_assert(sizeof(WifiChannelInMhz) == sizeof(uint32_t), "Size mismatch");
legacy_hal::wifi_error legacy_status;
std::vector<uint32_t> valid_frequencies;
std::tie(legacy_status, valid_frequencies) =
- legacy_hal_.lock()->getValidFrequenciesForGscan(
- hidl_struct_util::convertHidlGscanBandToLegacy(band));
+ legacy_hal_.lock()->getValidFrequenciesForBand(
+ hidl_struct_util::convertHidlWifiBandToLegacy(band));
return {createWifiStatusFromLegacyError(legacy_status), valid_frequencies};
}
diff --git a/wifi/1.0/default/wifi_sta_iface.h b/wifi/1.0/default/wifi_sta_iface.h
index 5f0ffe9..08faa2f 100644
--- a/wifi/1.0/default/wifi_sta_iface.h
+++ b/wifi/1.0/default/wifi_sta_iface.h
@@ -57,9 +57,8 @@
installApfPacketFilter_cb hidl_status_cb) override;
Return<void> getBackgroundScanCapabilities(
getBackgroundScanCapabilities_cb hidl_status_cb) override;
- Return<void> getValidFrequenciesForBackgroundScan(
- StaBackgroundScanBand band,
- getValidFrequenciesForBackgroundScan_cb hidl_status_cb) override;
+ Return<void> getValidFrequenciesForBand(
+ WifiBand band, getValidFrequenciesForBand_cb hidl_status_cb) override;
Return<void> startBackgroundScan(
uint32_t cmd_id,
const StaBackgroundScanParameters& params,
@@ -119,7 +118,7 @@
std::pair<WifiStatus, StaBackgroundScanCapabilities>
getBackgroundScanCapabilitiesInternal();
std::pair<WifiStatus, std::vector<WifiChannelInMhz>>
- getValidFrequenciesForBackgroundScanInternal(StaBackgroundScanBand band);
+ getValidFrequenciesForBandInternal(WifiBand band);
WifiStatus startBackgroundScanInternal(
uint32_t cmd_id, const StaBackgroundScanParameters& params);
WifiStatus stopBackgroundScanInternal(uint32_t cmd_id);
diff --git a/wifi/1.0/types.hal b/wifi/1.0/types.hal
index 30e8943..a843ce8 100644
--- a/wifi/1.0/types.hal
+++ b/wifi/1.0/types.hal
@@ -210,6 +210,37 @@
};
/**
+ * Wifi bands defined in 80211 spec.
+ */
+enum WifiBand : uint32_t {
+ BAND_UNSPECIFIED = 0,
+ /**
+ * 2.4 GHz.
+ */
+ BAND_24GHZ = 1,
+ /**
+ * 5 GHz without DFS.
+ */
+ BAND_5GHZ = 2,
+ /**
+ * 5 GHz DFS only.
+ */
+ BAND_5GHZ_DFS = 4,
+ /**
+ * 5 GHz with DFS.
+ */
+ BAND_5GHZ_WITH_DFS = 6,
+ /**
+ * 2.4 GHz + 5 GHz; no DFS.
+ */
+ BAND_24GHZ_5GHZ = 3,
+ /**
+ * 2.4 GHz + 5 GHz with DFS
+ */
+ BAND_24GHZ_5GHZ_WITH_DFS = 7
+};
+
+/**
* STA specific types.
* TODO(b/32159498): Move to a separate sta_types.hal.
*/
@@ -251,37 +282,6 @@
};
/**
- * Bands that can be specified in Background scan requests.
- */
-enum StaBackgroundScanBand : uint32_t {
- BAND_UNSPECIFIED = 0,
- /**
- * 2.4 GHz.
- */
- BAND_24GHZ = 1,
- /**
- * 5 GHz without DFS.
- */
- BAND_5GHZ = 2,
- /**
- * 5 GHz DFS only.
- */
- BAND_5GHZ_DFS = 4,
- /**
- * 5 GHz with DFS.
- */
- BAND_5GHZ_WITH_DFS = 6,
- /**
- * 2.4 GHz + 5 GHz; no DFS.
- */
- BAND_24GHZ_5GHZ = 3,
- /**
- * 2.4 GHz + 5 GHz with DFS
- */
- BAND_24GHZ_5GHZ_WITH_DFS = 7
-};
-
-/**
* Mask of event reporting schemes that can be specified in background scan
* requests.
*/
@@ -311,12 +311,13 @@
*/
struct StaBackgroundScanBucketParameters {
/**
- * Bands to scan or 0 if frequencies list must be used instead.
+ * Bands to scan or |BAND_UNSPECIFIED| if frequencies list must be used
+ * instead.
*/
- StaBackgroundScanBand band;
+ WifiBand band;
/**
* Channel frequencies (in Mhz) to scan if |band| is set to
- * |UNSPECIFIED|.
+ * |BAND_UNSPECIFIED|.
*/
vec<WifiChannelInMhz> frequencies;
/**
@@ -1009,22 +1010,12 @@
bool securityEnabledInNdp;
/**
* Specifies whether or not there is a ranging requirement in this discovery session.
- * Ranging is only performed if all other match criteria with the peer are met.
+ * Ranging is only performed if all other match criteria with the peer are met. Ranging must
+ * be performed if both peers in the discovery session (publisher and subscriber) set this
+ * flag to true. Otherwise, if either peer sets this flag to false, ranging must not be performed
+ * and must not impact discovery decisions.
* Note: specifying that ranging is required also implies that this device must automatically
* accept ranging requests from peers.
- * Solicited Publisher + Passive Subscriber:
- * Publisher/Subscriber:
- * true/true: ranging performed.
- * true/false: subscriber doesn't require ranging (match if all other criteria met). I.e.
- * publisher requiring range doesn't gate subscriber matching.
- * false/true: subscriber tries ranging but publisher refuses (no match).
- * false/false: ranging isn't attempted and doesn't impact match.
- * Unsolicited Publisher + Active Subscriber:
- * Publisher/Subscriber:
- * true/true: ranging performed.
- * true/false: publisher attempts ranging but subscriber doesn't allow - no match.
- * false/true: publisher doesn't attempt ranging, should not impact match.
- * false/false: ranging isn't attempted and doesn't impact match.
* NAN Spec: Service Discovery Extension Attribute (SDEA) / Control / Ranging Require.
*/
bool rangingRequired;
diff --git a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
index b16fb39..37e8d3f 100644
--- a/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
+++ b/wifi/supplicant/1.0/ISupplicantStaNetwork.hal
@@ -434,9 +434,11 @@
setEapClientCert(string path) generates (SupplicantStatus status);
/**
- * Set EAP private key file path for this network.
+ * Set EAP private key Id for this network.
+ * This is used if private key operations for EAP-TLS are performed
+ * using a smartcard.
*
- * @param path value to set.
+ * @param id value to set.
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
@@ -444,7 +446,7 @@
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
*/
- setEapPrivateKey(string path) generates (SupplicantStatus status);
+ setEapPrivateKeyId(string id) generates (SupplicantStatus status);
/**
* Set EAP subject match for this network.
@@ -810,16 +812,16 @@
getEapClientCert() generates (SupplicantStatus status, string path);
/**
- * Get EAP private key file path set for this network.
+ * Get EAP private key Id set for this network.
*
* @return status Status of the operation.
* Possible status codes:
* |SupplicantStatusCode.SUCCESS|,
* |SupplicantStatusCode.FAILURE_UNKNOWN|,
* |SupplicantStatusCode.FAILURE_NETWORK_INVALID|
- * @return path value set.
+ * @return id value set.
*/
- getEapPrivateKey() generates (SupplicantStatus status, string path);
+ getEapPrivateKeyId() generates (SupplicantStatus status, string id);
/**
* Get EAP subject match set for this network.