diff options
author | android-build-team Robot | 2018-05-31 02:26:45 -0500 |
---|---|---|
committer | android-build-team Robot | 2018-05-31 02:26:45 -0500 |
commit | 2c3426b4ceaccab64a0c628ce3dcc1169bc5e7d1 (patch) | |
tree | 6206873e0b36cff58687b393e994a20a3ce04e7e | |
parent | d43c43febdb7ae8272d8e1348dfd838550b96e36 (diff) | |
parent | 739c3177ea3228a26ae7a8293158f417d6105dff (diff) | |
download | platform-hardware-interfaces-2c3426b4ceaccab64a0c628ce3dcc1169bc5e7d1.tar.gz platform-hardware-interfaces-2c3426b4ceaccab64a0c628ce3dcc1169bc5e7d1.tar.xz platform-hardware-interfaces-2c3426b4ceaccab64a0c628ce3dcc1169bc5e7d1.zip |
Snap for 4813226 from 739c3177ea3228a26ae7a8293158f417d6105dff to pi-release
Change-Id: I233eb5c00cae6ca95a8c0f987bcee3afe8711248
-rw-r--r-- | current.txt | 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 | ||||
-rw-r--r-- | graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp | 9 | ||||
-rw-r--r-- | graphics/composer/2.2/IComposerClient.hal | 3 | ||||
-rw-r--r-- | graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp | 19 |
6 files changed, 41 insertions, 13 deletions
diff --git a/current.txt b/current.txt index f45af273..413efae2 100644 --- a/current.txt +++ b/current.txt | |||
@@ -342,7 +342,7 @@ a830336ac8627d6432cfafb1b884343ad9f885dee0a5323e380e6d3c519156b8 android.hardwar | |||
342 | 0b96e0254e2168cfecb30c1ed5fb42681652cc00faa68c6e07568fafe64d1d50 android.hardware.graphics.common@1.1::types | 342 | 0b96e0254e2168cfecb30c1ed5fb42681652cc00faa68c6e07568fafe64d1d50 android.hardware.graphics.common@1.1::types |
343 | 7d2cef99c838fb58038de8bbfd3cdb76ff4797241987077721715297f8d45e34 android.hardware.graphics.common@1.1::types # b/78135149 | 343 | 7d2cef99c838fb58038de8bbfd3cdb76ff4797241987077721715297f8d45e34 android.hardware.graphics.common@1.1::types # b/78135149 |
344 | d9b40a5b09962a5a0780b10fe33a4e607e69e2e088fc83de88a584115b7cb1c0 android.hardware.graphics.composer@2.2::IComposer | 344 | d9b40a5b09962a5a0780b10fe33a4e607e69e2e088fc83de88a584115b7cb1c0 android.hardware.graphics.composer@2.2::IComposer |
345 | e7717f2ff2f6db43b24370ff08e14cd353da3004b32b17740e4a7ed4894b7e45 android.hardware.graphics.composer@2.2::IComposerClient | 345 | a2f183f7fcc79aabedaef11095ab223aac0ed5ef984d850893872515e7f560c7 android.hardware.graphics.composer@2.2::IComposerClient |
346 | dd83be076b6b3f10ed62ab34d8c8b95f2415961fb785200eb842e7bfb2b0ee92 android.hardware.graphics.mapper@2.1::IMapper | 346 | dd83be076b6b3f10ed62ab34d8c8b95f2415961fb785200eb842e7bfb2b0ee92 android.hardware.graphics.mapper@2.1::IMapper |
347 | 675682dd3007805c985eaaec91612abc88f4c25b3431fb84070b7584a1a741fb android.hardware.health@2.0::IHealth | 347 | 675682dd3007805c985eaaec91612abc88f4c25b3431fb84070b7584a1a741fb android.hardware.health@2.0::IHealth |
348 | 434c4c32c00b0e54bb05e40c79503208b40f786a318029a2a4f66e34f10f2a76 android.hardware.health@2.0::IHealthInfoCallback | 348 | 434c4c32c00b0e54bb05e40c79503208b40f786a318029a2a4f66e34f10f2a76 android.hardware.health@2.0::IHealthInfoCallback |
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(); |
diff --git a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp index 8b8b530a..747c66c9 100644 --- a/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp +++ b/graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp | |||
@@ -292,9 +292,16 @@ TEST_F(GraphicsComposerHidlTest, SetActiveConfig) { | |||
292 | * Test that IComposerClient::setColorMode succeeds for all color modes. | 292 | * Test that IComposerClient::setColorMode succeeds for all color modes. |
293 | */ | 293 | */ |
294 | TEST_F(GraphicsComposerHidlTest, SetColorMode) { | 294 | TEST_F(GraphicsComposerHidlTest, SetColorMode) { |
295 | std::unordered_set<ColorMode> validModes; | ||
296 | for (auto mode : hidl_enum_iterator<ColorMode>()) { | ||
297 | validModes.insert(mode); | ||
298 | } | ||
299 | |||
295 | std::vector<ColorMode> modes = mComposerClient->getColorModes(mPrimaryDisplay); | 300 | std::vector<ColorMode> modes = mComposerClient->getColorModes(mPrimaryDisplay); |
296 | for (auto mode : modes) { | 301 | for (auto mode : modes) { |
297 | mComposerClient->setColorMode(mPrimaryDisplay, mode); | 302 | if (validModes.count(mode)) { |
303 | mComposerClient->setColorMode(mPrimaryDisplay, mode); | ||
304 | } | ||
298 | } | 305 | } |
299 | } | 306 | } |
300 | 307 | ||
diff --git a/graphics/composer/2.2/IComposerClient.hal b/graphics/composer/2.2/IComposerClient.hal index 2f0a3cca..d4a87e6f 100644 --- a/graphics/composer/2.2/IComposerClient.hal +++ b/graphics/composer/2.2/IComposerClient.hal | |||
@@ -355,7 +355,8 @@ interface IComposerClient extends @2.1::IComposerClient { | |||
355 | * Returns the render intents supported by the specified display and color | 355 | * Returns the render intents supported by the specified display and color |
356 | * mode. | 356 | * mode. |
357 | * | 357 | * |
358 | * RenderIntent::COLORIMETRIC is always supported. | 358 | * For SDR color modes, RenderIntent::COLORIMETRIC must be supported. For |
359 | * HDR color modes, RenderIntent::TONE_MAP_COLORIMETRIC must be supported. | ||
359 | * | 360 | * |
360 | * @param display is the display to query. | 361 | * @param display is the display to query. |
361 | * @param mode is the color mode to query. | 362 | * @param mode is the color mode to query. |
diff --git a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp index f0d22504..23bf5583 100644 --- a/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp +++ b/graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2TargetTest.cpp | |||
@@ -347,9 +347,22 @@ TEST_F(GraphicsComposerHidlTest, GetRenderIntent) { | |||
347 | for (auto mode : modes) { | 347 | for (auto mode : modes) { |
348 | std::vector<RenderIntent> intents = | 348 | std::vector<RenderIntent> intents = |
349 | mComposerClient->getRenderIntents(mPrimaryDisplay, mode); | 349 | mComposerClient->getRenderIntents(mPrimaryDisplay, mode); |
350 | auto colorimetricIntent = | 350 | |
351 | std::find(intents.cbegin(), intents.cend(), RenderIntent::COLORIMETRIC); | 351 | bool isHdr; |
352 | EXPECT_NE(intents.cend(), colorimetricIntent); | 352 | switch (mode) { |
353 | case ColorMode::BT2100_PQ: | ||
354 | case ColorMode::BT2100_HLG: | ||
355 | isHdr = true; | ||
356 | break; | ||
357 | default: | ||
358 | isHdr = false; | ||
359 | break; | ||
360 | } | ||
361 | RenderIntent requiredIntent = | ||
362 | isHdr ? RenderIntent::TONE_MAP_COLORIMETRIC : RenderIntent::COLORIMETRIC; | ||
363 | |||
364 | auto iter = std::find(intents.cbegin(), intents.cend(), requiredIntent); | ||
365 | EXPECT_NE(intents.cend(), iter); | ||
353 | } | 366 | } |
354 | } | 367 | } |
355 | 368 | ||