Projects >> platform_frameworks_base >>341ff13689dfe822b598e626272ac2e80041b482

Chunk
Conflicting content
    private boolean mWithBuffer;

    /**
<<<<<<< HEAD
     * Returns the number of Cameras available.
     */
    public native static int getNumberOfCameras();

    /**
     * Returns the information about the camera.
     * If {@link #getNumberOfCameras()} returns N, the valid id is 0 to N-1.
     */
    public native static void getCameraInfo(int cameraId, CameraInfo cameraInfo);

    /**
     * Information about a camera
     */
    public static class CameraInfo {
        public static final int CAMERA_FACING_BACK = 0;
        public static final int CAMERA_FACING_FRONT = 1;

        /**
         * The direction that the camera faces to. It should be
         * CAMERA_FACING_BACK or CAMERA_FACING_FRONT.
         */
        public int mFacing;

        /**
         * The orientation of the camera image. The value is the angle that the
         * camera image needs to be rotated clockwise so it shows correctly on
         * the display in its natural orientation. It should be 0, 90, 180, or 270.
         *
         * For example, suppose a device has a naturally tall screen, but the camera
         * sensor is mounted in landscape. If the top side of the camera sensor is
         * aligned with the right edge of the display in natural orientation, the
         * value should be 90.
         *
         * @see #setDisplayOrientation(int)
         */
        public int mOrientation;
    };

    /**
     * Returns a new Camera object.
     * If {@link #getNumberOfCameras()} returns N, the valid id is 0 to N-1.
     * The id 0 is the default camera.
     */
    public static Camera open(int cameraId) {
        return new Camera(cameraId);
    }

    /**
     * The id for the default camera.
     */
    public static int CAMERA_ID_DEFAULT = 0;

    /**
     * Returns a new Camera object. This returns the default camera.
=======
     * Creates a new Camera object.
     *
     * 

You must call {@link #release()} when you are done using the camera, * otherwise it will remain locked and be unavailable to other applications. * *

Your application should only have one Camera object active at a time. * *

Callbacks from other methods are delivered to the event loop of the * thread which called open(). If this thread has no event loop, then * callbacks are delivered to the main application event loop. If there * is no main application event loop, callbacks are not delivered. * *

Caution: On some devices, this method may * take a long time to complete. It is best to call this method from a * worker thread (possibly using {@link android.os.AsyncTask}) to avoid * blocking the main application UI thread. * * @return a new Camera object, connected, locked and ready for use. * @throws RuntimeException if connection to the camera service fails (for * example, if the camera is in use by another process). >>>>>>> 9bc4039a58e50b66700f87f4f874ed5d662ca9a6 */ public static Camera open() { return new Camera(CAMERA_ID_DEFAULT);

Solution content
    private boolean mWithBuffer;

    /**
     * Returns the number of physical cameras available on this device.
     */
    public native static int getNumberOfCameras();

    /**
     * Returns the information about a particular camera.
     * If {@link #getNumberOfCameras()} returns N, the valid id is 0 to N-1.
     */
    public native static void getCameraInfo(int cameraId, CameraInfo cameraInfo);

    /**
     * Information about a camera
     */
    public static class CameraInfo {
        public static final int CAMERA_FACING_BACK = 0;
        public static final int CAMERA_FACING_FRONT = 1;

        /**
         * The direction that the camera faces to. It should be
         * CAMERA_FACING_BACK or CAMERA_FACING_FRONT.
         */
        public int mFacing;

        /**
         * The orientation of the camera image. The value is the angle that the
         * camera image needs to be rotated clockwise so it shows correctly on
         * the display in its natural orientation. It should be 0, 90, 180, or 270.
         *
         * For example, suppose a device has a naturally tall screen, but the camera
         * sensor is mounted in landscape. If the top side of the camera sensor is
         * aligned with the right edge of the display in natural orientation, the
         * value should be 90.
         *
         * @see #setDisplayOrientation(int)
         */
        public int mOrientation;
    };

    /**
     * Creates a new Camera object to access a particular hardware camera.
     *
     * 

You must call {@link #release()} when you are done using the camera, * otherwise it will remain locked and be unavailable to other applications. * *

Your application should only have one Camera object active at a time * for a particular hardware camera. * *

Callbacks from other methods are delivered to the event loop of the * thread which called open(). If this thread has no event loop, then * callbacks are delivered to the main application event loop. If there * is no main application event loop, callbacks are not delivered. * *

Caution: On some devices, this method may * take a long time to complete. It is best to call this method from a * worker thread (possibly using {@link android.os.AsyncTask}) to avoid * blocking the main application UI thread. * * @param cameraId the hardware camera to access, between 0 and * {@link #getNumberOfCameras()}-1. Use {@link #CAMERA_ID_DEFAULT} * to access the default camera. * @return a new Camera object, connected, locked and ready for use. * @throws RuntimeException if connection to the camera service fails (for * example, if the camera is in use by another process). */ public static Camera open(int cameraId) { return new Camera(cameraId); } /** * The id for the default camera. */ public static int CAMERA_ID_DEFAULT = 0; /** * Equivalent to Camera.open(Camera.CAMERA_ID_DEFAULT). * Creates a new Camera object to access the default camera. */ public static Camera open() { return new Camera(CAMERA_ID_DEFAULT);

File
Camera.java
Developer's decision
Manual
Kind of conflict
Attribute
Class declaration
Comment
Method declaration
Method interface
Chunk
Conflicting content
    };

    /**
<<<<<<< HEAD
     * Triggers an asynchronous image capture. The camera service will initiate
     * a series of callbacks to the application as the image capture progresses.
     * The shutter callback occurs after the image is captured. This can be used
     * to trigger a sound to let the user know that image has been captured. The
     * raw callback occurs when the raw image data is available (NOTE: the data
     * may be null if the hardware does not have enough memory to make a copy).
     * The jpeg callback occurs when the compressed image is available. If the
     * application does not need a particular callback, a null can be passed
     * instead of a callback method.
     *
     * This method is only valid after {@link #startPreview()} has been called.
     * This method will stop the preview. Applications should not call {@link
     * #stopPreview()} before this. After jpeg callback is received,
     * applications can call {@link #startPreview()} to restart the preview.
=======
     * Equivalent to takePicture(shutter, raw, null, jpeg).
>>>>>>> 9bc4039a58e50b66700f87f4f874ed5d662ca9a6
     *
     * @see #takePicture(ShutterCallback, PictureCallback, PictureCallback, PictureCallback)
     */
Solution content
    };

    /**
     * Equivalent to takePicture(shutter, raw, null, jpeg).
     *
     * @see #takePicture(ShutterCallback, PictureCallback, PictureCallback, PictureCallback)
     */
File
Camera.java
Developer's decision
Version 2
Kind of conflict
Comment
Chunk
Conflicting content
     * application does not need a particular callback, a null can be passed
     * instead of a callback method.
     *
<<<<<<< HEAD
     * This method is only valid after {@link #startPreview()} has been called.
     * This method will stop the preview. Applications should not call {@link
     * #stopPreview()} before this. After jpeg callback is received,
     * applications can call {@link #startPreview()} to restart the preview.
=======
     * 

This method is only valid when preview is active (after * {@link #startPreview()}). Preview will be stopped after the image is * taken; callers must call {@link #startPreview()} again if they want to * re-start preview or take more pictures. >>>>>>> 9bc4039a58e50b66700f87f4f874ed5d662ca9a6 * *

After calling this method, you must not call {@link #startPreview()} * or take another picture until the JPEG callback has returned.

Solution content
     * application does not need a particular callback, a null can be passed
     * instead of a callback method.
     *
     * 

This method is only valid when preview is active (after * {@link #startPreview()}). Preview will be stopped after the image is * taken; callers must call {@link #startPreview()} again if they want to * re-start preview or take more pictures. * *

After calling this method, you must not call {@link #startPreview()} * or take another picture until the JPEG callback has returned.

File
Camera.java
Developer's decision
Version 2
Kind of conflict
Comment