| #ifndef HIDL_GENERATED_ANDROID_HARDWARE_SENSORS_V2_1_BSSENSORS_H |
| #define HIDL_GENERATED_ANDROID_HARDWARE_SENSORS_V2_1_BSSENSORS_H |
| |
| #include <android-base/macros.h> |
| #include <cutils/trace.h> |
| #include <future> |
| #include <android/hardware/sensors/2.1/ISensors.h> |
| |
| #include <hidl/HidlPassthroughSupport.h> |
| #include <hidl/TaskRunner.h> |
| namespace android { |
| namespace hardware { |
| namespace sensors { |
| namespace V2_1 { |
| |
| struct BsSensors : ISensors, ::android::hardware::details::HidlInstrumentor { |
| explicit BsSensors(const ::android::sp<ISensors> impl); |
| |
| /** |
| * The pure class is what this class wraps. |
| */ |
| typedef ISensors Pure; |
| |
| typedef ::android::hardware::details::bs_tag _hidl_tag; |
| |
| // Methods from ::android::hardware::sensors::V2_0::ISensors follow. |
| ::android::hardware::Return<void> getSensorsList(getSensorsList_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::getSensorsList::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "getSensorsList", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getSensorsList([&](const auto &_hidl_out_list) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_list); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "getSensorsList", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_list); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> setOperationMode(::android::hardware::sensors::V1_0::OperationMode mode) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::setOperationMode::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&mode); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "setOperationMode", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->setOperationMode(mode); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "setOperationMode", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> activate(int32_t sensorHandle, bool enabled) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::activate::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&sensorHandle); |
| _hidl_args.push_back((void *)&enabled); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "activate", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->activate(sensorHandle, enabled); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "activate", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> initialize(const ::android::hardware::MQDescriptorSync<::android::hardware::sensors::V1_0::Event>& eventQueueDescriptor, const ::android::hardware::MQDescriptorSync<uint32_t>& wakeLockDescriptor, const ::android::sp<::android::hardware::sensors::V2_0::ISensorsCallback>& sensorsCallback) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::initialize::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&eventQueueDescriptor); |
| _hidl_args.push_back((void *)&wakeLockDescriptor); |
| _hidl_args.push_back((void *)&sensorsCallback); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "initialize", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::sp<::android::hardware::sensors::V2_0::ISensorsCallback> _hidl_wrapped_sensorsCallback; |
| if (sensorsCallback != nullptr && !sensorsCallback->isRemote()) { |
| _hidl_wrapped_sensorsCallback = ::android::hardware::details::wrapPassthrough(sensorsCallback); |
| if (_hidl_wrapped_sensorsCallback == nullptr) { |
| return ::android::hardware::Status::fromExceptionCode( |
| ::android::hardware::Status::EX_TRANSACTION_FAILED, |
| "Cannot wrap passthrough interface."); |
| } |
| } else { |
| _hidl_wrapped_sensorsCallback = sensorsCallback; |
| } |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->initialize(eventQueueDescriptor, wakeLockDescriptor, _hidl_wrapped_sensorsCallback); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "initialize", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> batch(int32_t sensorHandle, int64_t samplingPeriodNs, int64_t maxReportLatencyNs) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::batch::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&sensorHandle); |
| _hidl_args.push_back((void *)&samplingPeriodNs); |
| _hidl_args.push_back((void *)&maxReportLatencyNs); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "batch", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->batch(sensorHandle, samplingPeriodNs, maxReportLatencyNs); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "batch", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> flush(int32_t sensorHandle) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::flush::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&sensorHandle); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "flush", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->flush(sensorHandle); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "flush", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> injectSensorData(const ::android::hardware::sensors::V1_0::Event& event) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::injectSensorData::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&event); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "injectSensorData", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->injectSensorData(event); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "injectSensorData", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> registerDirectChannel(const ::android::hardware::sensors::V1_0::SharedMemInfo& mem, registerDirectChannel_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::registerDirectChannel::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&mem); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "registerDirectChannel", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->registerDirectChannel(mem, [&](const auto &_hidl_out_result, const auto &_hidl_out_channelHandle) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| _hidl_args.push_back((void *)&_hidl_out_channelHandle); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "registerDirectChannel", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_result, _hidl_out_channelHandle); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> unregisterDirectChannel(int32_t channelHandle) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::unregisterDirectChannel::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&channelHandle); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "unregisterDirectChannel", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->unregisterDirectChannel(channelHandle); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "unregisterDirectChannel", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> configDirectReport(int32_t sensorHandle, int32_t channelHandle, ::android::hardware::sensors::V1_0::RateLevel rate, configDirectReport_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::configDirectReport::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&sensorHandle); |
| _hidl_args.push_back((void *)&channelHandle); |
| _hidl_args.push_back((void *)&rate); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.0", "ISensors", "configDirectReport", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->configDirectReport(sensorHandle, channelHandle, rate, [&](const auto &_hidl_out_result, const auto &_hidl_out_reportToken) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| _hidl_args.push_back((void *)&_hidl_out_reportToken); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.0", "ISensors", "configDirectReport", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_result, _hidl_out_reportToken); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| |
| // Methods from ::android::hardware::sensors::V2_1::ISensors follow. |
| ::android::hardware::Return<void> getSensorsList_2_1(getSensorsList_2_1_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::getSensorsList_2_1::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.1", "ISensors", "getSensorsList_2_1", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getSensorsList_2_1([&](const auto &_hidl_out_list) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_list); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.1", "ISensors", "getSensorsList_2_1", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_list); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> initialize_2_1(const ::android::hardware::MQDescriptorSync<::android::hardware::sensors::V2_1::Event>& eventQueueDescriptor, const ::android::hardware::MQDescriptorSync<uint32_t>& wakeLockDescriptor, const ::android::sp<::android::hardware::sensors::V2_1::ISensorsCallback>& sensorsCallback) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::initialize_2_1::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&eventQueueDescriptor); |
| _hidl_args.push_back((void *)&wakeLockDescriptor); |
| _hidl_args.push_back((void *)&sensorsCallback); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.1", "ISensors", "initialize_2_1", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::sp<::android::hardware::sensors::V2_1::ISensorsCallback> _hidl_wrapped_sensorsCallback; |
| if (sensorsCallback != nullptr && !sensorsCallback->isRemote()) { |
| _hidl_wrapped_sensorsCallback = ::android::hardware::details::wrapPassthrough(sensorsCallback); |
| if (_hidl_wrapped_sensorsCallback == nullptr) { |
| return ::android::hardware::Status::fromExceptionCode( |
| ::android::hardware::Status::EX_TRANSACTION_FAILED, |
| "Cannot wrap passthrough interface."); |
| } |
| } else { |
| _hidl_wrapped_sensorsCallback = sensorsCallback; |
| } |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->initialize_2_1(eventQueueDescriptor, wakeLockDescriptor, _hidl_wrapped_sensorsCallback); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.1", "ISensors", "initialize_2_1", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<::android::hardware::sensors::V1_0::Result> injectSensorData_2_1(const ::android::hardware::sensors::V2_1::Event& event) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::injectSensorData_2_1::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&event); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hardware.sensors", "2.1", "ISensors", "injectSensorData_2_1", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->injectSensorData_2_1(event); |
| |
| ::android::hardware::sensors::V1_0::Result _hidl_out_result = _hidl_return; |
| (void) _hidl_out_result; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_result); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hardware.sensors", "2.1", "ISensors", "injectSensorData_2_1", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| |
| // Methods from ::android::hidl::base::V1_0::IBase follow. |
| ::android::hardware::Return<void> interfaceChain(interfaceChain_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::interfaceChain::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->interfaceChain([&](const auto &_hidl_out_descriptors) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_descriptors); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceChain", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_descriptors); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> debug(const ::android::hardware::hidl_handle& fd, const ::android::hardware::hidl_vec<::android::hardware::hidl_string>& options) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::debug::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&fd); |
| _hidl_args.push_back((void *)&options); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->debug(fd, options); |
| |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "debug", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> interfaceDescriptor(interfaceDescriptor_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::interfaceDescriptor::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->interfaceDescriptor([&](const auto &_hidl_out_descriptor) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_descriptor); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "interfaceDescriptor", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_descriptor); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> getHashChain(getHashChain_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::getHashChain::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getHashChain([&](const auto &_hidl_out_hashchain) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_hashchain); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getHashChain", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_hashchain); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> setHALInstrumentation() override { |
| configureInstrumentation(); |
| return ::android::hardware::Void(); |
| } |
| |
| ::android::hardware::Return<bool> linkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient, uint64_t cookie) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::linkToDeath::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&recipient); |
| _hidl_args.push_back((void *)&cookie); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->linkToDeath(recipient, cookie); |
| |
| bool _hidl_out_success = _hidl_return; |
| (void) _hidl_out_success; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_success); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "linkToDeath", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> ping() override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::ping::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->ping(); |
| |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "ping", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> getDebugInfo(getDebugInfo_cb _hidl_cb) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::getDebugInfo::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->getDebugInfo([&](const auto &_hidl_out_info) { |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_info); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "getDebugInfo", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| _hidl_cb(_hidl_out_info); |
| }); |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| ::android::hardware::Return<void> notifySyspropsChanged() override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::notifySyspropsChanged::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = addOnewayTask([mImpl = this->mImpl |
| #ifdef __ANDROID_DEBUGGABLE__ |
| , mEnableInstrumentation = this->mEnableInstrumentation, mInstrumentationCallbacks = this->mInstrumentationCallbacks |
| #endif // __ANDROID_DEBUGGABLE__ |
| ] { |
| mImpl->notifySyspropsChanged(); |
| |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "notifySyspropsChanged", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| }); |
| return _hidl_return; |
| } |
| ::android::hardware::Return<bool> unlinkToDeath(const ::android::sp<::android::hardware::hidl_death_recipient>& recipient) override { |
| atrace_begin(ATRACE_TAG_HAL, "HIDL::ISensors::unlinkToDeath::passthrough"); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&recipient); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_ENTRY, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| ::android::hardware::Status _hidl_error = ::android::hardware::Status::ok(); |
| auto _hidl_return = mImpl->unlinkToDeath(recipient); |
| |
| bool _hidl_out_success = _hidl_return; |
| (void) _hidl_out_success; |
| atrace_end(ATRACE_TAG_HAL); |
| #ifdef __ANDROID_DEBUGGABLE__ |
| if (UNLIKELY(mEnableInstrumentation)) { |
| std::vector<void *> _hidl_args; |
| _hidl_args.push_back((void *)&_hidl_out_success); |
| for (const auto &callback: mInstrumentationCallbacks) { |
| callback(InstrumentationEvent::PASSTHROUGH_EXIT, "android.hidl.base", "1.0", "IBase", "unlinkToDeath", &_hidl_args); |
| } |
| } |
| #endif // __ANDROID_DEBUGGABLE__ |
| |
| if (!_hidl_error.isOk()) return _hidl_error; |
| return _hidl_return; |
| } |
| |
| private: |
| const ::android::sp<ISensors> mImpl; |
| ::android::hardware::details::TaskRunner mOnewayQueue; |
| |
| ::android::hardware::Return<void> addOnewayTask(std::function<void(void)>); |
| |
| }; |
| |
| } // namespace V2_1 |
| } // namespace sensors |
| } // namespace hardware |
| } // namespace android |
| |
| #endif // HIDL_GENERATED_ANDROID_HARDWARE_SENSORS_V2_1_BSSENSORS_H |