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

Commit 14048f1d authored by Michelle Ho's avatar Michelle Ho Committed by Automerger Merge Worker
Browse files

Merge "Camera: Fix physical camera availability update" into tm-qpr-dev am: 608b9ec7

parents 02249fa7 608b9ec7
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -2378,9 +2378,8 @@ public final class CameraManager {
            }

            //TODO: Do we need to treat this as error?
            if (!mDeviceStatus.containsKey(id) || !isAvailable(mDeviceStatus.get(id))
                    || !mUnavailablePhysicalDevices.containsKey(id)) {
                Log.e(TAG, String.format("Camera %s is not available. Ignore physical camera "
            if (!mDeviceStatus.containsKey(id) || !mUnavailablePhysicalDevices.containsKey(id)) {
                Log.e(TAG, String.format("Camera %s is not present. Ignore physical camera "
                        + "status change", id));
                return;
            }
@@ -2405,6 +2404,12 @@ public final class CameraManager {
                return;
            }

            if (!isAvailable(mDeviceStatus.get(id))) {
                Log.i(TAG, String.format("Camera %s is not available. Ignore physical camera "
                        + "status change callback(s)", id));
                return;
            }

            final int callbackCount = mCallbackMap.size();
            for (int i = 0; i < callbackCount; i++) {
                Executor executor = mCallbackMap.valueAt(i);