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

Commit a8b69e87 authored by Biswarup Pal's avatar Biswarup Pal
Browse files

Do not allow external cameras in virtual device context

Test: atest CtsVirtualDevicesCameraTestCases
Fixes: 333842752
Change-Id: I477ed3cb35b3e3a7932216026ef7c5965c2e422b
parent 80f4ac22
Loading
Loading
Loading
Loading
+0 −8
Original line number Diff line number Diff line
@@ -1969,9 +1969,6 @@ public final class CameraManager {

        private static final String TAG = "CameraManagerGlobal";

        private static final String BACK_CAMERA_ID = "0";
        private static final String FRONT_CAMERA_ID = "1";

        private final boolean DEBUG = false;

        private final int CAMERA_SERVICE_RECONNECT_DELAY_MS = 1000;
@@ -2309,11 +2306,6 @@ public final class CameraManager {
                return false;
            }

            // External cameras should never be hidden.
            if (!info.mCameraId.equals(FRONT_CAMERA_ID) && !info.mCameraId.equals(BACK_CAMERA_ID)) {
                return false;
            }

            return currentDeviceId != info.mDeviceId;
        }