From e6477dc808ab7b2d734ee95a20c77d65721caa7b Mon Sep 17 00:00:00 2001 From: Changyeon Jo Date: Thu, 5 Mar 2020 17:01:26 -0800 Subject: [PATCH] Use Google-style C++ loggers This change replaces ALOG* usages in VtsHalEvsV1_1 with Google-style C++ loggers. Bug: 150893461 Test: Run VtsHalEvsV1_1TargetTest Change-Id: Ia93c5a00d580bae99d15a7a893e57e0f1e2397d5 --- .../functional/VtsHalEvsV1_1TargetTest.cpp | 138 ++++++++++-------- 1 file changed, 76 insertions(+), 62 deletions(-) diff --git a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp index cde80482cb..b31795bcb5 100644 --- a/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp +++ b/automotive/evs/1.1/vts/functional/VtsHalEvsV1_1TargetTest.cpp @@ -38,16 +38,15 @@ static const float kNanoToSeconds = 0.000000001f; #include #include -#include #include #include -#include #include #include #include #include #include +#include #include #include #include @@ -120,11 +119,12 @@ protected: // Get the camera list pEnumerator->getCameraList_1_1( [this](hidl_vec cameraList) { - ALOGI("Camera list callback received %zu cameras", - cameraList.size()); + LOG(INFO) << "Camera list callback received " + << cameraList.size() + << " cameras"; cameraInfo.reserve(cameraList.size()); for (auto&& cam: cameraList) { - ALOGI("Found camera %s", cam.v1.cameraId.c_str()); + LOG(INFO) << "Found camera " << cam.v1.cameraId; cameraInfo.push_back(cam); } } @@ -137,10 +137,12 @@ protected: // Get the ultrasonics array list pEnumerator->getUltrasonicsArrayList([this](hidl_vec ultraList) { - ALOGI("Ultrasonics array list callback received %zu arrays", ultraList.size()); + LOG(INFO) << "Ultrasonics array list callback received " + << ultraList.size() + << " arrays"; ultrasonicsArraysInfo.reserve(ultraList.size()); for (auto&& ultraArray : ultraList) { - ALOGI("Found ultrasonics array %s", ultraArray.ultrasonicsArrayId.c_str()); + LOG(INFO) << "Found ultrasonics array " << ultraArray.ultrasonicsArrayId; ultrasonicsArraysInfo.push_back(ultraArray); } }); @@ -195,7 +197,7 @@ protected: if (!flag) { // EVS assumes that the device w/o a valid metadata is a physical // device. - ALOGI("%s is not a logical camera device.", id.c_str()); + LOG(INFO) << id << " is not a logical camera device."; physicalCameras.emplace(id); return physicalCameras; } @@ -205,7 +207,9 @@ protected: int rc = find_camera_metadata_ro_entry(metadata, ANDROID_LOGICAL_MULTI_CAMERA_PHYSICAL_IDS, &entry); - ALOGE_IF(rc, "No physical camera ID is found for a logical camera device"); + if (rc != 0) { + LOG(ERROR) << "No physical camera ID is found for a logical camera device"; + } const uint8_t *ids = entry.data.u8; size_t start = 0; @@ -219,7 +223,10 @@ protected: } } - ALOGI("%s consists of %d physical camera devices.", id.c_str(), (int)physicalCameras.size()); + LOG(INFO) << id + << " consists of " + << physicalCameras.size() + << " physical camera devices"; return physicalCameras; } @@ -247,7 +254,7 @@ protected: * call to closeCamera. Then repeats the test to ensure all cameras can be reopened. */ TEST_P(EvsHidlTest, CameraOpenClean) { - ALOGI("Starting CameraOpenClean test"); + LOG(INFO) << "Starting CameraOpenClean test"; // Get the camera list loadCameraList(); @@ -261,7 +268,7 @@ TEST_P(EvsHidlTest, CameraOpenClean) { bool isLogicalCam = false; auto devices = getPhysicalCameraIds(cam.v1.cameraId, isLogicalCam); if (mIsHwModule && isLogicalCam) { - ALOGI("Skip a logical device %s for HW module", cam.v1.cameraId.c_str()); + LOG(INFO) << "Skip a logical device, " << cam.v1.cameraId << " for HW target."; continue; } @@ -286,7 +293,7 @@ TEST_P(EvsHidlTest, CameraOpenClean) { // Verify that this camera self-identifies correctly pCam->getCameraInfo_1_1([&cam](CameraDesc desc) { - ALOGD("Found camera %s", desc.v1.cameraId.c_str()); + LOG(DEBUG) << "Found camera " << desc.v1.cameraId; EXPECT_EQ(cam.v1.cameraId, desc.v1.cameraId); } ); @@ -316,7 +323,7 @@ TEST_P(EvsHidlTest, CameraOpenClean) { * the system to be tolerant of shutdown/restart race conditions. */ TEST_P(EvsHidlTest, CameraOpenAggressive) { - ALOGI("Starting CameraOpenAggressive test"); + LOG(INFO) << "Starting CameraOpenAggressive test"; // Get the camera list loadCameraList(); @@ -330,7 +337,7 @@ TEST_P(EvsHidlTest, CameraOpenAggressive) { bool isLogicalCam = false; getPhysicalCameraIds(cam.v1.cameraId, isLogicalCam); if (mIsHwModule && isLogicalCam) { - ALOGI("Skip a logical device %s for HW module", cam.v1.cameraId.c_str()); + LOG(INFO) << "Skip a logical device, " << cam.v1.cameraId << " for HW target."; continue; } @@ -345,7 +352,7 @@ TEST_P(EvsHidlTest, CameraOpenAggressive) { // Verify that this camera self-identifies correctly pCam->getCameraInfo_1_1([&cam](CameraDesc desc) { - ALOGD("Found camera %s", desc.v1.cameraId.c_str()); + LOG(DEBUG) << "Found camera " << desc.v1.cameraId; EXPECT_EQ(cam.v1.cameraId, desc.v1.cameraId); } ); @@ -374,7 +381,7 @@ TEST_P(EvsHidlTest, CameraOpenAggressive) { // Verify that the second camera instance self-identifies correctly pCam2->getCameraInfo_1_1([&cam](CameraDesc desc) { - ALOGD("Found camera %s", desc.v1.cameraId.c_str()); + LOG(DEBUG) << "Found camera " << desc.v1.cameraId; EXPECT_EQ(cam.v1.cameraId, desc.v1.cameraId); } ); @@ -393,7 +400,7 @@ TEST_P(EvsHidlTest, CameraOpenAggressive) { * Measure and qualify the stream start up time and streaming frame rate of each reported camera */ TEST_P(EvsHidlTest, CameraStreamPerformance) { - ALOGI("Starting CameraStreamPerformance test"); + LOG(INFO) << "Starting CameraStreamPerformance test"; // Get the camera list loadCameraList(); @@ -407,7 +414,7 @@ TEST_P(EvsHidlTest, CameraStreamPerformance) { bool isLogicalCam = false; auto devices = getPhysicalCameraIds(cam.v1.cameraId, isLogicalCam); if (mIsHwModule && isLogicalCam) { - ALOGI("Skip a logical device %s", cam.v1.cameraId.c_str()); + LOG(INFO) << "Skip a logical device " << cam.v1.cameraId; continue; } @@ -444,8 +451,10 @@ TEST_P(EvsHidlTest, CameraStreamPerformance) { kMaxStreamStartMilliseconds * devices.size()); printf("%s: Measured time to first frame %0.2f ms\n", cam.v1.cameraId.c_str(), timeToFirstFrame * kNanoToMilliseconds); - ALOGI("%s: Measured time to first frame %0.2f ms", - cam.v1.cameraId.c_str(), timeToFirstFrame * kNanoToMilliseconds); + LOG(INFO) << cam.v1.cameraId + << ": Measured time to first frame " + << std::scientific << timeToFirstFrame * kNanoToMilliseconds + << " ms."; // Check aspect ratio unsigned width = 0, height = 0; @@ -468,7 +477,9 @@ TEST_P(EvsHidlTest, CameraStreamPerformance) { nsecs_t runTime = end - firstFrame; float framesPerSecond = framesReceived / (runTime * kNanoToSeconds); printf("Measured camera rate %3.2f fps\n", framesPerSecond); - ALOGI("Measured camera rate %3.2f fps", framesPerSecond); + LOG(INFO) << "Measured camera rate " + << std::scientific << framesPerSecond + << " fps."; EXPECT_GE(framesPerSecond, kMinimumFramesPerSecond); // Explicitly release the camera @@ -483,7 +494,7 @@ TEST_P(EvsHidlTest, CameraStreamPerformance) { * than one frame time. The camera must cleanly skip frames until the client is ready again. */ TEST_P(EvsHidlTest, CameraStreamBuffering) { - ALOGI("Starting CameraStreamBuffering test"); + LOG(INFO) << "Starting CameraStreamBuffering test"; // Arbitrary constant (should be > 1 and less than crazy) static const unsigned int kBuffersToHold = 6; @@ -500,7 +511,7 @@ TEST_P(EvsHidlTest, CameraStreamBuffering) { bool isLogicalCam = false; getPhysicalCameraIds(cam.v1.cameraId, isLogicalCam); if (mIsHwModule && isLogicalCam) { - ALOGI("Skip a logical device %s for HW module", cam.v1.cameraId.c_str()); + LOG(INFO) << "Skip a logical device " << cam.v1.cameraId << " for HW target."; continue; } @@ -568,7 +579,7 @@ TEST_P(EvsHidlTest, CameraStreamBuffering) { * which a human could observe to see the operation of the system on the physical display. */ TEST_P(EvsHidlTest, CameraToDisplayRoundTrip) { - ALOGI("Starting CameraToDisplayRoundTrip test"); + LOG(INFO) << "Starting CameraToDisplayRoundTrip test"; // Get the camera list loadCameraList(); @@ -587,14 +598,14 @@ TEST_P(EvsHidlTest, CameraToDisplayRoundTrip) { // Request exclusive access to the first EVS display sp pDisplay = pEnumerator->openDisplay_1_1(targetDisplayId); ASSERT_NE(pDisplay, nullptr); - ALOGI("Display %d is in use.", targetDisplayId); + LOG(INFO) << "Display " << targetDisplayId << " is alreay in use."; // Get the display descriptor pDisplay->getDisplayInfo_1_1([](const auto& config, const auto& state) { android::DisplayConfig* pConfig = (android::DisplayConfig*)config.data(); const auto width = pConfig->resolution.getWidth(); const auto height = pConfig->resolution.getHeight(); - ALOGI(" Resolution: %dx%d", width, height); + LOG(INFO) << " Resolution: " << width << "x" << height; ASSERT_GT(width, 0); ASSERT_GT(height, 0); @@ -607,7 +618,7 @@ TEST_P(EvsHidlTest, CameraToDisplayRoundTrip) { bool isLogicalCam = false; getPhysicalCameraIds(cam.v1.cameraId, isLogicalCam); if (mIsHwModule && isLogicalCam) { - ALOGI("Skip a logical device %s for HW module", cam.v1.cameraId.c_str()); + LOG(INFO) << "Skip a logical device " << cam.v1.cameraId << " for HW target."; continue; } @@ -667,7 +678,7 @@ TEST_P(EvsHidlTest, CameraToDisplayRoundTrip) { * underlying camera. */ TEST_P(EvsHidlTest, MultiCameraStream) { - ALOGI("Starting MultiCameraStream test"); + LOG(INFO) << "Starting MultiCameraStream test"; if (mIsHwModule) { // This test is not for HW module implementation. @@ -735,7 +746,9 @@ TEST_P(EvsHidlTest, MultiCameraStream) { nsecs_t runTime = end - firstFrame; float framesPerSecond0 = framesReceived0 / (runTime * kNanoToSeconds); float framesPerSecond1 = framesReceived1 / (runTime * kNanoToSeconds); - ALOGI("Measured camera rate %3.2f fps and %3.2f fps", framesPerSecond0, framesPerSecond1); + LOG(INFO) << "Measured camera rate " + << std::scientific << framesPerSecond0 << " fps and " + << framesPerSecond1 << " fps"; EXPECT_GE(framesPerSecond0, kMinimumFramesPerSecond); EXPECT_GE(framesPerSecond1, kMinimumFramesPerSecond); @@ -774,7 +787,7 @@ TEST_P(EvsHidlTest, MultiCameraStream) { * Verify that a client can adjust a camera parameter. */ TEST_P(EvsHidlTest, CameraParameter) { - ALOGI("Starting CameraParameter test"); + LOG(INFO) << "Starting CameraParameter test"; // Get the camera list loadCameraList(); @@ -791,7 +804,7 @@ TEST_P(EvsHidlTest, CameraParameter) { if (isLogicalCam) { // TODO(b/145465724): Support camera parameter programming on // logical devices. - ALOGI("Skip a logical device %s", cam.v1.cameraId.c_str()); + LOG(INFO) << "Skip a logical device " << cam.v1.cameraId; continue; } @@ -918,7 +931,7 @@ TEST_P(EvsHidlTest, CameraParameter) { * terminates or releases a role. */ TEST_P(EvsHidlTest, CameraMasterRelease) { - ALOGI("Starting CameraMasterRelease test"); + LOG(INFO) << "Starting CameraMasterRelease test"; if (mIsHwModule) { // This test is not for HW module implementation. @@ -939,7 +952,7 @@ TEST_P(EvsHidlTest, CameraMasterRelease) { if (isLogicalCam) { // TODO(b/145465724): Support camera parameter programming on // logical devices. - ALOGI("Skip a logical device %s", cam.v1.cameraId.c_str()); + LOG(INFO) << "Skip a logical device " << cam.v1.cameraId; continue; } @@ -1012,7 +1025,7 @@ TEST_P(EvsHidlTest, CameraMasterRelease) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::MASTER_RELEASED; if (!frameHandlerNonMaster->waitForEvent(aTargetEvent, aNotification, true)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } @@ -1057,7 +1070,7 @@ TEST_P(EvsHidlTest, CameraMasterRelease) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::MASTER_RELEASED; if (!frameHandlerMaster->waitForEvent(aTargetEvent, aNotification, true)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } @@ -1099,7 +1112,7 @@ TEST_P(EvsHidlTest, CameraMasterRelease) { * camera parameters. */ TEST_P(EvsHidlTest, MultiCameraParameter) { - ALOGI("Starting MultiCameraParameter test"); + LOG(INFO) << "Starting MultiCameraParameter test"; if (mIsHwModule) { // This test is not for HW module implementation. @@ -1120,7 +1133,7 @@ TEST_P(EvsHidlTest, MultiCameraParameter) { if (isLogicalCam) { // TODO(b/145465724): Support camera parameter programming on // logical devices. - ALOGI("Skip a logical device %s", cam.v1.cameraId.c_str()); + LOG(INFO) << "Skip a logical device " << cam.v1.cameraId; continue; } @@ -1256,7 +1269,7 @@ TEST_P(EvsHidlTest, MultiCameraParameter) { aTargetEvent.payload[0] = static_cast(cmd); aTargetEvent.payload[1] = val0; if (!frameHandlerMaster->waitForEvent(aTargetEvent, aNotification0)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1273,7 +1286,7 @@ TEST_P(EvsHidlTest, MultiCameraParameter) { aTargetEvent.payload[0] = static_cast(cmd); aTargetEvent.payload[1] = val0; if (!frameHandlerNonMaster->waitForEvent(aTargetEvent, aNotification1)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1374,7 +1387,7 @@ TEST_P(EvsHidlTest, MultiCameraParameter) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::MASTER_RELEASED; if (!frameHandlerNonMaster->waitForEvent(aTargetEvent, aNotification0, true)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1466,7 +1479,7 @@ TEST_P(EvsHidlTest, MultiCameraParameter) { aTargetEvent.payload[0] = static_cast(cmd); aTargetEvent.payload[1] = val0; if (!frameHandlerMaster->waitForEvent(aTargetEvent, aNotification0)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1482,7 +1495,7 @@ TEST_P(EvsHidlTest, MultiCameraParameter) { aTargetEvent.payload[0] = static_cast(cmd); aTargetEvent.payload[1] = val0; if (!frameHandlerNonMaster->waitForEvent(aTargetEvent, aNotification1)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1572,7 +1585,7 @@ TEST_P(EvsHidlTest, MultiCameraParameter) { * a master role from other EVS clients without the display. */ TEST_P(EvsHidlTest, HighPriorityCameraClient) { - ALOGI("Starting HighPriorityCameraClient test"); + LOG(INFO) << "Starting HighPriorityCameraClient test"; if (mIsHwModule) { // This test is not for HW module implementation. @@ -1687,7 +1700,7 @@ TEST_P(EvsHidlTest, HighPriorityCameraClient) { aTargetEvent.payload[0] = static_cast(CameraParam::AUTO_FOCUS); aTargetEvent.payload[1] = 0; if (!frameHandler0->waitForEvent(aTargetEvent, aNotification)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1740,7 +1753,7 @@ TEST_P(EvsHidlTest, HighPriorityCameraClient) { aTargetEvent.payload[0] = static_cast(cam1Cmds[0]); aTargetEvent.payload[1] = val0; if (!frameHandler1->waitForEvent(aTargetEvent, aNotification)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1791,7 +1804,7 @@ TEST_P(EvsHidlTest, HighPriorityCameraClient) { EvsEventDesc aTargetEvent; aTargetEvent.aType = EvsEventType::MASTER_RELEASED; if (!frameHandler1->waitForEvent(aTargetEvent, aNotification, true)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1833,7 +1846,7 @@ TEST_P(EvsHidlTest, HighPriorityCameraClient) { aTargetEvent.payload[0] = static_cast(CameraParam::AUTO_FOCUS); aTargetEvent.payload[1] = 0; if (!frameHandler1->waitForEvent(aTargetEvent, aNotification)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1882,7 +1895,7 @@ TEST_P(EvsHidlTest, HighPriorityCameraClient) { aTargetEvent.payload[0] = static_cast(cam0Cmds[0]); aTargetEvent.payload[1] = val0; if (!frameHandler0->waitForEvent(aTargetEvent, aNotification)) { - ALOGW("A timer is expired before a target event is fired."); + LOG(WARNING) << "A timer is expired before a target event is fired."; } } ); @@ -1945,7 +1958,7 @@ TEST_P(EvsHidlTest, HighPriorityCameraClient) { * configurations from EVS and uses one of them to start a video stream. */ TEST_P(EvsHidlTest, CameraUseStreamConfigToDisplay) { - ALOGI("Starting CameraUseStreamConfigToDisplay test"); + LOG(INFO) << "Starting CameraUseStreamConfigToDisplay test"; // Get the camera list loadCameraList(); @@ -2049,7 +2062,7 @@ TEST_P(EvsHidlTest, CameraUseStreamConfigToDisplay) { * underlying camera with same configuration. */ TEST_P(EvsHidlTest, MultiCameraStreamUseConfig) { - ALOGI("Starting MultiCameraStream test"); + LOG(INFO) << "Starting MultiCameraStream test"; if (mIsHwModule) { // This test is not for HW module implementation. @@ -2094,9 +2107,8 @@ TEST_P(EvsHidlTest, MultiCameraStreamUseConfig) { static_cast(HAL_PIXEL_FORMAT_RGBA_8888); if (!foundCfg) { - ALOGI("Device %s does not provide a list of supported stream configurations, skipped", - cam.v1.cameraId.c_str()); - + LOG(INFO) << "Device " << cam.v1.cameraId + << " does not provide a list of supported stream configurations, skipped"; continue; } @@ -2162,7 +2174,9 @@ TEST_P(EvsHidlTest, MultiCameraStreamUseConfig) { nsecs_t runTime = end - firstFrame; float framesPerSecond0 = framesReceived0 / (runTime * kNanoToSeconds); float framesPerSecond1 = framesReceived1 / (runTime * kNanoToSeconds); - ALOGI("Measured camera rate %3.2f fps and %3.2f fps", framesPerSecond0, framesPerSecond1); + LOG(INFO) << "Measured camera rate " + << std::scientific << framesPerSecond0 << " fps and " + << framesPerSecond1 << " fps"; EXPECT_GE(framesPerSecond0, kMinimumFramesPerSecond); EXPECT_GE(framesPerSecond1, kMinimumFramesPerSecond); @@ -2198,7 +2212,7 @@ TEST_P(EvsHidlTest, MultiCameraStreamUseConfig) { * identifiers. */ TEST_P(EvsHidlTest, LogicalCameraMetadata) { - ALOGI("Starting LogicalCameraMetadata test"); + LOG(INFO) << "Starting LogicalCameraMetadata test"; // Get the camera list loadCameraList(); @@ -2222,7 +2236,7 @@ TEST_P(EvsHidlTest, LogicalCameraMetadata) { * can be reopened. */ TEST_P(EvsHidlTest, UltrasonicsArrayOpenClean) { - ALOGI("Starting UltrasonicsArrayOpenClean test"); + LOG(INFO) << "Starting UltrasonicsArrayOpenClean test"; // Get the ultrasonics array list loadUltrasonicsArrayList(); @@ -2236,7 +2250,7 @@ TEST_P(EvsHidlTest, UltrasonicsArrayOpenClean) { // Verify that this ultrasonics array self-identifies correctly pUltrasonicsArray->getUltrasonicArrayInfo([&ultraInfo](UltrasonicsArrayDesc desc) { - ALOGD("Found ultrasonics array %s", ultraInfo.ultrasonicsArrayId.c_str()); + LOG(DEBUG) << "Found ultrasonics array " << ultraInfo.ultrasonicsArrayId; EXPECT_EQ(ultraInfo.ultrasonicsArrayId, desc.ultrasonicsArrayId); }); @@ -2249,14 +2263,14 @@ TEST_P(EvsHidlTest, UltrasonicsArrayOpenClean) { // Starts a stream and verifies all data received is valid. TEST_P(EvsHidlTest, UltrasonicsVerifyStreamData) { - ALOGI("Starting UltrasonicsVerifyStreamData"); + LOG(INFO) << "Starting UltrasonicsVerifyStreamData"; // Get the ultrasonics array list loadUltrasonicsArrayList(); // For each ultrasonics array. for (auto&& ultraInfo : ultrasonicsArraysInfo) { - ALOGD("Testing ultrasonics array: %s", ultraInfo.ultrasonicsArrayId.c_str()); + LOG(DEBUG) << "Testing ultrasonics array: " << ultraInfo.ultrasonicsArrayId; sp pUltrasonicsArray = pEnumerator->openUltrasonicsArray(ultraInfo.ultrasonicsArrayId); @@ -2285,14 +2299,14 @@ TEST_P(EvsHidlTest, UltrasonicsVerifyStreamData) { // Sets frames in flight before and after start of stream and verfies success. TEST_P(EvsHidlTest, UltrasonicsSetFramesInFlight) { - ALOGI("Starting UltrasonicsSetFramesInFlight"); + LOG(INFO) << "Starting UltrasonicsSetFramesInFlight"; // Get the ultrasonics array list loadUltrasonicsArrayList(); // For each ultrasonics array. for (auto&& ultraInfo : ultrasonicsArraysInfo) { - ALOGD("Testing ultrasonics array: %s", ultraInfo.ultrasonicsArrayId.c_str()); + LOG(DEBUG) << "Testing ultrasonics array: " << ultraInfo.ultrasonicsArrayId; sp pUltrasonicsArray = pEnumerator->openUltrasonicsArray(ultraInfo.ultrasonicsArrayId);