Loading broadcastradio/aidl/android/hardware/broadcastradio/IdentifierType.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ enum IdentifierType { * - 13 bit: Fractional bits of longitude * - 8 bit: Integer bits of longitude * - 1 bit: 0 for east and 1 for west for longitude * - 1 bit: 0, representing latitude * - 1 bit: 0, representing longitude * - 5 bit: pad of zeros separating longitude and latitude * - 4 bit: Bits 4:7 of altitude * - 13 bit: Fractional bits of latitude Loading broadcastradio/common/utilsaidl/src/UtilsV2.cpp +7 −6 Original line number Diff line number Diff line Loading @@ -102,15 +102,16 @@ bool isValidV2(const ProgramIdentifier& id) { expect(val < 1000u, "SXM channel < 1000"); break; case IdentifierType::HD_STATION_LOCATION: { val >>= 26; uint64_t latitudeBit = val & 0x1; expect(latitudeBit == 1u, "Latitude comes first"); val >>= 27; expect(latitudeBit == 0u, "Longitude comes first"); val >>= 1; uint64_t latitudePad = val & 0x1Fu; expect(latitudePad == 0u, "Latitude padding"); val >>= 5; expect(latitudePad == 0u, "Longitude padding"); val >>= 31; uint64_t longitudeBit = val & 0x1; expect(longitudeBit == 1u, "Longitude comes next"); val >>= 27; expect(longitudeBit == 1u, "Latitude comes next"); val >>= 1; uint64_t longitudePad = val & 0x1Fu; expect(longitudePad == 0u, "Latitude padding"); break; Loading Loading
broadcastradio/aidl/android/hardware/broadcastradio/IdentifierType.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -174,7 +174,7 @@ enum IdentifierType { * - 13 bit: Fractional bits of longitude * - 8 bit: Integer bits of longitude * - 1 bit: 0 for east and 1 for west for longitude * - 1 bit: 0, representing latitude * - 1 bit: 0, representing longitude * - 5 bit: pad of zeros separating longitude and latitude * - 4 bit: Bits 4:7 of altitude * - 13 bit: Fractional bits of latitude Loading
broadcastradio/common/utilsaidl/src/UtilsV2.cpp +7 −6 Original line number Diff line number Diff line Loading @@ -102,15 +102,16 @@ bool isValidV2(const ProgramIdentifier& id) { expect(val < 1000u, "SXM channel < 1000"); break; case IdentifierType::HD_STATION_LOCATION: { val >>= 26; uint64_t latitudeBit = val & 0x1; expect(latitudeBit == 1u, "Latitude comes first"); val >>= 27; expect(latitudeBit == 0u, "Longitude comes first"); val >>= 1; uint64_t latitudePad = val & 0x1Fu; expect(latitudePad == 0u, "Latitude padding"); val >>= 5; expect(latitudePad == 0u, "Longitude padding"); val >>= 31; uint64_t longitudeBit = val & 0x1; expect(longitudeBit == 1u, "Longitude comes next"); val >>= 27; expect(longitudeBit == 1u, "Latitude comes next"); val >>= 1; uint64_t longitudePad = val & 0x1Fu; expect(longitudePad == 0u, "Latitude padding"); break; Loading