Merge "Camera: remove NOT_PRESENT cameras"

This commit is contained in:
Treehugger Robot
2018-01-23 00:52:00 +00:00
committed by Gerrit Code Review

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) {