Use std::optional for nullable
AIDL now use std::optional to represent nullable types for efficiency
instead of std::unique_ptr which might cause additional heap allocation.
Bug: 1447732670
Test: m
Change-Id: I9045bc6fc2eb06839203af6db94a80de9b83ad1f
diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.h b/services/camera/libcameraservice/api2/CameraDeviceClient.h
index 888fcce..c5d6e2a 100644
--- a/services/camera/libcameraservice/api2/CameraDeviceClient.h
+++ b/services/camera/libcameraservice/api2/CameraDeviceClient.h
@@ -50,7 +50,7 @@
CameraDeviceClientBase(const sp<CameraService>& cameraService,
const sp<hardware::camera2::ICameraDeviceCallbacks>& remoteCallback,
const String16& clientPackageName,
- const std::unique_ptr<String16>& clientFeatureId,
+ const std::optional<String16>& clientFeatureId,
const String8& cameraId,
int api1CameraId,
int cameraFacing,
@@ -175,7 +175,7 @@
CameraDeviceClient(const sp<CameraService>& cameraService,
const sp<hardware::camera2::ICameraDeviceCallbacks>& remoteCallback,
const String16& clientPackageName,
- const std::unique_ptr<String16>& clientFeatureId,
+ const std::optional<String16>& clientFeatureId,
const String8& cameraId,
int cameraFacing,
int clientPid,