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

Commit 608b9ec7 authored by Michelle Ho's avatar Michelle Ho Committed by Android (Google) Code Review
Browse files

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

parents a8825e86 95f4c7ee
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -2372,9 +2372,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;
            }
@@ -2399,6 +2398,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);