Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0c961165 authored by Yin-Chia Yeh's avatar Yin-Chia Yeh
Browse files

Camera: remove NOT_PRESENT cameras

So hot plug cameras won't stay forever in
device status map.

Change-Id: I0290ff2eccb3d48a0f72c48f32a97909d20623ad
parent 8fb3bdc3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -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) {