diff options
author | Tomasz Wasilczyk <twasilczyk@google.com> | 2018-01-12 14:57:45 -0800 |
---|---|---|
committer | Tomasz Wasilczyk <twasilczyk@google.com> | 2018-01-12 14:59:07 -0800 |
commit | 3dd452a979181d9fd1523f8e096c593ad85ded39 (patch) | |
tree | 8e8c57c7e4c74852bdc767803d1c08762ac29bb4 /broadcastradio | |
parent | 6118ea4d977ab4ea2564ed2c32b6de3c94f7b93e (diff) | |
download | android_hardware_interfaces-3dd452a979181d9fd1523f8e096c593ad85ded39.tar.gz android_hardware_interfaces-3dd452a979181d9fd1523f8e096c593ad85ded39.tar.bz2 android_hardware_interfaces-3dd452a979181d9fd1523f8e096c593ad85ded39.zip |
Rename getConfigFlag to isConfigFlagSet.
The latter matches code guidelines better.
Bug: 69958423
Test: it builds
Change-Id: I520733a061f03bab57544a1451dd763dc53ce5c6
Diffstat (limited to 'broadcastradio')
-rw-r--r-- | broadcastradio/2.0/ITunerSession.hal | 4 | ||||
-rw-r--r-- | broadcastradio/2.0/default/TunerSession.cpp | 2 | ||||
-rw-r--r-- | broadcastradio/2.0/default/TunerSession.h | 2 | ||||
-rw-r--r-- | broadcastradio/2.0/types.hal | 2 | ||||
-rw-r--r-- | broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp | 10 |
5 files changed, 10 insertions, 10 deletions
diff --git a/broadcastradio/2.0/ITunerSession.hal b/broadcastradio/2.0/ITunerSession.hal index a58fa62ef..e891a234f 100644 --- a/broadcastradio/2.0/ITunerSession.hal +++ b/broadcastradio/2.0/ITunerSession.hal @@ -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. diff --git a/broadcastradio/2.0/default/TunerSession.cpp b/broadcastradio/2.0/default/TunerSession.cpp index 3166d8619..a2f06d53f 100644 --- a/broadcastradio/2.0/default/TunerSession.cpp +++ b/broadcastradio/2.0/default/TunerSession.cpp @@ -241,7 +241,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); diff --git a/broadcastradio/2.0/default/TunerSession.h b/broadcastradio/2.0/default/TunerSession.h index 5d27b1e6d..93917d22f 100644 --- a/broadcastradio/2.0/default/TunerSession.h +++ b/broadcastradio/2.0/default/TunerSession.h @@ -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; diff --git a/broadcastradio/2.0/types.hal b/broadcastradio/2.0/types.hal index 1fd3715eb..10ab168a1 100644 --- a/broadcastradio/2.0/types.hal +++ b/broadcastradio/2.0/types.hal @@ -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 { diff --git a/broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp b/broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp index 111147871..81fca4c8d 100644 --- a/broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp +++ b/broadcastradio/2.0/vts/functional/VtsHalBroadcastradioV2_0TargetTest.cpp @@ -584,16 +584,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) { @@ -613,7 +613,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()); @@ -625,7 +625,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; |