Loading graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -790,7 +790,7 @@ TEST_F(GraphicsComposerHidlCommandTest, PRESENT_DISPLAY) { TEST_F(GraphicsComposerHidlCommandTest, PRESENT_DISPLAY_NO_LAYER_STATE_CHANGES) { mWriter->selectDisplay(mPrimaryDisplay); mComposerClient->setPowerMode(mPrimaryDisplay, IComposerClient::PowerMode::ON); mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB); mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::NATIVE); auto handle = allocate(); ASSERT_NE(nullptr, handle); Loading graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp +53 −33 Original line number Diff line number Diff line Loading @@ -182,6 +182,14 @@ class GraphicsComposerReadbackTest : public ::testing::VtsHalHidlTargetTestBase mReader = std::make_unique<TestCommandReader>(); mGralloc = std::make_shared<Gralloc>(); std::vector<ColorMode> colorModes = mComposerClient->getColorModes(mPrimaryDisplay); if (std::find(colorModes.begin(), colorModes.end(), ColorMode::SRGB) == colorModes.end()) { mHasReadbackBuffer = false; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); mComposerClient->getRaw()->getReadbackBufferAttributes( mPrimaryDisplay, [&](const auto& tmpError, const auto& tmpPixelFormat, const auto& tmpDataspace) { Loading Loading @@ -471,12 +479,12 @@ class TestBufferLayer : public TestLayer { TEST_F(GraphicsComposerReadbackTest, SingleSolidColorLayer) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); auto layer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); IComposerClient::Rect coloredSquare({0, 0, mDisplayWidth, mDisplayHeight}); Loading Loading @@ -515,12 +523,13 @@ TEST_F(GraphicsComposerReadbackTest, SingleSolidColorLayer) { TEST_F(GraphicsComposerReadbackTest, SetLayerBuffer) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth, mDisplayHeight, mPixelFormat, mDataspace); ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer()); Loading Loading @@ -562,13 +571,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerBuffer) { TEST_F(GraphicsComposerReadbackTest, SetLayerBufferNoEffect) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); auto layer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); IComposerClient::Rect coloredSquare({0, 0, mDisplayWidth, mDisplayHeight}); Loading Loading @@ -611,12 +620,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerBufferNoEffect) { TEST_F(GraphicsComposerReadbackTest, ClientComposition) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); fillColorsArea(expectedColors, mDisplayWidth, {0, 0, mDisplayWidth, mDisplayHeight / 4}, RED); fillColorsArea(expectedColors, mDisplayWidth, Loading Loading @@ -690,11 +700,13 @@ TEST_F(GraphicsComposerReadbackTest, ClientComposition) { TEST_F(GraphicsComposerReadbackTest, DeviceAndClientComposition) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE( mComposerClient->setClientTargetSlotCount(mPrimaryDisplay, kClientTargetSlotCount)); Loading Loading @@ -776,12 +788,13 @@ TEST_F(GraphicsComposerReadbackTest, DeviceAndClientComposition) { TEST_F(GraphicsComposerReadbackTest, SetLayerDamage) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelformat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); IComposerClient::Rect redRect = {0, 0, mDisplayWidth / 4, mDisplayHeight / 4}; std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); Loading Loading @@ -842,14 +855,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerDamage) { TEST_F(GraphicsComposerReadbackTest, SetLayerPlaneAlpha) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); auto layer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); layer->setColor(RED); layer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight}); Loading Loading @@ -886,12 +898,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerPlaneAlpha) { TEST_F(GraphicsComposerReadbackTest, SetLayerSourceCrop) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); fillColorsArea(expectedColors, mDisplayWidth, {0, 0, mDisplayWidth, mDisplayHeight / 4}, RED); fillColorsArea(expectedColors, mDisplayWidth, Loading Loading @@ -931,14 +944,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerSourceCrop) { TEST_F(GraphicsComposerReadbackTest, SetLayerZOrder) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); IComposerClient::Rect redRect = {0, 0, mDisplayWidth, mDisplayHeight / 2}; IComposerClient::Rect blueRect = {0, mDisplayHeight / 4, mDisplayWidth, mDisplayHeight}; auto redLayer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); Loading Loading @@ -1081,12 +1093,13 @@ class GraphicsComposerBlendModeReadbackTest : public GraphicsComposerReadbackTes TEST_P(GraphicsComposerBlendModeReadbackTest, None) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); setBackgroundColor(BLACK); Loading Loading @@ -1118,12 +1131,13 @@ TEST_P(GraphicsComposerBlendModeReadbackTest, None) { // alpha of .2, expected 10.2 TEST_P(GraphicsComposerBlendModeReadbackTest, DISABLED_Coverage) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); setBackgroundColor(BLACK); Loading Loading @@ -1153,12 +1167,13 @@ TEST_P(GraphicsComposerBlendModeReadbackTest, DISABLED_Coverage) { TEST_P(GraphicsComposerBlendModeReadbackTest, Premultiplied) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); setBackgroundColor(BLACK); Loading Loading @@ -1193,10 +1208,6 @@ class GraphicsComposerTransformReadbackTest : public GraphicsComposerReadbackTes void SetUp() override { GraphicsComposerReadbackTest::SetUp(); mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); auto backgroundLayer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); backgroundLayer->setColor({0, 0, 0, 0}); backgroundLayer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight}); Loading Loading @@ -1230,6 +1241,9 @@ class GraphicsComposerTransformReadbackTest : public GraphicsComposerReadbackTes TEST_F(GraphicsComposerTransformReadbackTest, FLIP_H) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } Loading Loading @@ -1262,6 +1276,9 @@ TEST_F(GraphicsComposerTransformReadbackTest, FLIP_H) { TEST_F(GraphicsComposerTransformReadbackTest, FLIP_V) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } Loading Loading @@ -1295,6 +1312,9 @@ TEST_F(GraphicsComposerTransformReadbackTest, FLIP_V) { TEST_F(GraphicsComposerTransformReadbackTest, ROT_180) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } Loading radio/1.2/vts/functional/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ cc_test { srcs: [ "radio_hidl_hal_api.cpp", "radio_hidl_hal_test.cpp", "radio_config_response.cpp", "radio_response.cpp", "radio_indication.cpp", "VtsHalRadioV1_2TargetTest.cpp", Loading @@ -29,6 +30,8 @@ cc_test { "android.hardware.radio@1.2", "android.hardware.radio@1.1", "android.hardware.radio@1.0", "android.hardware.radio.config@1.0", "android.hardware.radio.config@1.1", ], header_libs: ["radio.util.header@1.0"], test_suites: ["general-tests"], Loading radio/1.2/vts/functional/radio_config_response.cpp 0 → 100644 +59 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <radio_hidl_hal_utils_v1_2.h> RadioConfigResponse::RadioConfigResponse(RadioHidlTest_v1_2& parent) : parent_v1_2(parent) {} Return<void> RadioConfigResponse::getSimSlotsStatusResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec<SimSlotStatus>& slotStatus) { rspInfo = info; simSlotStatus = slotStatus; parent_v1_2.notify(info.serial); return Void(); } Return<void> RadioConfigResponse::setSimSlotsMappingResponse(const RadioResponseInfo& /* info */) { return Void(); } Return<void> RadioConfigResponse::getPhoneCapabilityResponse( const RadioResponseInfo& info, const PhoneCapability& phoneCapability) { rspInfo = info; phoneCap = phoneCapability; parent_v1_2.notify(info.serial); return Void(); } Return<void> RadioConfigResponse::setPreferredDataModemResponse(const RadioResponseInfo& info) { rspInfo = info; parent_v1_2.notify(info.serial); return Void(); } Return<void> RadioConfigResponse::getModemsConfigResponse(const RadioResponseInfo& info, const ModemsConfig& /* mConfig */) { rspInfo = info; parent_v1_2.notify(info.serial); return Void(); } Return<void> RadioConfigResponse::setModemsConfigResponse(const RadioResponseInfo& info) { rspInfo = info; parent_v1_2.notify(info.serial); return Void(); } radio/1.2/vts/functional/radio_hidl_hal_api.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,15 @@ const RadioAccessSpecifier GERAN_SPECIFIER_850 = {.radioAccessNetwork = RadioAcc TEST_F(RadioHidlTest_v1_2, startNetworkScan) { serial = GetRandomSerialNumber(); if (radioConfig != NULL && DDS_LOGICAL_SLOT_INDEX != logicalSlotId) { // Some DSDS devices have a limitation that network scans can only be performed on the // logical modem that currently used for packet data. For now, skip the test on the // non-data SIM. This exemption is removed in HAL version 1.4. See b/135243177 for // additional information. ALOGI("Skip network scan on non-dds SIM, slot id = %d", logicalSlotId); return; } ::android::hardware::radio::V1_2::NetworkScanRequest request = { .type = ScanType::ONE_SHOT, .interval = 60, Loading Loading
graphics/composer/2.1/vts/functional/VtsHalGraphicsComposerV2_1TargetTest.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -790,7 +790,7 @@ TEST_F(GraphicsComposerHidlCommandTest, PRESENT_DISPLAY) { TEST_F(GraphicsComposerHidlCommandTest, PRESENT_DISPLAY_NO_LAYER_STATE_CHANGES) { mWriter->selectDisplay(mPrimaryDisplay); mComposerClient->setPowerMode(mPrimaryDisplay, IComposerClient::PowerMode::ON); mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB); mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::NATIVE); auto handle = allocate(); ASSERT_NE(nullptr, handle); Loading
graphics/composer/2.2/vts/functional/VtsHalGraphicsComposerV2_2ReadbackTest.cpp +53 −33 Original line number Diff line number Diff line Loading @@ -182,6 +182,14 @@ class GraphicsComposerReadbackTest : public ::testing::VtsHalHidlTargetTestBase mReader = std::make_unique<TestCommandReader>(); mGralloc = std::make_shared<Gralloc>(); std::vector<ColorMode> colorModes = mComposerClient->getColorModes(mPrimaryDisplay); if (std::find(colorModes.begin(), colorModes.end(), ColorMode::SRGB) == colorModes.end()) { mHasReadbackBuffer = false; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); mComposerClient->getRaw()->getReadbackBufferAttributes( mPrimaryDisplay, [&](const auto& tmpError, const auto& tmpPixelFormat, const auto& tmpDataspace) { Loading Loading @@ -471,12 +479,12 @@ class TestBufferLayer : public TestLayer { TEST_F(GraphicsComposerReadbackTest, SingleSolidColorLayer) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); auto layer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); IComposerClient::Rect coloredSquare({0, 0, mDisplayWidth, mDisplayHeight}); Loading Loading @@ -515,12 +523,13 @@ TEST_F(GraphicsComposerReadbackTest, SingleSolidColorLayer) { TEST_F(GraphicsComposerReadbackTest, SetLayerBuffer) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ReadbackBuffer readbackBuffer(mPrimaryDisplay, mComposerClient, mGralloc, mDisplayWidth, mDisplayHeight, mPixelFormat, mDataspace); ASSERT_NO_FATAL_FAILURE(readbackBuffer.setReadbackBuffer()); Loading Loading @@ -562,13 +571,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerBuffer) { TEST_F(GraphicsComposerReadbackTest, SetLayerBufferNoEffect) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); auto layer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); IComposerClient::Rect coloredSquare({0, 0, mDisplayWidth, mDisplayHeight}); Loading Loading @@ -611,12 +620,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerBufferNoEffect) { TEST_F(GraphicsComposerReadbackTest, ClientComposition) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); fillColorsArea(expectedColors, mDisplayWidth, {0, 0, mDisplayWidth, mDisplayHeight / 4}, RED); fillColorsArea(expectedColors, mDisplayWidth, Loading Loading @@ -690,11 +700,13 @@ TEST_F(GraphicsComposerReadbackTest, ClientComposition) { TEST_F(GraphicsComposerReadbackTest, DeviceAndClientComposition) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE( mComposerClient->setClientTargetSlotCount(mPrimaryDisplay, kClientTargetSlotCount)); Loading Loading @@ -776,12 +788,13 @@ TEST_F(GraphicsComposerReadbackTest, DeviceAndClientComposition) { TEST_F(GraphicsComposerReadbackTest, SetLayerDamage) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelformat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); IComposerClient::Rect redRect = {0, 0, mDisplayWidth / 4, mDisplayHeight / 4}; std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); Loading Loading @@ -842,14 +855,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerDamage) { TEST_F(GraphicsComposerReadbackTest, SetLayerPlaneAlpha) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); auto layer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); layer->setColor(RED); layer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight}); Loading Loading @@ -886,12 +898,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerPlaneAlpha) { TEST_F(GraphicsComposerReadbackTest, SetLayerSourceCrop) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); fillColorsArea(expectedColors, mDisplayWidth, {0, 0, mDisplayWidth, mDisplayHeight / 4}, RED); fillColorsArea(expectedColors, mDisplayWidth, Loading Loading @@ -931,14 +944,13 @@ TEST_F(GraphicsComposerReadbackTest, SetLayerSourceCrop) { TEST_F(GraphicsComposerReadbackTest, SetLayerZOrder) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); IComposerClient::Rect redRect = {0, 0, mDisplayWidth, mDisplayHeight / 2}; IComposerClient::Rect blueRect = {0, mDisplayHeight / 4, mDisplayWidth, mDisplayHeight}; auto redLayer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); Loading Loading @@ -1081,12 +1093,13 @@ class GraphicsComposerBlendModeReadbackTest : public GraphicsComposerReadbackTes TEST_P(GraphicsComposerBlendModeReadbackTest, None) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); setBackgroundColor(BLACK); Loading Loading @@ -1118,12 +1131,13 @@ TEST_P(GraphicsComposerBlendModeReadbackTest, None) { // alpha of .2, expected 10.2 TEST_P(GraphicsComposerBlendModeReadbackTest, DISABLED_Coverage) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); setBackgroundColor(BLACK); Loading Loading @@ -1153,12 +1167,13 @@ TEST_P(GraphicsComposerBlendModeReadbackTest, DISABLED_Coverage) { TEST_P(GraphicsComposerBlendModeReadbackTest, Premultiplied) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } mWriter->selectDisplay(mPrimaryDisplay); std::vector<IComposerClient::Color> expectedColors(mDisplayWidth * mDisplayHeight); setBackgroundColor(BLACK); Loading Loading @@ -1193,10 +1208,6 @@ class GraphicsComposerTransformReadbackTest : public GraphicsComposerReadbackTes void SetUp() override { GraphicsComposerReadbackTest::SetUp(); mWriter->selectDisplay(mPrimaryDisplay); ASSERT_NO_FATAL_FAILURE(mComposerClient->setColorMode(mPrimaryDisplay, ColorMode::SRGB, RenderIntent::COLORIMETRIC)); auto backgroundLayer = std::make_shared<TestColorLayer>(mComposerClient, mPrimaryDisplay); backgroundLayer->setColor({0, 0, 0, 0}); backgroundLayer->setDisplayFrame({0, 0, mDisplayWidth, mDisplayHeight}); Loading Loading @@ -1230,6 +1241,9 @@ class GraphicsComposerTransformReadbackTest : public GraphicsComposerReadbackTes TEST_F(GraphicsComposerTransformReadbackTest, FLIP_H) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } Loading Loading @@ -1262,6 +1276,9 @@ TEST_F(GraphicsComposerTransformReadbackTest, FLIP_H) { TEST_F(GraphicsComposerTransformReadbackTest, FLIP_V) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } Loading Loading @@ -1295,6 +1312,9 @@ TEST_F(GraphicsComposerTransformReadbackTest, FLIP_V) { TEST_F(GraphicsComposerTransformReadbackTest, ROT_180) { if (!mHasReadbackBuffer) { std::cout << "Readback not supported or unsuppported pixelFormat/dataspace or SRGB not a " "valid color mode" << std::endl; GTEST_SUCCEED() << "Readback not supported or unsupported pixelFormat/dataspace"; return; } Loading
radio/1.2/vts/functional/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ cc_test { srcs: [ "radio_hidl_hal_api.cpp", "radio_hidl_hal_test.cpp", "radio_config_response.cpp", "radio_response.cpp", "radio_indication.cpp", "VtsHalRadioV1_2TargetTest.cpp", Loading @@ -29,6 +30,8 @@ cc_test { "android.hardware.radio@1.2", "android.hardware.radio@1.1", "android.hardware.radio@1.0", "android.hardware.radio.config@1.0", "android.hardware.radio.config@1.1", ], header_libs: ["radio.util.header@1.0"], test_suites: ["general-tests"], Loading
radio/1.2/vts/functional/radio_config_response.cpp 0 → 100644 +59 −0 Original line number Diff line number Diff line /* * Copyright (C) 2019 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include <radio_hidl_hal_utils_v1_2.h> RadioConfigResponse::RadioConfigResponse(RadioHidlTest_v1_2& parent) : parent_v1_2(parent) {} Return<void> RadioConfigResponse::getSimSlotsStatusResponse( const RadioResponseInfo& info, const ::android::hardware::hidl_vec<SimSlotStatus>& slotStatus) { rspInfo = info; simSlotStatus = slotStatus; parent_v1_2.notify(info.serial); return Void(); } Return<void> RadioConfigResponse::setSimSlotsMappingResponse(const RadioResponseInfo& /* info */) { return Void(); } Return<void> RadioConfigResponse::getPhoneCapabilityResponse( const RadioResponseInfo& info, const PhoneCapability& phoneCapability) { rspInfo = info; phoneCap = phoneCapability; parent_v1_2.notify(info.serial); return Void(); } Return<void> RadioConfigResponse::setPreferredDataModemResponse(const RadioResponseInfo& info) { rspInfo = info; parent_v1_2.notify(info.serial); return Void(); } Return<void> RadioConfigResponse::getModemsConfigResponse(const RadioResponseInfo& info, const ModemsConfig& /* mConfig */) { rspInfo = info; parent_v1_2.notify(info.serial); return Void(); } Return<void> RadioConfigResponse::setModemsConfigResponse(const RadioResponseInfo& info) { rspInfo = info; parent_v1_2.notify(info.serial); return Void(); }
radio/1.2/vts/functional/radio_hidl_hal_api.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -34,6 +34,15 @@ const RadioAccessSpecifier GERAN_SPECIFIER_850 = {.radioAccessNetwork = RadioAcc TEST_F(RadioHidlTest_v1_2, startNetworkScan) { serial = GetRandomSerialNumber(); if (radioConfig != NULL && DDS_LOGICAL_SLOT_INDEX != logicalSlotId) { // Some DSDS devices have a limitation that network scans can only be performed on the // logical modem that currently used for packet data. For now, skip the test on the // non-data SIM. This exemption is removed in HAL version 1.4. See b/135243177 for // additional information. ALOGI("Skip network scan on non-dds SIM, slot id = %d", logicalSlotId); return; } ::android::hardware::radio::V1_2::NetworkScanRequest request = { .type = ScanType::ONE_SHOT, .interval = 60, Loading