Unhide new preview callback methods.
bug:2358064
Change-Id: If9655ae8b7622ea6fc51e0054cfac7451962be66
diff --git a/api/current.xml b/api/current.xml
index e273cd2..21c1c18 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -45243,6 +45243,17 @@
visibility="public"
>
</field>
+<field name="FEATURE_BLUETOOTH"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.hardware.bluetooth""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="FEATURE_CAMERA"
type="java.lang.String"
transient="false"
@@ -45287,6 +45298,72 @@
visibility="public"
>
</field>
+<field name="FEATURE_LOCATION"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.hardware.location""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_LOCATION_GPS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.hardware.location.gps""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_LOCATION_NETWORK"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.hardware.location.network""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_MICROPHONE"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.hardware.microphone""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SENSOR_ACCELEROMETER"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.hardware.sensor.accelerometer""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="FEATURE_SENSOR_COMPASS"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value=""android.hardware.sensor.compass""
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
<field name="FEATURE_SENSOR_LIGHT"
type="java.lang.String"
transient="false"
@@ -45364,61 +45441,6 @@
visibility="public"
>
</field>
-<field name="FEATURE_BLUETOOTH"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.hardware.bluetooth""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="FEATURE_LOCATION"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.hardware.location""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="FEATURE_LOCATION_GPS"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.hardware.location.gps""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="FEATURE_LOCATION_NETWORK"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.hardware.location.network""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="FEATURE_MICROPHONE"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.hardware.microphone""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="FEATURE_WIFI"
type="java.lang.String"
transient="false"
@@ -45430,28 +45452,6 @@
visibility="public"
>
</field>
-<field name="FEATURE_SENSOR_ACCELEROMETER"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.hardware.sensor.accelerometer""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
-<field name="FEATURE_SENSOR_COMPASS"
- type="java.lang.String"
- transient="false"
- volatile="false"
- value=""android.hardware.sensor.compass""
- static="true"
- final="true"
- deprecated="not deprecated"
- visibility="public"
->
-</field>
<field name="GET_ACTIVITIES"
type="int"
transient="false"
@@ -71563,6 +71563,19 @@
deprecated="not deprecated"
visibility="public"
>
+<method name="addCallbackBuffer"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="callbackBuffer" type="byte[]">
+</parameter>
+</method>
<method name="autoFocus"
return="void"
abstract="false"
@@ -71709,6 +71722,19 @@
<parameter name="cb" type="android.hardware.Camera.PreviewCallback">
</parameter>
</method>
+<method name="setPreviewCallbackWithBuffer"
+ return="void"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="false"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cb" type="android.hardware.Camera.PreviewCallback">
+</parameter>
+</method>
<method name="setPreviewDisplay"
return="void"
abstract="false"
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 85d52ec..5a63ae1 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -261,7 +261,6 @@
* setPreviewCallback, or to this method with a null callback parameter.
*
* @param cb A callback object that receives a copy of the preview frame. A null value will clear the queue.
- * @hide
*/
public final void setPreviewCallbackWithBuffer(PreviewCallback cb) {
mPreviewCallback = cb;
@@ -273,14 +272,14 @@
/**
* Adds a pre-allocated buffer to the callback buffer queue.
* Preview width and height can be determined from getPreviewSize, and bitsPerPixel can be
- * found from from {@link android.hardware.Camera.Parameters#getPreviewFormat()} and
- * {@link android.graphics.ImageFormat#getBitsPerPixel(int)}
+ * found from {@link android.hardware.Camera.Parameters#getPreviewFormat()}
+ * and {@link android.graphics.ImageFormat#getBitsPerPixel(int)}.
*
* Alternatively, a buffer from a previous callback may be passed in or used
* to determine the size of new preview frame buffers.
*
* @param callbackBuffer The buffer to register. Size should be width * height * bitsPerPixel / 8.
- * @hide
+ * @see #setPreviewCallbackWithBuffer(PreviewCallback)
*/
public native final void addCallbackBuffer(byte[] callbackBuffer);