mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 16:50:18 +00:00
Merge "Add methods needed for CHRE HAL to use IContextHubWrapper" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
bd8ae92147
@@ -64,6 +64,11 @@ class IContextHubCallbackWrapperBase : public VirtualLightRefBase {
|
||||
virtual Return<void> handleAppAbort(uint64_t appId, uint32_t abortCode) = 0;
|
||||
|
||||
virtual Return<void> handleAppsInfo(hidl_vec<V1_2::HubAppInfo> appInfo) = 0;
|
||||
|
||||
virtual Return<bool> linkToDeath(const sp<hidl_death_recipient>& recipient,
|
||||
uint64_t cookie) = 0;
|
||||
|
||||
virtual Return<bool> unlinkToDeath(const sp<hidl_death_recipient>& recipient) = 0;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
@@ -92,6 +97,14 @@ class ContextHubCallbackWrapper : public IContextHubCallbackWrapperBase {
|
||||
return mCallback->handleAppsInfo(convertToOldAppInfo(appInfo));
|
||||
}
|
||||
|
||||
Return<bool> linkToDeath(const sp<hidl_death_recipient>& recipient, uint64_t cookie) override {
|
||||
return mCallback->linkToDeath(recipient, cookie);
|
||||
}
|
||||
|
||||
Return<bool> unlinkToDeath(const sp<hidl_death_recipient>& recipient) override {
|
||||
return mCallback->unlinkToDeath(recipient);
|
||||
}
|
||||
|
||||
protected:
|
||||
sp<T> mCallback;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user