Loading contexthub/1.2/IContexthub.hal +0 −12 Original line number Diff line number Diff line Loading @@ -50,18 +50,6 @@ interface IContexthub extends @1.1::IContexthub { */ registerCallback_1_2(uint32_t hubId, IContexthubCallback cb) generates (Result result); /** * Send a message to a hub * * @param hubId identifier for hub to send message to * @param msg message to be sent * * @return result OK if successful, error code otherwise * BAD_VALUE if parameters are not valid * TRANSACTION_FAILED if message send failed */ sendMessageToHub_1_2(uint32_t hubId, ContextHubMsg msg) generates (Result result); /** * Notification sent by the framework to indicate that the user * has changed a setting. Loading contexthub/1.2/default/Contexthub.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -80,12 +80,6 @@ Return<Result> Contexthub::registerCallback_1_2(uint32_t hubId, return Result::BAD_PARAMS; } // We don't expose any nanoapps, therefore all nanoapp-related API calls return with BAD_PARAMS Return<Result> Contexthub::sendMessageToHub_1_2(uint32_t /* hubId */, const ContextHubMsg& /* msg */) { return Result::BAD_PARAMS; } Return<void> Contexthub::onSettingChanged(SettingV1_1 /*setting*/, SettingValue /*newValue*/) { return Void(); } Loading contexthub/1.2/default/Contexthub.h +0 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,6 @@ class Contexthub Return<Result> registerCallback_1_2(uint32_t hubId, const sp<V1_2::IContexthubCallback>& cb) override; Return<Result> sendMessageToHub_1_2(uint32_t hubId, const ContextHubMsg& msg) override; private: sp<IContextHubCallbackWrapperBase> mCallback; }; Loading contexthub/1.2/types.hal +2 −5 Original line number Diff line number Diff line Loading @@ -45,11 +45,8 @@ struct ContextHubMsg { @1.0::ContextHubMsg msg_1_0; /** * The list of Android permissions that the sender of this message has at * the time the message was sent. * * The HAL MUST drop messages to nanoapps if this list of permissions is not * a superset of those of the receiving nanoapp(s). * The list of Android permissions held by the sending nanoapp at the time * the message was sent. * * The framework MUST drop messages to host apps that don't have a superset * of the permissions that the sending nanoapp is using. Loading contexthub/1.2/vts/functional/VtsHalContexthubV1_2TargetTest.cpp +0 −31 Original line number Diff line number Diff line Loading @@ -195,39 +195,8 @@ class TxnResultCallback : public ContexthubCallbackV1_2 { std::promise<TransactionResult> promise; }; // Parameterized fixture that sets the callback to TxnResultCallback class ContexthubTxnTest : public ContexthubHidlTest { public: virtual void SetUp() override { ContexthubHidlTest::SetUp(); ASSERT_OK(registerCallback_1_2(cb)); } sp<TxnResultCallback> cb = new TxnResultCallback(); }; TEST_P(ContexthubTxnTest, TestSendMessageToNonExistentNanoApp) { ContextHubMsg msg; msg.msg_1_0.appName = kNonExistentAppId; msg.msg_1_0.msgType = 1; msg.msg_1_0.msg.resize(4); std::fill(msg.msg_1_0.msg.begin(), msg.msg_1_0.msg.end(), 0); ALOGD("Sending message to non-existent nanoapp"); Result result = hubApi->sendMessageToHub_1_2(getHubId(), msg); if (result != Result::OK && result != Result::BAD_PARAMS && result != Result::TRANSACTION_FAILED) { FAIL() << "Got result " << asBaseType(result) << ", expected OK, BAD_PARAMS" << ", or TRANSACTION_FAILED"; } } GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ContexthubHidlTest); INSTANTIATE_TEST_SUITE_P(HubIdSpecificTests, ContexthubHidlTest, testing::ValuesIn(kTestParameters), android::hardware::PrintInstanceTupleNameToString<>); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ContexthubTxnTest); INSTANTIATE_TEST_SUITE_P(HubIdSpecificTests, ContexthubTxnTest, testing::ValuesIn(kTestParameters), android::hardware::PrintInstanceTupleNameToString<>); } // anonymous namespace Loading
contexthub/1.2/IContexthub.hal +0 −12 Original line number Diff line number Diff line Loading @@ -50,18 +50,6 @@ interface IContexthub extends @1.1::IContexthub { */ registerCallback_1_2(uint32_t hubId, IContexthubCallback cb) generates (Result result); /** * Send a message to a hub * * @param hubId identifier for hub to send message to * @param msg message to be sent * * @return result OK if successful, error code otherwise * BAD_VALUE if parameters are not valid * TRANSACTION_FAILED if message send failed */ sendMessageToHub_1_2(uint32_t hubId, ContextHubMsg msg) generates (Result result); /** * Notification sent by the framework to indicate that the user * has changed a setting. Loading
contexthub/1.2/default/Contexthub.cpp +0 −6 Original line number Diff line number Diff line Loading @@ -80,12 +80,6 @@ Return<Result> Contexthub::registerCallback_1_2(uint32_t hubId, return Result::BAD_PARAMS; } // We don't expose any nanoapps, therefore all nanoapp-related API calls return with BAD_PARAMS Return<Result> Contexthub::sendMessageToHub_1_2(uint32_t /* hubId */, const ContextHubMsg& /* msg */) { return Result::BAD_PARAMS; } Return<void> Contexthub::onSettingChanged(SettingV1_1 /*setting*/, SettingValue /*newValue*/) { return Void(); } Loading
contexthub/1.2/default/Contexthub.h +0 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,6 @@ class Contexthub Return<Result> registerCallback_1_2(uint32_t hubId, const sp<V1_2::IContexthubCallback>& cb) override; Return<Result> sendMessageToHub_1_2(uint32_t hubId, const ContextHubMsg& msg) override; private: sp<IContextHubCallbackWrapperBase> mCallback; }; Loading
contexthub/1.2/types.hal +2 −5 Original line number Diff line number Diff line Loading @@ -45,11 +45,8 @@ struct ContextHubMsg { @1.0::ContextHubMsg msg_1_0; /** * The list of Android permissions that the sender of this message has at * the time the message was sent. * * The HAL MUST drop messages to nanoapps if this list of permissions is not * a superset of those of the receiving nanoapp(s). * The list of Android permissions held by the sending nanoapp at the time * the message was sent. * * The framework MUST drop messages to host apps that don't have a superset * of the permissions that the sending nanoapp is using. Loading
contexthub/1.2/vts/functional/VtsHalContexthubV1_2TargetTest.cpp +0 −31 Original line number Diff line number Diff line Loading @@ -195,39 +195,8 @@ class TxnResultCallback : public ContexthubCallbackV1_2 { std::promise<TransactionResult> promise; }; // Parameterized fixture that sets the callback to TxnResultCallback class ContexthubTxnTest : public ContexthubHidlTest { public: virtual void SetUp() override { ContexthubHidlTest::SetUp(); ASSERT_OK(registerCallback_1_2(cb)); } sp<TxnResultCallback> cb = new TxnResultCallback(); }; TEST_P(ContexthubTxnTest, TestSendMessageToNonExistentNanoApp) { ContextHubMsg msg; msg.msg_1_0.appName = kNonExistentAppId; msg.msg_1_0.msgType = 1; msg.msg_1_0.msg.resize(4); std::fill(msg.msg_1_0.msg.begin(), msg.msg_1_0.msg.end(), 0); ALOGD("Sending message to non-existent nanoapp"); Result result = hubApi->sendMessageToHub_1_2(getHubId(), msg); if (result != Result::OK && result != Result::BAD_PARAMS && result != Result::TRANSACTION_FAILED) { FAIL() << "Got result " << asBaseType(result) << ", expected OK, BAD_PARAMS" << ", or TRANSACTION_FAILED"; } } GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ContexthubHidlTest); INSTANTIATE_TEST_SUITE_P(HubIdSpecificTests, ContexthubHidlTest, testing::ValuesIn(kTestParameters), android::hardware::PrintInstanceTupleNameToString<>); GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ContexthubTxnTest); INSTANTIATE_TEST_SUITE_P(HubIdSpecificTests, ContexthubTxnTest, testing::ValuesIn(kTestParameters), android::hardware::PrintInstanceTupleNameToString<>); } // anonymous namespace