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

Commit 0202b3e7 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk Committed by Steven Moreland
Browse files

Make tuned field description more precise and fix VTS tests to obey it.

Also makes an ABI-stable change to a hal definition file.

Bug: b/36864490
Test: VTS
Change-Id: Ibf3513722144a559c31d0f61eb84bc718cd9dbdc
parent 76ead253
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -208,7 +208,10 @@ struct MetaData {
struct ProgramInfo {
    uint32_t     channel;   /** current channel. (e.g kHz for band type AM_FM) */
    uint32_t     subChannel; /** current sub channel. (FM_HD) */
    bool         tuned;     /** tuned to a program or not */

    /** Tuned to a program (not a noise). It's the same condition that would stop scan operation. */
    bool         tuned;

    bool         stereo;    /** program is stereo or not */
    bool         digital;   /** digital program or not (e.g HD Radio program) */
    uint32_t     signalStrength; /** signal strength from 0 to 100 */
+0 −3
Original line number Diff line number Diff line
@@ -599,11 +599,8 @@ TEST_P(BroadcastRadioHidlTest, TuneAndGetProgramInformationAndCancel) {
    EXPECT_TRUE(hidlReturn.isOk());
    EXPECT_EQ(Result::OK, halResult);
    if (mResultCallbackData == Result::OK) {
        EXPECT_EQ(true, halInfo.tuned);
        EXPECT_LE(halInfo.channel, upperLimit);
        EXPECT_GE(halInfo.channel, lowerLimit);
    } else {
        EXPECT_EQ(false, halInfo.tuned);
    }

    // test cancel
+0 −3
Original line number Diff line number Diff line
@@ -456,11 +456,8 @@ TEST_F(BroadcastRadioHidlTest, TuneAndGetProgramInformationAndCancel) {
    EXPECT_EQ(Result::OK, halResult);
    auto &halInfo_1_1 = halInfo.base;
    if (mResultCallbackData == Result::OK) {
        EXPECT_TRUE(halInfo_1_1.tuned);
        EXPECT_LE(halInfo_1_1.channel, upperLimit);
        EXPECT_GE(halInfo_1_1.channel, lowerLimit);
    } else {
        EXPECT_EQ(false, halInfo_1_1.tuned);
    }

    // test cancel
+1 −0
Original line number Diff line number Diff line
@@ -189,6 +189,7 @@ fe3c3c2f572b72f15f8594c538b0577bd5c28722c31879cfe6231330cddb6747 android.hardwar

# ABI preserving changes to HALs released in Android O

1cb99268f38629288646c0e067a6bc59b82d356b5adb74237fba0372d34978b0 android.hardware.broadcastradio@1.0::types
760485232f6cce07f8bb05e3475509956996b702f77415ee5bff05e2ec5a5bcc android.hardware.dumpstate@1.0::IDumpstateDevice
1fecfa1609ff9d27ebf761a84b4336efa9d5dac5b241f19a6663f70d8db2c4b1 android.hardware.radio@1.0::IRadioResponse
28e929b453df3d9f5060af2764e6cdb123ddb893e3e86923c877f6ff7e5f02c9 android.hardware.wifi@1.0::types