Replace misc DummyXXX with inclusive words
Bug: 376881079
Test: mm, gca_smoke, atest
Flag: EXEMPT refactor
Change-Id: I6a02524685c0d8f089bcc5cb7ccc79881cc5c82d
diff --git a/common/hal/tests/camera_id_manager_tests.cc b/common/hal/tests/camera_id_manager_tests.cc
index 99393be..6026c20 100644
--- a/common/hal/tests/camera_id_manager_tests.cc
+++ b/common/hal/tests/camera_id_manager_tests.cc
@@ -93,14 +93,14 @@
auto id_manager = CameraIdManager::Create(cameras);
ASSERT_NE(id_manager, nullptr);
- uint32_t dummy = 0;
+ uint32_t invalid_id = 0;
status_t res;
// Test for invalid IDs or bad parameters
- res = id_manager->GetInternalCameraId(cameras.size(), &dummy);
+ res = id_manager->GetInternalCameraId(cameras.size(), &invalid_id);
EXPECT_NE(res, OK) << "GetInternalCameraId() succeeded with an invalid ID";
res = id_manager->GetInternalCameraId(cameras.size(), nullptr);
EXPECT_NE(res, OK) << "GetInternalCameraId() succeeded with a null parameter";
- res = id_manager->GetPublicCameraId(cameras.size(), &dummy);
+ res = id_manager->GetPublicCameraId(cameras.size(), &invalid_id);
EXPECT_NE(res, OK) << "GetPublicCameraId() succeeded with an invalid ID";
res = id_manager->GetPublicCameraId(cameras.size(), nullptr);
EXPECT_NE(res, OK) << "GetPublicCameraId() succeeded with a null parameter";
diff --git a/common/hal/tests/mock_device_session_hwl.h b/common/hal/tests/mock_device_session_hwl.h
index 7ee4826..6b6657b 100644
--- a/common/hal/tests/mock_device_session_hwl.h
+++ b/common/hal/tests/mock_device_session_hwl.h
@@ -54,7 +54,7 @@
status_t BuildPipelines() override;
- // This fake method fills a few dummy streams to streams.
+ // This fake method fills a few placeholder streams to streams.
// Currently only supports kOfflineSmoothTransitionRole.
status_t GetRequiredIntputStreams(const StreamConfiguration& overall_config,
HwlOfflinePipelineRole pipeline_role,
@@ -130,7 +130,7 @@
// Initialize a mock camera device session HWL for a camera ID.
// If physical_camera_ids is not empty, it will consist of the physical camera
// IDs.
- MockDeviceSessionHwl(uint32_t camera_id = 3, // Dummy camera ID
+ MockDeviceSessionHwl(uint32_t camera_id = 3,
const std::vector<uint32_t>& physical_camera_ids =
std::vector<uint32_t>());
diff --git a/common/hal/tests/process_block_tests.cc b/common/hal/tests/process_block_tests.cc
index 20efe6b..a0613bc 100644
--- a/common/hal/tests/process_block_tests.cc
+++ b/common/hal/tests/process_block_tests.cc
@@ -198,7 +198,7 @@
ASSERT_EQ(block->SetResultProcessor(std::move(result_processor)), OK);
- // Testing RealtimeProcessBlock with a dummy request.
+ // Testing RealtimeProcessBlock with an empty request.
std::vector<ProcessBlockRequest> block_requests(1);
ASSERT_EQ(block->ProcessRequests(block_requests, block_requests[0].request),
OK);
@@ -238,7 +238,7 @@
ASSERT_EQ(block->SetResultProcessor(std::move(result_processor)), OK);
- // Testing RealtimeProcessBlock with dummy requests.
+ // Testing RealtimeProcessBlock with some requests.
std::vector<ProcessBlockRequest> block_requests;
CaptureRequest remaining_session_requests;
diff --git a/common/hal/tests/request_processor_tests.cc b/common/hal/tests/request_processor_tests.cc
index 1591cd9..a76806f 100644
--- a/common/hal/tests/request_processor_tests.cc
+++ b/common/hal/tests/request_processor_tests.cc
@@ -147,7 +147,7 @@
EXPECT_EQ(request_processor->SetProcessBlock(std::move(process_block)), OK);
- // Testing BasicRequestProcessorRequest with a dummy request.
+ // Testing BasicRequestProcessorRequest with an empty request.
CaptureRequest request = {};
ASSERT_EQ(request_processor->ProcessRequest(request), OK);
}
diff --git a/common/hal/tests/result_processor_tests.cc b/common/hal/tests/result_processor_tests.cc
index 341b41b..6733e75 100644
--- a/common/hal/tests/result_processor_tests.cc
+++ b/common/hal/tests/result_processor_tests.cc
@@ -25,8 +25,8 @@
namespace android {
namespace google_camera_hal {
-static constexpr native_handle kDummyNativeHandle = {};
-static constexpr buffer_handle_t kDummyBufferHandle = &kDummyNativeHandle;
+static constexpr native_handle kTestNativeHandle = {};
+static constexpr buffer_handle_t kTestBufferHandle = &kTestNativeHandle;
using ResultProcessorCreateFunc =
std::function<std::unique_ptr<ResultProcessor>()>;
@@ -177,7 +177,7 @@
requests[0].request.output_buffers = {StreamBuffer{}};
CaptureRequest remaining_request;
- remaining_request.output_buffers.push_back({.buffer = kDummyBufferHandle});
+ remaining_request.output_buffers.push_back({.buffer = kTestBufferHandle});
EXPECT_NE(result_processor->AddPendingRequests(requests, remaining_request), OK)
<< "Adding a pending request with a remaining output buffer that's not"
<< "included in the request should fail.";
diff --git a/common/hal/tests/test_utils.cc b/common/hal/tests/test_utils.cc
index 6ffc7dd..fe5d26a 100644
--- a/common/hal/tests/test_utils.cc
+++ b/common/hal/tests/test_utils.cc
@@ -26,10 +26,10 @@
namespace google_camera_hal {
namespace test_utils {
-void GetDummyPreviewStream(Stream* stream, uint32_t width, uint32_t height,
- bool is_physical_camera_stream = false,
- uint32_t physical_camera_id = 0,
- uint32_t stream_id = 0) {
+void GetTestPreviewStream(Stream* stream, uint32_t width, uint32_t height,
+ bool is_physical_camera_stream = false,
+ uint32_t physical_camera_id = 0,
+ uint32_t stream_id = 0) {
ASSERT_NE(stream, nullptr);
*stream = {};
@@ -50,7 +50,7 @@
ASSERT_NE(config, nullptr);
Stream preview_stream = {};
- GetDummyPreviewStream(&preview_stream, width, height);
+ GetTestPreviewStream(&preview_stream, width, height);
*config = {};
config->streams.push_back(preview_stream);
@@ -69,9 +69,9 @@
int32_t stream_id = 0;
for (auto& camera_id : physical_camera_ids) {
Stream preview_stream;
- GetDummyPreviewStream(&preview_stream, width, height,
- /*is_physical_camera_stream=*/true, camera_id,
- stream_id++);
+ GetTestPreviewStream(&preview_stream, width, height,
+ /*is_physical_camera_stream=*/true, camera_id,
+ stream_id++);
config->streams.push_back(preview_stream);
}
}
diff --git a/common/hal/tests/vendor_tag_tests.cc b/common/hal/tests/vendor_tag_tests.cc
index 3502a01..99bdccd 100644
--- a/common/hal/tests/vendor_tag_tests.cc
+++ b/common/hal/tests/vendor_tag_tests.cc
@@ -35,26 +35,25 @@
auto hal_metadata = HalCameraMetadata::Create(kNumEntries, kDataBytes);
ASSERT_NE(hal_metadata, nullptr) << "Creating hal_metadata failed.";
- std::vector<uint32_t> dummy_keys = {
- VendorTagIds::kLogicalCamDefaultPhysicalId};
- status_t res = hal_metadata->Set(
- ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS,
- reinterpret_cast<int32_t*>(dummy_keys.data()), dummy_keys.size());
+ std::vector<uint32_t> test_keys = {VendorTagIds::kLogicalCamDefaultPhysicalId};
+ status_t res = hal_metadata->Set(ANDROID_REQUEST_AVAILABLE_REQUEST_KEYS,
+ reinterpret_cast<int32_t*>(test_keys.data()),
+ test_keys.size());
ASSERT_EQ(res, OK);
res = hal_metadata->Set(ANDROID_REQUEST_AVAILABLE_RESULT_KEYS,
- reinterpret_cast<int32_t*>(dummy_keys.data()),
- dummy_keys.size());
+ reinterpret_cast<int32_t*>(test_keys.data()),
+ test_keys.size());
ASSERT_EQ(res, OK);
res = hal_metadata->Set(ANDROID_REQUEST_AVAILABLE_SESSION_KEYS,
- reinterpret_cast<int32_t*>(dummy_keys.data()),
- dummy_keys.size());
+ reinterpret_cast<int32_t*>(test_keys.data()),
+ test_keys.size());
ASSERT_EQ(res, OK);
res = hal_metadata->Set(ANDROID_REQUEST_AVAILABLE_CHARACTERISTICS_KEYS,
- reinterpret_cast<int32_t*>(dummy_keys.data()),
- dummy_keys.size());
+ reinterpret_cast<int32_t*>(test_keys.data()),
+ test_keys.size());
ASSERT_EQ(res, OK);
res = hal_vendor_tag_utils::ModifyCharacteristicsKeys(hal_metadata.get());
diff --git a/devices/EmulatedCamera/hwl/EmulatedCameraProviderHWLImpl.cpp b/devices/EmulatedCamera/hwl/EmulatedCameraProviderHWLImpl.cpp
index 7eb7743..3126bea 100644
--- a/devices/EmulatedCamera/hwl/EmulatedCameraProviderHWLImpl.cpp
+++ b/devices/EmulatedCamera/hwl/EmulatedCameraProviderHWLImpl.cpp
@@ -851,7 +851,7 @@
{
std::lock_guard<std::mutex> lock(status_callback_future_lock_);
if (!status_callback_future_.valid()) {
- // If there is no future pending, construct a dummy one.
+ // If there is no future pending, construct an empty one.
status_callback_future_ = std::async([]() { return; });
}
}