Camera: Fill out vndk implementation for physical camera callbacks
Also fixed missing implementation of Camera availability callbacks for
ExtendedAvailabilityCallback.
Test: Camera CTS, and vndk test
Bug: 148146086
Change-Id: I557d6db3900b2346b7bc7e12cd946bc4c2dc4076
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
index 5358307..e9c941e 100644
--- a/services/camera/libcameraservice/CameraService.cpp
+++ b/services/camera/libcameraservice/CameraService.cpp
@@ -456,10 +456,14 @@
}
if (updated) {
- logDeviceRemoved(id, String8::format("Device %s-%s availability changed from %d to %d",
- id.string(), physicalId.string(),
- newStatus != StatusInternal::PRESENT,
- newStatus == StatusInternal::PRESENT));
+ String8 idCombo = id + " : " + physicalId;
+ if (newStatus == StatusInternal::PRESENT) {
+ logDeviceAdded(idCombo,
+ String8::format("Device status changed to %d", newStatus));
+ } else {
+ logDeviceRemoved(idCombo,
+ String8::format("Device status changed to %d", newStatus));
+ }
String16 id16(id), physicalId16(physicalId);
Mutex::Autolock lock(mStatusListenerLock);