Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bd8ae921 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add methods needed for CHRE HAL to use IContextHubWrapper" into sc-dev

parents ac019db0 92b14470
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -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;
};