Loading broadcastradio/2.0/ITunerSession.hal +2 −2 Original line number Diff line number Diff line Loading @@ -113,12 +113,12 @@ interface ITunerSession { * NOT_SUPPORTED if the flag is not supported at all. * @return value The current value of the flag, if result is OK. */ getConfigFlag(ConfigFlag flag) generates (Result result, bool value); isConfigFlagSet(ConfigFlag flag) generates (Result result, bool value); /** * Sets the config flag. * * The success/failure result must be consistent with getConfigFlag. * The success/failure result must be consistent with isConfigFlagSet. * * @param flag Flag to set. * @param value The new value of a given flag. Loading broadcastradio/2.0/default/TunerSession.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -263,7 +263,7 @@ Return<void> TunerSession::stopProgramListUpdates() { return {}; } Return<void> TunerSession::getConfigFlag(ConfigFlag flag, getConfigFlag_cb _hidl_cb) { Return<void> TunerSession::isConfigFlagSet(ConfigFlag flag, isConfigFlagSet_cb _hidl_cb) { ALOGV("%s(%s)", __func__, toString(flag).c_str()); _hidl_cb(Result::NOT_SUPPORTED, false); Loading broadcastradio/2.0/default/TunerSession.h +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ struct TunerSession : public ITunerSession { virtual Return<void> cancel() override; virtual Return<Result> startProgramListUpdates(const ProgramFilter& filter); virtual Return<void> stopProgramListUpdates(); virtual Return<void> getConfigFlag(ConfigFlag flag, getConfigFlag_cb _hidl_cb); virtual Return<void> isConfigFlagSet(ConfigFlag flag, isConfigFlagSet_cb _hidl_cb); virtual Return<Result> setConfigFlag(ConfigFlag flag, bool value); virtual Return<void> setParameters(const hidl_vec<VendorKeyValue>& parameters, setParameters_cb _hidl_cb) override; Loading broadcastradio/2.0/types.hal +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ enum Result : int32_t { }; /** * Configuration flags to be used with getConfigFlag and setConfigFlag methods * Configuration flags to be used with isConfigFlagSet and setConfigFlag methods * of ITunerSession. */ enum ConfigFlag : uint32_t { Loading broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -617,16 +617,16 @@ TEST_F(BroadcastRadioHalTest, GetNoImage) { * Test getting config flags. * * Verifies that: * - getConfigFlag either succeeds or ends with NOT_SUPPORTED or INVALID_STATE; * - isConfigFlagSet either succeeds or ends with NOT_SUPPORTED or INVALID_STATE; * - call success or failure is consistent with setConfigFlag. */ TEST_F(BroadcastRadioHalTest, GetConfigFlags) { TEST_F(BroadcastRadioHalTest, FetchConfigFlags) { ASSERT_TRUE(openSession()); for (auto flag : gConfigFlagValues) { auto halResult = Result::UNKNOWN_ERROR; auto cb = [&](Result result, bool) { halResult = result; }; auto hidlResult = mSession->getConfigFlag(flag, cb); auto hidlResult = mSession->isConfigFlagSet(flag, cb); EXPECT_TRUE(hidlResult.isOk()); if (halResult != Result::NOT_SUPPORTED && halResult != Result::INVALID_STATE) { Loading @@ -646,7 +646,7 @@ TEST_F(BroadcastRadioHalTest, GetConfigFlags) { * * Verifies that: * - setConfigFlag either succeeds or ends with NOT_SUPPORTED or INVALID_STATE; * - getConfigFlag reflects the state requested immediately after the set call. * - isConfigFlagSet reflects the state requested immediately after the set call. */ TEST_F(BroadcastRadioHalTest, SetConfigFlags) { ASSERT_TRUE(openSession()); Loading @@ -658,7 +658,7 @@ TEST_F(BroadcastRadioHalTest, SetConfigFlags) { halResult = result; gotValue = value; }; auto hidlResult = mSession->getConfigFlag(flag, cb); auto hidlResult = mSession->isConfigFlagSet(flag, cb); EXPECT_TRUE(hidlResult.isOk()); EXPECT_EQ(Result::OK, halResult); return gotValue; Loading Loading
broadcastradio/2.0/ITunerSession.hal +2 −2 Original line number Diff line number Diff line Loading @@ -113,12 +113,12 @@ interface ITunerSession { * NOT_SUPPORTED if the flag is not supported at all. * @return value The current value of the flag, if result is OK. */ getConfigFlag(ConfigFlag flag) generates (Result result, bool value); isConfigFlagSet(ConfigFlag flag) generates (Result result, bool value); /** * Sets the config flag. * * The success/failure result must be consistent with getConfigFlag. * The success/failure result must be consistent with isConfigFlagSet. * * @param flag Flag to set. * @param value The new value of a given flag. Loading
broadcastradio/2.0/default/TunerSession.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -263,7 +263,7 @@ Return<void> TunerSession::stopProgramListUpdates() { return {}; } Return<void> TunerSession::getConfigFlag(ConfigFlag flag, getConfigFlag_cb _hidl_cb) { Return<void> TunerSession::isConfigFlagSet(ConfigFlag flag, isConfigFlagSet_cb _hidl_cb) { ALOGV("%s(%s)", __func__, toString(flag).c_str()); _hidl_cb(Result::NOT_SUPPORTED, false); Loading
broadcastradio/2.0/default/TunerSession.h +1 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ struct TunerSession : public ITunerSession { virtual Return<void> cancel() override; virtual Return<Result> startProgramListUpdates(const ProgramFilter& filter); virtual Return<void> stopProgramListUpdates(); virtual Return<void> getConfigFlag(ConfigFlag flag, getConfigFlag_cb _hidl_cb); virtual Return<void> isConfigFlagSet(ConfigFlag flag, isConfigFlagSet_cb _hidl_cb); virtual Return<Result> setConfigFlag(ConfigFlag flag, bool value); virtual Return<void> setParameters(const hidl_vec<VendorKeyValue>& parameters, setParameters_cb _hidl_cb) override; Loading
broadcastradio/2.0/types.hal +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ enum Result : int32_t { }; /** * Configuration flags to be used with getConfigFlag and setConfigFlag methods * Configuration flags to be used with isConfigFlagSet and setConfigFlag methods * of ITunerSession. */ enum ConfigFlag : uint32_t { Loading
broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp +5 −5 Original line number Diff line number Diff line Loading @@ -617,16 +617,16 @@ TEST_F(BroadcastRadioHalTest, GetNoImage) { * Test getting config flags. * * Verifies that: * - getConfigFlag either succeeds or ends with NOT_SUPPORTED or INVALID_STATE; * - isConfigFlagSet either succeeds or ends with NOT_SUPPORTED or INVALID_STATE; * - call success or failure is consistent with setConfigFlag. */ TEST_F(BroadcastRadioHalTest, GetConfigFlags) { TEST_F(BroadcastRadioHalTest, FetchConfigFlags) { ASSERT_TRUE(openSession()); for (auto flag : gConfigFlagValues) { auto halResult = Result::UNKNOWN_ERROR; auto cb = [&](Result result, bool) { halResult = result; }; auto hidlResult = mSession->getConfigFlag(flag, cb); auto hidlResult = mSession->isConfigFlagSet(flag, cb); EXPECT_TRUE(hidlResult.isOk()); if (halResult != Result::NOT_SUPPORTED && halResult != Result::INVALID_STATE) { Loading @@ -646,7 +646,7 @@ TEST_F(BroadcastRadioHalTest, GetConfigFlags) { * * Verifies that: * - setConfigFlag either succeeds or ends with NOT_SUPPORTED or INVALID_STATE; * - getConfigFlag reflects the state requested immediately after the set call. * - isConfigFlagSet reflects the state requested immediately after the set call. */ TEST_F(BroadcastRadioHalTest, SetConfigFlags) { ASSERT_TRUE(openSession()); Loading @@ -658,7 +658,7 @@ TEST_F(BroadcastRadioHalTest, SetConfigFlags) { halResult = result; gotValue = value; }; auto hidlResult = mSession->getConfigFlag(flag, cb); auto hidlResult = mSession->isConfigFlagSet(flag, cb); EXPECT_TRUE(hidlResult.isOk()); EXPECT_EQ(Result::OK, halResult); return gotValue; Loading