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

Commit 1918bb88 authored by Steve Kondik's avatar Steve Kondik
Browse files

Camera: fix NPE in getSupportedPreviewFormats()

If the hardware doesn't return a result for preview-format-values, we
can fall back on preview-format.
parent 605020f7
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1093,6 +1093,9 @@ public class Camera {
         */
        public List<Integer> getSupportedPreviewFormats() {
            String str = get(KEY_PREVIEW_FORMAT + SUPPORTED_VALUES_SUFFIX);
            if (str == null) {
                str = get(KEY_PREVIEW_FORMAT);
            }
            ArrayList<Integer> formats = new ArrayList<Integer>();
            for (String s : split(str)) {
                int f = pixelFormatForCameraFormat(s);