diff options
Diffstat (limited to 'contexthub/1.1/default/Contexthub.cpp')
-rw-r--r-- | contexthub/1.1/default/Contexthub.cpp | 58 |
1 files changed, 1 insertions, 57 deletions
diff --git a/contexthub/1.1/default/Contexthub.cpp b/contexthub/1.1/default/Contexthub.cpp index 19cc2628d7..2d4fbaee24 100644 --- a/contexthub/1.1/default/Contexthub.cpp +++ b/contexthub/1.1/default/Contexthub.cpp @@ -23,36 +23,9 @@ namespace contexthub { namespace V1_1 { namespace implementation { -using ::android::hardware::contexthub::V1_0::ContextHub; -using ::android::hardware::contexthub::V1_0::HubAppInfo; using ::android::hardware::contexthub::V1_0::Result; -namespace { - -constexpr uint32_t kMockHubId = 0; - -} // anonymous namespace - -Return<void> Contexthub::getHubs(getHubs_cb _hidl_cb) { - ContextHub hub = {}; - hub.name = "Mock Context Hub"; - hub.vendor = "AOSP"; - hub.toolchain = "n/a"; - hub.platformVersion = 1; - hub.toolchainVersion = 1; - hub.hubId = kMockHubId; - hub.peakMips = 1; - hub.peakPowerDrawMw = 1; - hub.maxSupportedMsgLen = 4096; - hub.chrePlatformId = UINT64_C(0x476f6f6754000000); - hub.chreApiMajorVersion = 1; - hub.chreApiMinorVersion = 4; - - // Report a single mock hub - std::vector<ContextHub> hubs; - hubs.push_back(hub); - - _hidl_cb(hubs); +Return<void> Contexthub::onSettingChanged(Setting /*setting*/, SettingValue /*newValue*/) { return Void(); } @@ -64,31 +37,6 @@ Return<Result> Contexthub::registerCallback(uint32_t hubId, const sp<IContexthub return Result::BAD_PARAMS; } -// We don't expose any nanoapps, therefore all nanoapp-related API calls return with BAD_PARAMS -Return<Result> Contexthub::sendMessageToHub(uint32_t /*hubId*/, const ContextHubMsg& /*msg*/) { - return Result::BAD_PARAMS; -} - -Return<Result> Contexthub::loadNanoApp(uint32_t /*hubId*/, const NanoAppBinary& /*appBinary*/, - uint32_t /*transactionId*/) { - return Result::BAD_PARAMS; -} - -Return<Result> Contexthub::unloadNanoApp(uint32_t /*hubId*/, uint64_t /*appId*/, - uint32_t /*transactionId*/) { - return Result::BAD_PARAMS; -} - -Return<Result> Contexthub::enableNanoApp(uint32_t /*hubId*/, uint64_t /*appId*/, - uint32_t /*transactionId*/) { - return Result::BAD_PARAMS; -} - -Return<Result> Contexthub::disableNanoApp(uint32_t /*hubId*/, uint64_t /*appId*/, - uint32_t /*transactionId*/) { - return Result::BAD_PARAMS; -} - Return<Result> Contexthub::queryApps(uint32_t hubId) { if (hubId == kMockHubId && mCallback != nullptr) { std::vector<HubAppInfo> nanoapps; @@ -98,10 +46,6 @@ Return<Result> Contexthub::queryApps(uint32_t hubId) { return Result::BAD_PARAMS; } -Return<void> Contexthub::onSettingChanged(Setting /*setting*/, SettingValue /*newValue*/) { - return Void(); -} - } // namespace implementation } // namespace V1_1 } // namespace contexthub |