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

Commit f55916bd authored by Eino-Ville Talvala's avatar Eino-Ville Talvala Committed by Android (Google) Code Review
Browse files

Merge changes I6d125624,I549a9211 into klp-dev

* changes:
  Camera2: Fixed issue with HashSet not being initialized
  Camera2: Documentation fixes, mostly capitalization mistakes
parents 7e7f8d48 d27e8768
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -102,7 +102,7 @@ public interface CameraDevice extends AutoCloseable {
     * Get the static properties for this camera. These are identical to the
     * properties returned by {@link CameraManager#getCameraProperties}.
     *
     * @return the static properties of the camera.
     * @return the static properties of the camera
     *
     * @throws CameraAccessException if the camera device is no longer connected
     *
@@ -185,7 +185,7 @@ public interface CameraDevice extends AutoCloseable {
     * <p>Using larger resolution outputs, or more outputs, can result in slower
     * output rate from the device.</p>
     *
     * @param outputs the new set of Surfaces that should be made available as
     * @param outputs The new set of Surfaces that should be made available as
     * targets for captured image data.
     *
     * @throws IllegalArgumentException if the set of output Surfaces do not
@@ -205,7 +205,7 @@ public interface CameraDevice extends AutoCloseable {
     *
     * @param templateType An enumeration selecting the use case for this
     * request; one of the CameraDevice.TEMPLATE_ values.
     * @return a filled-in CaptureRequest, except for output streams.
     * @return a filled-in CaptureRequest, except for output streams
     *
     * @throws IllegalArgumentException if the templateType is not in the list
     * of supported templates.
@@ -238,8 +238,8 @@ public interface CameraDevice extends AutoCloseable {
     * {@link #setRepeatingBurst}, and will be processed as soon as the current
     * repeat/repeatBurst processing completes.</p>
     *
     * @param request the settings for this capture.
     * @param listener the callback object to notify once this request has been
     * @param request the settings for this capture
     * @param listener The callback object to notify once this request has been
     * processed. If null, no metadata will be produced for this capture,
     * although image data will still be produced.
     *
@@ -268,8 +268,8 @@ public interface CameraDevice extends AutoCloseable {
     * {@link #capture} repeatedly is that this method guarantees that no
     * other requests will be interspersed with the burst.</p>
     *
     * @param requests the list of settings for this burst capture.
     * @param listener the callback object to notify each time one of the
     * @param requests the list of settings for this burst capture
     * @param listener The callback object to notify each time one of the
     * requests in the burst has been processed. If null, no metadata will be
     * produced for any requests in this burst, although image data will still
     * be produced.
@@ -310,7 +310,7 @@ public interface CameraDevice extends AutoCloseable {
     * completed before the new repeat request will be used.</p>
     *
     * @param request the request to repeat indefinitely
     * @param listener the callback object to notify every time the
     * @param listener The callback object to notify every time the
     * request finishes processing. If null, no metadata will be
     * produced for this stream of requests, although image data will
     * still be produced.
@@ -354,8 +354,8 @@ public interface CameraDevice extends AutoCloseable {
     * {@link #setRepeatingRequest}, although any in-progress capture will be completed
     * before the new repeat burst will be used.</p>
     *
     * @param requests the list of requests to cycle through indefinitely.
     * @param listener the callback object to notify each time one of the
     * @param requests the list of requests to cycle through indefinitely
     * @param listener The callback object to notify each time one of the
     * requests in the repeating bursts has finished processing. If null, no
     * metadata will be produced for this stream of requests, although image
     * data will still be produced.
+3 −3
Original line number Diff line number Diff line
@@ -55,7 +55,7 @@ public final class CameraManager {

    private final ICameraService mCameraService;
    private ArrayList<String> mDeviceIdList;
    private HashSet<CameraListener> mListenerSet;
    private HashSet<CameraListener> mListenerSet = new HashSet<CameraListener>();
    private final Context mContext;
    private final Object mLock = new Object();

@@ -109,7 +109,7 @@ public final class CameraManager {
     *
     * Registering a listener more than once has no effect.
     *
     * @param listener the new listener to send camera availability notices to.
     * @param listener The new listener to send camera availability notices to
     */
    public void registerCameraListener(CameraListener listener) {
        synchronized (mLock) {
@@ -123,7 +123,7 @@ public final class CameraManager {
     *
     * Removing a listener that isn't registered has no effect.
     *
     * @param listener the listener to remove from the notification list
     * @param listener The listener to remove from the notification list
     */
    public void unregisterCameraListener(CameraListener listener) {
        synchronized (mLock) {
+19 −19
Original line number Diff line number Diff line
@@ -77,8 +77,8 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
     * found in {@link CameraProperties}, {@link CaptureResult}, and
     * {@link CaptureRequest}.
     *
     * @param key the metadata field to write.
     * @param value the value to set the field to, which must be of a matching
     * @param key The metadata field to write.
     * @param value The value to set the field to, which must be of a matching
     * type to the key.
     */
    public <T> void set(Key<T> key, T value) {
@@ -109,8 +109,8 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
     *
     * @throws IllegalArgumentException if the key was not valid
     *
     * @param key the metadata field to read.
     * @return the value of that key, or {@code null} if the field is not set.
     * @param key The metadata field to read.
     * @return The value of that key, or {@code null} if the field is not set.
     */
    @SuppressWarnings("unchecked")
    public <T> T get(Key<T> key) {
@@ -495,7 +495,7 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
         *
         * <p>This value is looked up the first time, and cached subsequently.</p>
         *
         * @return the tag numeric value corresponding to the string
         * @return The tag numeric value corresponding to the string
         *
         * @hide
         */
@@ -534,7 +534,7 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
     *
     * <p>Useful to convert a CameraMetadata into e.g. a CaptureRequest.</p>
     *
     * @param other metadata to swap with
     * @param other Metadata to swap with
     * @throws NullPointerException if other was null
     * @hide
     */
@@ -596,8 +596,8 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
    /**
     * Get the underlying native type for a tag.
     *
     * @param tag an integer tag, see e.g. {@link #getTag}
     * @return an int enum for the metadata type, see e.g. {@link #TYPE_BYTE}
     * @param tag An integer tag, see e.g. {@link #getTag}
     * @return An int enum for the metadata type, see e.g. {@link #TYPE_BYTE}
     *
     * @hide
     */
@@ -611,8 +611,8 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
     *
     * <p>An empty array can be passed in to update the entry to 0 elements.</p>
     *
     * @param tag an integer tag, see e.g. {@link #getTag}
     * @param src an array of bytes, or null to erase the entry
     * @param tag An integer tag, see e.g. {@link #getTag}
     * @param src An array of bytes, or null to erase the entry
     *
     * @hide
     */
@@ -626,9 +626,9 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
     *
     * <p>An empty array can be returned to denote an existing entry with 0 elements.</p>
     *
     * @param tag an integer tag, see e.g. {@link #getTag}
     * @param tag An integer tag, see e.g. {@link #getTag}
     *
     * @return null if there were 0 entries for this tag, a byte[] otherwise.
     * @return {@code null} if there were 0 entries for this tag, a byte[] otherwise.
     * @hide
     */
    public byte[] readValues(int tag) {
@@ -651,8 +651,8 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
     * Register a non-sequential set of values to be used with the pack/unpack functions.
     * This enables get/set to correctly marshal the enum into a value that is C-compatible.
     *
     * @param enumType the class for an enum
     * @param values a list of values mapping to the ordinals of the enum
     * @param enumType The class for an enum
     * @param values A list of values mapping to the ordinals of the enum
     *
     * @hide
     */
@@ -673,8 +673,8 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
     * enums that have fully sequential values, although for C-style enums the range of values
     * may not map 1:1.
     *
     * @param enumValue enum instance
     * @return int guaranteed to be ABI-compatible with the C enum equivalent
     * @param enumValue Enum instance
     * @return Int guaranteed to be ABI-compatible with the C enum equivalent
     */
    private static <T extends Enum<T>> int getEnumValue(T enumValue) {
        int[] values;
@@ -691,9 +691,9 @@ public class CameraMetadata implements Parcelable, AutoCloseable {
    /**
     * Finds the enum corresponding to it's numeric value. Opposite of {@link #getEnumValue} method.
     *
     * @param enumType class of the enum we want to find
     * @param value the numeric value of the enum
     * @return an instance of the enum
     * @param enumType Class of the enum we want to find
     * @param value The numeric value of the enum
     * @return An instance of the enum
     */
    private static <T extends Enum<T>> T getEnumFromValue(Class<T> enumType, int value) {
        int ordinal;
+2 −2
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
     *
     * <p>Adding a target more than once has no effect.</p>
     *
     * @param outputTarget surface to use as an output target for this request
     * @param outputTarget Surface to use as an output target for this request
     */
    public void addTarget(Surface outputTarget) {
        synchronized (mLock) {
@@ -82,7 +82,7 @@ public final class CaptureRequest extends CameraMetadata implements Parcelable {
     *
     * <p>Removing a target that is not currently added has no effect.</p>
     *
     * @param outputTarget surface to use as an output target for this request
     * @param outputTarget Surface to use as an output target for this request
     */
    public void removeTarget(Surface outputTarget) {
        synchronized (mLock) {
+1 −1
Original line number Diff line number Diff line
@@ -54,7 +54,7 @@ public final class CaptureResult extends CameraMetadata {
            return mBounds;
        }

        /* <p>The confidence level for the detection of the face. The range is 1 to
        /** <p>The confidence level for the detection of the face. The range is 1 to
         * 100. 100 is the highest confidence.</p>
         *
         * <p>Depending on the device, even very low-confidence faces may be
Loading