Merge "Camera: remove NOT_PRESENT cameras" am: 174df238ac

am: 0e32a62cd4

Change-Id: I5b2d1d756daf1fabd8d42b9161de6a63d8989302
This commit is contained in:
Yin-Chia Yeh
2018-01-23 02:35:28 +00:00
committed by android-build-merger

View File

@@ -996,7 +996,12 @@ public final class CameraManager {
return;
}
Integer oldStatus = mDeviceStatus.put(id, status);
Integer oldStatus;
if (status == ICameraServiceListener.STATUS_NOT_PRESENT) {
oldStatus = mDeviceStatus.remove(id);
} else {
oldStatus = mDeviceStatus.put(id, status);
}
if (oldStatus != null && oldStatus == status) {
if (DEBUG) {