From 83a9e4d86407d627f3f6fbf8757d2a389097ab6f Mon Sep 17 00:00:00 2001 From: Yin-Chia Yeh Date: Wed, 4 Jun 2014 16:11:10 -0700 Subject: [PATCH] Camera2: Do not hide TonemapCurve construtor Do not @hide TonemapCurve constructor since it's also a control key. bug: 14628001 Change-Id: I17384f42f5c2db2371d1c09030d04a1b9637045e --- api/current.txt | 1 + .../hardware/camera2/params/TonemapCurve.java | 15 ++++++++------- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/api/current.txt b/api/current.txt index 79fb8dfc50bfa..f8cc4fa190263 100644 --- a/api/current.txt +++ b/api/current.txt @@ -12670,6 +12670,7 @@ package android.hardware.camera2.params { } public final class TonemapCurve { + ctor public TonemapCurve(float[], float[], float[]); method public void copyColorCurve(int, float[], int); method public android.graphics.PointF getPoint(int, int); method public int getPointCount(int); diff --git a/core/java/android/hardware/camera2/params/TonemapCurve.java b/core/java/android/hardware/camera2/params/TonemapCurve.java index 0fcffac060d61..481d67a3880a0 100644 --- a/core/java/android/hardware/camera2/params/TonemapCurve.java +++ b/core/java/android/hardware/camera2/params/TonemapCurve.java @@ -78,7 +78,7 @@ public final class TonemapCurve { /** * Create a new immutable TonemapCurve instance. * - *

Values are stored as a contiguous {@code (Pin, Pout}) point.

+ *

Values are stored as a contiguous array of {@code (Pin, Pout)} points.

* *

All parameters may have independent length but should have at most * {@link CameraCharacteristics#TONEMAP_MAX_CURVE_POINTS} * {@value #POINT_SIZE} elements.

@@ -88,15 +88,16 @@ public final class TonemapCurve { * *

This constructor copies the array contents and does not retain ownership of the array.

* - * @param elements An array of elements whose length is {@code CHANNEL_COUNT * rows * columns} + * @param red An array of elements whose length is divisible by {@value #POINT_SIZE} + * @param green An array of elements whose length is divisible by {@value #POINT_SIZE} + * @param blue An array of elements whose length is divisible by {@value #POINT_SIZE} * * @throws IllegalArgumentException - * if the {@code elements} array length is invalid, - * if any of the subelems are not finite + * if any of input array length is invalid, + * or if any of the elements in the array are not in the range of + * [{@value #LEVEL_BLACK}, {@value #LEVEL_WHITE}] * @throws NullPointerException - * if any of the parameters is {@code null} - * - * @hide + * if any of the parameters are {@code null} */ public TonemapCurve(float[] red, float[] green, float[] blue) { // TODO: maxCurvePoints check?