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

Commit e37885a8 authored by Igor Murashkin's avatar Igor Murashkin
Browse files

camera2: Workaround for null FACE_DETECT_MODE crashing

Bug: 11118679
Change-Id: Id9b055744f6a2f502857b4cc0c5badb46b44a1f8
parent 00fb27dd
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -92,6 +92,15 @@ public class CameraMetadataNative extends CameraMetadata implements Parcelable {
    @SuppressWarnings("unchecked")
    @Override
    public <T> T get(Key<T> key) {

        if (key == CaptureResult.STATISTICS_FACES) {
            /**
             * FIXME: Workaround for HAL bug that's missing FACE_DETECT_MODE
             */
            Log.w(TAG, "Expected non-null android.statistics.faceDetectMode");
            return null;
        }

        T value = getOverride(key);
        if (value != null) {
            return value;