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

Commit 9227817b authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Automerger Merge Worker
Browse files

Camera: Allow 0-face notifications to be sent am: fbaedd7c

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/12394024

Change-Id: Id4900f0cfb55cdc4150226d1ee8d914cd5a82188
parents fd151435 fbaedd7c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -142,7 +142,8 @@ status_t BnCameraClient::onTransact(
            camera_frame_metadata_t metadata;
            if (data.dataAvail() > 0) {
                metadata.number_of_faces = data.readInt32();
                if (metadata.number_of_faces <= 0 ||
                // Zero faces is a valid case, to notify clients that no faces are now visible
                if (metadata.number_of_faces < 0 ||
                        metadata.number_of_faces > (int32_t)(INT32_MAX / sizeof(camera_face_t))) {
                    ALOGE("%s: Too large face count: %d", __FUNCTION__, metadata.number_of_faces);
                    return BAD_VALUE;