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

Commit 6c77c354 authored by Anthony Stange's avatar Anthony Stange
Browse files

Add stubs for new contexthub v1.2 methods

Bug: 166846988
Test: compile
Change-Id: Iccf32340f9fa024a26832090f1e0835198546946
parent e351e3b3
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -17,12 +17,25 @@

#include <vector>

using ::android::hardware::contexthub::V1_0::Result;

namespace android {
namespace hardware {
namespace contexthub {
namespace V1_2 {
namespace implementation {

// TODO(b/166846988): Implement new methods.
Return<Result> Contexthub::registerCallback_1_2(uint32_t /* hubId */,
                                                const sp<IContexthubCallback>& /* cb */) {
    return Result::UNKNOWN_FAILURE;
}

Return<Result> Contexthub::sendMessageToHub_1_2(uint32_t /* hubId */,
                                                const ContextHubMsg& /* msg */) {
    return Result::UNKNOWN_FAILURE;
}

Return<void> Contexthub::onSettingChanged(SettingV1_1 /*setting*/, SettingValue /*newValue*/) {
    return Void();
}
+7 −0
Original line number Diff line number Diff line
@@ -27,10 +27,17 @@ namespace implementation {

class Contexthub
    : public ::android::hardware::contexthub::V1_X::implementation::ContextHub<IContexthub> {
    using ContextHubMsg = ::android::hardware::contexthub::V1_2::ContextHubMsg;
    using IContexthubCallback = ::android::hardware::contexthub::V1_2::IContexthubCallback;
    using Result = ::android::hardware::contexthub::V1_0::Result;
    using SettingValue = ::android::hardware::contexthub::V1_1::SettingValue;
    using SettingV1_1 = ::android::hardware::contexthub::V1_1::Setting;

  public:
    Return<Result> registerCallback_1_2(uint32_t hubId, const sp<IContexthubCallback>& cb) override;

    Return<Result> sendMessageToHub_1_2(uint32_t hubId, const ContextHubMsg& msg) override;

    // Methods from V1_1::IContexthub
    Return<void> onSettingChanged(SettingV1_1 setting, SettingValue newValue) override;