Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc599c09 authored by Bruno Demartino's avatar Bruno Demartino Committed by Automerger Merge Worker
Browse files

Merge "broadcastradio@2.0 VTS uses DAB frequency invalid in some regions" am:...

Merge "broadcastradio@2.0 VTS uses DAB frequency invalid in some regions" am: b49e67dc am: 971a412e am: a62071fe

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1722752

Change-Id: I86c61a29d33f657aef69d6bdf81ae8ce4d67447d
parents d1d5a31b a62071fe
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -496,10 +496,26 @@ TEST_P(BroadcastRadioHalTest, TuneFailsWithInvalid) {
 *  - program changes exactly to what was requested.
 */
TEST_P(BroadcastRadioHalTest, DabTune) {
    Result halResult;
    hidl_vec<DabTableEntry> config;
    auto cb = [&](Result result, hidl_vec<DabTableEntry> configCb) {
        halResult = result;
        config = configCb;
    };
    auto hidlResult = mModule->getDabRegionConfig(cb);
    ASSERT_TRUE(hidlResult.isOk());

    if (halResult == Result::NOT_SUPPORTED) {
        printSkipped("DAB not supported");
        return;
    }
    ASSERT_EQ(Result::OK, halResult);
    ASSERT_NE(config.size(), 0U);

    ASSERT_TRUE(openSession());

    ProgramSelector sel = {};
    uint64_t freq = 178352;
    uint64_t freq = config[config.size() / 2].frequency;
    sel.primaryId = make_identifier(IdentifierType::DAB_FREQUENCY,freq);

    std::this_thread::sleep_for(gTuneWorkaround);