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

Commit 9e440933 authored by Gene Karshenboym's avatar Gene Karshenboym Committed by Android (Google) Code Review
Browse files

Merge "Add check for empty RDS_PS." into pi-dev

parents 97d70b63 8acabf21
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@

#include <VtsHalHidlTargetTestBase.h>
#include <android-base/logging.h>
#include <android-base/strings.h>
#include <android/hardware/broadcastradio/2.0/IBroadcastRadio.h>
#include <android/hardware/broadcastradio/2.0/ITunerCallback.h>
#include <android/hardware/broadcastradio/2.0/ITunerSession.h>
@@ -160,6 +161,14 @@ Return<void> TunerCallbackMock::onCurrentProgramInfoChanged(const ProgramInfo& i
                    physically > IdentifierType::SXM_CHANNEL);
    }

    if (logically == IdentifierType::AMFM_FREQUENCY) {
        auto ps = utils::getMetadataString(info, MetadataKey::RDS_PS);
        if (ps.has_value()) {
            EXPECT_NE("", android::base::Trim(*ps))
                << "Don't use empty RDS_PS as an indicator of missing RSD PS data.";
        }
    }

    return onCurrentProgramInfoChanged_(info);
}