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

Commit 6bc311a7 authored by Nicolas PINOT's avatar Nicolas PINOT
Browse files

Add BOARD_FIRST_CAMERA_FRONT_FACING betelgeuse (folio100) support

betelgeuse has only one front facing camera in landscape. Add define to
allow this configuration.
This defines allow to modify the first CameraInfo parameters of the
sCameraInfo array.
The modification of CamcorderProfile is to avoid NPE in Camera app,
because frameworks assume that only back facing camera can record video.

Change-Id: I071c5bdcf55c722c05295299b34082f4a2ea01eb
parent ba26a4a1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -137,7 +137,7 @@ public class CamcorderProfile
                return get(i, quality);
            }
        }
        return null;
        return (numberOfCameras==1)?get(0, quality):null;
    }

    /**
+3 −0
Original line number Diff line number Diff line
@@ -87,5 +87,8 @@ ifeq ($(BOARD_USE_CAF_LIBCAMERA), true)
    LOCAL_CFLAGS += -DBOARD_USE_CAF_LIBCAMERA
endif

ifeq ($(BOARD_FIRST_CAMERA_FRONT_FACING),true)
    LOCAL_CFLAGS += -DFIRST_CAMERA_FACING=CAMERA_FACING_FRONT -DFIRST_CAMERA_ORIENTATION=0
endif

include $(BUILD_SHARED_LIBRARY)
+10 −2
Original line number Diff line number Diff line
@@ -1412,10 +1412,18 @@ status_t CameraService::dump(int fd, const Vector<String16>& args) {
}

#ifdef BOARD_USE_FROYO_LIBCAMERA

#ifndef FIRST_CAMERA_FACING
#define FIRST_CAMERA_FACING CAMERA_FACING_BACK
#endif
#ifndef FIRST_CAMERA_ORIENTATION
#define FIRST_CAMERA_ORIENTATION 90
#endif

static const CameraInfo sCameraInfo[] = {
    {
        CAMERA_FACING_BACK,
        90,  /* orientation */
        FIRST_CAMERA_FACING,
        FIRST_CAMERA_ORIENTATION,  /* orientation */
    },
    {
        CAMERA_FACING_FRONT,