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

Commit 968c6770 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/13573762

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4bac7e9f57c5cc13cbdf683c82f0e01bb066974e
parents 34365484 bd8ae921
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;
};