diff options
-rw-r--r-- | audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc | 2 | ||||
-rw-r--r-- | gnss/1.1/default/Gnss.cpp | 4 | ||||
-rw-r--r-- | gnss/1.1/vts/functional/gnss_hal_test_cases.cpp | 17 |
3 files changed, 16 insertions, 7 deletions
diff --git a/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc b/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc index a76770d7..8217b946 100644 --- a/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc +++ b/audio/common/all-versions/default/service/android.hardware.audio@2.0-service.rc | |||
@@ -9,3 +9,5 @@ service vendor.audio-hal-2-0 /vendor/bin/hw/android.hardware.audio@2.0-service | |||
9 | # and its .rc file has an "onrestart restart audio-hal" rule, thus | 9 | # and its .rc file has an "onrestart restart audio-hal" rule, thus |
10 | # an additional auto-restart from the init process isn't needed. | 10 | # an additional auto-restart from the init process isn't needed. |
11 | oneshot | 11 | oneshot |
12 | interface android.hardware.audio@4.0::IDevicesFactory default | ||
13 | interface android.hardware.audio@2.0::IDevicesFactory default | ||
diff --git a/gnss/1.1/default/Gnss.cpp b/gnss/1.1/default/Gnss.cpp index bbc4940c..bbf1cd31 100644 --- a/gnss/1.1/default/Gnss.cpp +++ b/gnss/1.1/default/Gnss.cpp | |||
@@ -227,7 +227,9 @@ Return<GnssSvStatus> Gnss::getMockSvStatus() const { | |||
227 | getSvInfo(5, GnssConstellationType::GPS, 27.0, 29.0, 56.5), | 227 | getSvInfo(5, GnssConstellationType::GPS, 27.0, 29.0, 56.5), |
228 | getSvInfo(17, GnssConstellationType::GPS, 30.5, 71.0, 77.0), | 228 | getSvInfo(17, GnssConstellationType::GPS, 30.5, 71.0, 77.0), |
229 | getSvInfo(26, GnssConstellationType::GPS, 24.1, 28.0, 253.0), | 229 | getSvInfo(26, GnssConstellationType::GPS, 24.1, 28.0, 253.0), |
230 | getSvInfo(30, GnssConstellationType::GPS, 20.5, 11.5, 116.0), | 230 | getSvInfo(5, GnssConstellationType::GLONASS, 20.5, 11.5, 116.0), |
231 | getSvInfo(17, GnssConstellationType::GLONASS, 21.5, 28.5, 186.0), | ||
232 | getSvInfo(18, GnssConstellationType::GLONASS, 28.3, 38.8, 69.0), | ||
231 | getSvInfo(10, GnssConstellationType::GLONASS, 25.0, 66.0, 247.0)}; | 233 | getSvInfo(10, GnssConstellationType::GLONASS, 25.0, 66.0, 247.0)}; |
232 | 234 | ||
233 | GnssSvStatus svStatus = {.numSvs = sizeof(mockGnssSvInfoList) / sizeof(GnssSvInfo)}; | 235 | GnssSvStatus svStatus = {.numSvs = sizeof(mockGnssSvInfoList) / sizeof(GnssSvInfo)}; |
diff --git a/gnss/1.1/vts/functional/gnss_hal_test_cases.cpp b/gnss/1.1/vts/functional/gnss_hal_test_cases.cpp index 8f4691e1..cce46f18 100644 --- a/gnss/1.1/vts/functional/gnss_hal_test_cases.cpp +++ b/gnss/1.1/vts/functional/gnss_hal_test_cases.cpp | |||
@@ -84,15 +84,15 @@ TEST_F(GnssHalTest, GetLocationLowPower) { | |||
84 | } | 84 | } |
85 | 85 | ||
86 | /* | 86 | /* |
87 | * FindStrongFrequentSource: | 87 | * FindStrongFrequentNonGpsSource: |
88 | * | 88 | * |
89 | * Search through a GnssSvStatus list for the strongest satellite observed enough times | 89 | * Search through a GnssSvStatus list for the strongest non-GPS satellite observed enough times |
90 | * | 90 | * |
91 | * returns the strongest source, | 91 | * returns the strongest source, |
92 | * or a source with constellation == UNKNOWN if none are found sufficient times | 92 | * or a source with constellation == UNKNOWN if none are found sufficient times |
93 | */ | 93 | */ |
94 | 94 | ||
95 | IGnssConfiguration::BlacklistedSource FindStrongFrequentSource( | 95 | IGnssConfiguration::BlacklistedSource FindStrongFrequentNonGpsSource( |
96 | const list<IGnssCallback::GnssSvStatus> list_gnss_sv_status, const int min_observations) { | 96 | const list<IGnssCallback::GnssSvStatus> list_gnss_sv_status, const int min_observations) { |
97 | struct ComparableBlacklistedSource { | 97 | struct ComparableBlacklistedSource { |
98 | IGnssConfiguration::BlacklistedSource id; | 98 | IGnssConfiguration::BlacklistedSource id; |
@@ -113,7 +113,8 @@ IGnssConfiguration::BlacklistedSource FindStrongFrequentSource( | |||
113 | for (const auto& gnss_sv_status : list_gnss_sv_status) { | 113 | for (const auto& gnss_sv_status : list_gnss_sv_status) { |
114 | for (uint32_t iSv = 0; iSv < gnss_sv_status.numSvs; iSv++) { | 114 | for (uint32_t iSv = 0; iSv < gnss_sv_status.numSvs; iSv++) { |
115 | const auto& gnss_sv = gnss_sv_status.gnssSvList[iSv]; | 115 | const auto& gnss_sv = gnss_sv_status.gnssSvList[iSv]; |
116 | if (gnss_sv.svFlag & IGnssCallback::GnssSvFlags::USED_IN_FIX) { | 116 | if ((gnss_sv.svFlag & IGnssCallback::GnssSvFlags::USED_IN_FIX) && |
117 | (gnss_sv.constellation != GnssConstellationType::GPS)) { | ||
117 | ComparableBlacklistedSource source; | 118 | ComparableBlacklistedSource source; |
118 | source.id.svid = gnss_sv.svid; | 119 | source.id.svid = gnss_sv.svid; |
119 | source.id.constellation = gnss_sv.constellation; | 120 | source.id.constellation = gnss_sv.constellation; |
@@ -187,8 +188,12 @@ TEST_F(GnssHalTest, BlacklistIndividualSatellites) { | |||
187 | */ | 188 | */ |
188 | 189 | ||
189 | IGnssConfiguration::BlacklistedSource source_to_blacklist = | 190 | IGnssConfiguration::BlacklistedSource source_to_blacklist = |
190 | FindStrongFrequentSource(list_gnss_sv_status_, kLocationsToAwait - 1); | 191 | FindStrongFrequentNonGpsSource(list_gnss_sv_status_, kLocationsToAwait - 1); |
191 | EXPECT_NE(source_to_blacklist.constellation, GnssConstellationType::UNKNOWN); | 192 | |
193 | if (source_to_blacklist.constellation == GnssConstellationType::UNKNOWN) { | ||
194 | // Cannot find a non-GPS satellite. Let the test pass. | ||
195 | return; | ||
196 | } | ||
192 | 197 | ||
193 | // Stop locations, blacklist the common SV | 198 | // Stop locations, blacklist the common SV |
194 | StopAndClearLocations(); | 199 | StopAndClearLocations(); |