Loading contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ interface IContextHub { void sendMessageToHub(in int contextHubId, in android.hardware.contexthub.ContextHubMessage message); void onHostEndpointConnected(in android.hardware.contexthub.HostEndpointInfo hostEndpointInfo); void onHostEndpointDisconnected(char hostEndpointId); long[] getPreloadedNanoappIds(); long[] getPreloadedNanoappIds(in int contextHubId); void onNanSessionStateChanged(in android.hardware.contexthub.NanSessionStateUpdate update); void setTestMode(in boolean enable); const int EX_CONTEXT_HUB_UNSPECIFIED = (-1) /* -1 */; Loading contexthub/aidl/android/hardware/contexthub/IContextHub.aidl +4 −2 Original line number Diff line number Diff line Loading @@ -200,9 +200,11 @@ interface IContextHub { * Provides the list of preloaded nanoapp IDs on the system. The output of this API must * not change. * * @return The list of preloaded nanoapp IDs * @param contextHubId The identifier of the Context Hub. * * @return The list of preloaded nanoapp IDs. */ long[] getPreloadedNanoappIds(); long[] getPreloadedNanoappIds(in int contextHubId); /** * Invoked when the state of the NAN session requested through handleNanSessionRequest() Loading contexthub/aidl/default/ContextHub.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ ScopedAStatus ContextHub::queryNanoapps(int32_t in_contextHubId) { } } ScopedAStatus ContextHub::getPreloadedNanoappIds(std::vector<int64_t>* out_preloadedNanoappIds) { ScopedAStatus ContextHub::getPreloadedNanoappIds(int32_t /* in_contextHubId */, std::vector<int64_t>* out_preloadedNanoappIds) { if (out_preloadedNanoappIds == nullptr) { return ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } Loading contexthub/aidl/default/include/contexthub-impl/ContextHub.h +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ class ContextHub : public BnContextHub { ::ndk::ScopedAStatus onSettingChanged(Setting in_setting, bool in_enabled) override; ::ndk::ScopedAStatus queryNanoapps(int32_t in_contextHubId) override; ::ndk::ScopedAStatus getPreloadedNanoappIds( std::vector<int64_t>* out_preloadedNanoappIds) override; int32_t in_contextHubId, std::vector<int64_t>* out_preloadedNanoappIds) override; ::ndk::ScopedAStatus registerCallback( int32_t in_contextHubId, const std::shared_ptr<IContextHubCallback>& in_cb) override; ::ndk::ScopedAStatus sendMessageToHub(int32_t in_contextHubId, Loading contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -186,10 +186,10 @@ TEST_P(ContextHubAidl, TestQueryApps) { } } // Calls getPreloadedNanoapps() and verifies there are preloaded nanoapps TEST_P(ContextHubAidl, TestGetPreloadedNanoapps) { // Calls getPreloadedNanoappsIds() and verifies there are preloaded nanoapps TEST_P(ContextHubAidl, TestGetPreloadedNanoappIds) { std::vector<int64_t> preloadedNanoappIds; Status status = contextHub->getPreloadedNanoappIds(&preloadedNanoappIds); Status status = contextHub->getPreloadedNanoappIds(getHubId(), &preloadedNanoappIds); if (status.exceptionCode() == Status::EX_UNSUPPORTED_OPERATION || status.transactionError() == android::UNKNOWN_TRANSACTION) { GTEST_SKIP() << "Not supported -> old API; or not implemented"; Loading Loading
contexthub/aidl/aidl_api/android.hardware.contexthub/current/android/hardware/contexthub/IContextHub.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ interface IContextHub { void sendMessageToHub(in int contextHubId, in android.hardware.contexthub.ContextHubMessage message); void onHostEndpointConnected(in android.hardware.contexthub.HostEndpointInfo hostEndpointInfo); void onHostEndpointDisconnected(char hostEndpointId); long[] getPreloadedNanoappIds(); long[] getPreloadedNanoappIds(in int contextHubId); void onNanSessionStateChanged(in android.hardware.contexthub.NanSessionStateUpdate update); void setTestMode(in boolean enable); const int EX_CONTEXT_HUB_UNSPECIFIED = (-1) /* -1 */; Loading
contexthub/aidl/android/hardware/contexthub/IContextHub.aidl +4 −2 Original line number Diff line number Diff line Loading @@ -200,9 +200,11 @@ interface IContextHub { * Provides the list of preloaded nanoapp IDs on the system. The output of this API must * not change. * * @return The list of preloaded nanoapp IDs * @param contextHubId The identifier of the Context Hub. * * @return The list of preloaded nanoapp IDs. */ long[] getPreloadedNanoappIds(); long[] getPreloadedNanoappIds(in int contextHubId); /** * Invoked when the state of the NAN session requested through handleNanSessionRequest() Loading
contexthub/aidl/default/ContextHub.cpp +2 −1 Original line number Diff line number Diff line Loading @@ -76,7 +76,8 @@ ScopedAStatus ContextHub::queryNanoapps(int32_t in_contextHubId) { } } ScopedAStatus ContextHub::getPreloadedNanoappIds(std::vector<int64_t>* out_preloadedNanoappIds) { ScopedAStatus ContextHub::getPreloadedNanoappIds(int32_t /* in_contextHubId */, std::vector<int64_t>* out_preloadedNanoappIds) { if (out_preloadedNanoappIds == nullptr) { return ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } Loading
contexthub/aidl/default/include/contexthub-impl/ContextHub.h +1 −1 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ class ContextHub : public BnContextHub { ::ndk::ScopedAStatus onSettingChanged(Setting in_setting, bool in_enabled) override; ::ndk::ScopedAStatus queryNanoapps(int32_t in_contextHubId) override; ::ndk::ScopedAStatus getPreloadedNanoappIds( std::vector<int64_t>* out_preloadedNanoappIds) override; int32_t in_contextHubId, std::vector<int64_t>* out_preloadedNanoappIds) override; ::ndk::ScopedAStatus registerCallback( int32_t in_contextHubId, const std::shared_ptr<IContextHubCallback>& in_cb) override; ::ndk::ScopedAStatus sendMessageToHub(int32_t in_contextHubId, Loading
contexthub/aidl/vts/VtsAidlHalContextHubTargetTest.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -186,10 +186,10 @@ TEST_P(ContextHubAidl, TestQueryApps) { } } // Calls getPreloadedNanoapps() and verifies there are preloaded nanoapps TEST_P(ContextHubAidl, TestGetPreloadedNanoapps) { // Calls getPreloadedNanoappsIds() and verifies there are preloaded nanoapps TEST_P(ContextHubAidl, TestGetPreloadedNanoappIds) { std::vector<int64_t> preloadedNanoappIds; Status status = contextHub->getPreloadedNanoappIds(&preloadedNanoappIds); Status status = contextHub->getPreloadedNanoappIds(getHubId(), &preloadedNanoappIds); if (status.exceptionCode() == Status::EX_UNSUPPORTED_OPERATION || status.transactionError() == android::UNKNOWN_TRANSACTION) { GTEST_SKIP() << "Not supported -> old API; or not implemented"; Loading