am cbbc035b: am de1057c4: Unhide new API for supporting multiple cameras.

Merge commit 'cbbc035b640790650d0e377a2d6291cc523a2a35'

* commit 'cbbc035b640790650d0e377a2d6291cc523a2a35':
  Unhide new API for supporting multiple cameras.
diff --git a/api/current.xml b/api/current.xml
index 8d89bdc..50546d3 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -51853,6 +51853,17 @@
  visibility="public"
 >
 </field>
+<field name="FEATURE_CAMERA_FRONT"
+ type="java.lang.String"
+ transient="false"
+ volatile="false"
+ value="&quot;android.hardware.camera.front&quot;"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 <field name="FEATURE_LIVE_WALLPAPER"
  type="java.lang.String"
  transient="false"
@@ -78587,6 +78598,32 @@
  visibility="public"
 >
 </method>
+<method name="getCameraInfo"
+ return="void"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<parameter name="cameraId" type="int">
+</parameter>
+<parameter name="cameraInfo" type="android.hardware.Camera.CameraInfo">
+</parameter>
+</method>
+<method name="getNumberOfCameras"
+ return="int"
+ abstract="false"
+ native="true"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</method>
 <method name="getParameters"
  return="android.hardware.Camera.Parameters"
  abstract="false"
@@ -78619,6 +78656,19 @@
  deprecated="not deprecated"
  visibility="public"
 >
+<parameter name="cameraId" type="int">
+</parameter>
+</method>
+<method name="open"
+ return="android.hardware.Camera"
+ abstract="false"
+ native="false"
+ synchronized="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
 </method>
 <method name="reconnect"
  return="void"
@@ -78865,6 +78915,16 @@
  visibility="public"
 >
 </field>
+<field name="CAMERA_ID_DEFAULT"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
 </class>
 <interface name="Camera.AutoFocusCallback"
  abstract="true"
@@ -78889,6 +78949,65 @@
 </parameter>
 </method>
 </interface>
+<class name="Camera.CameraInfo"
+ extends="java.lang.Object"
+ abstract="false"
+ static="true"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+<constructor name="Camera.CameraInfo"
+ type="android.hardware.Camera.CameraInfo"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</constructor>
+<field name="CAMERA_FACING_BACK"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="0"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="CAMERA_FACING_FRONT"
+ type="int"
+ transient="false"
+ volatile="false"
+ value="1"
+ static="true"
+ final="true"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mFacing"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+<field name="mOrientation"
+ type="int"
+ transient="false"
+ volatile="false"
+ static="false"
+ final="false"
+ deprecated="not deprecated"
+ visibility="public"
+>
+</field>
+</class>
 <interface name="Camera.ErrorCallback"
  abstract="true"
  static="true"
diff --git a/core/java/android/content/pm/PackageManager.java b/core/java/android/content/pm/PackageManager.java
index 196f508..1a5b419 100644
--- a/core/java/android/content/pm/PackageManager.java
+++ b/core/java/android/content/pm/PackageManager.java
@@ -656,6 +656,13 @@
 
     /**
      * Feature for {@link #getSystemAvailableFeatures} and
+     * {@link #hasSystemFeature}: The device has a front facing camera.
+     */
+    @SdkConstant(SdkConstantType.FEATURE)
+    public static final String FEATURE_CAMERA_FRONT = "android.hardware.camera.front";
+
+    /**
+     * Feature for {@link #getSystemAvailableFeatures} and
      * {@link #hasSystemFeature}: The device supports one or more methods of
      * reporting current location.
      */
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
index 64380c5..0a2899f 100644
--- a/core/java/android/hardware/Camera.java
+++ b/core/java/android/hardware/Camera.java
@@ -85,20 +85,17 @@
 
     /**
      * Returns the number of Cameras available.
-     * @hide
      */
     public native static int getNumberOfCameras();
 
     /**
      * Returns the information about the camera.
      * If {@link #getNumberOfCameras()} returns N, the valid id is 0 to N-1.
-     * @hide
      */
     public native static void getCameraInfo(int cameraId, CameraInfo cameraInfo);
 
     /**
      * Information about a camera
-     * @hide
      */
     public static class CameraInfo {
         public static final int CAMERA_FACING_BACK = 0;
@@ -129,7 +126,6 @@
      * 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.
-     * @hide
      */
     public static Camera open(int cameraId) {
         return new Camera(cameraId);
@@ -137,7 +133,6 @@
 
     /**
      * The id for the default camera.
-     * @hide
      */
     public static int CAMERA_ID_DEFAULT = 0;
 
diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml
index 1fc6491..6b371df 100644
--- a/core/res/res/values/strings.xml
+++ b/core/res/res/values/strings.xml
@@ -872,9 +872,9 @@
         the audio record path.</string>
 
     <!-- Title of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permlab_camera">take pictures</string>
+    <string name="permlab_camera">take pictures and videos</string>
     <!-- Description of an application permission, listed so the user can choose whether they want to allow the application to do this. -->
-    <string name="permdesc_camera">Allows application to take pictures
+    <string name="permdesc_camera">Allows application to take pictures and videos
         with the camera. This allows the application at any time to collect
         images the camera is seeing.</string>
 
diff --git a/data/etc/android.hardware.camera.front.xml b/data/etc/android.hardware.camera.front.xml
new file mode 100644
index 0000000..a5a6998
--- /dev/null
+++ b/data/etc/android.hardware.camera.front.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 The Android Open Source Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<!-- This is the standard set of features for a front facing camera. -->
+<permissions>
+    <feature name="android.hardware.camera.front" />
+</permissions>
diff --git a/data/etc/handheld_core_hardware.xml b/data/etc/handheld_core_hardware.xml
index 564fa84..efca4c2 100644
--- a/data/etc/handheld_core_hardware.xml
+++ b/data/etc/handheld_core_hardware.xml
@@ -35,6 +35,8 @@
     <!-- devices with an autofocus camera and/or flash must include either
          android.hardware.camera.autofocus.xml or 
          android.hardware.camera.autofocus-flash.xml -->
+    <!-- devices with a front facing camera must include
+         android.hardware.camera.front.xml -->
     <!-- devices with WiFi must also include android.hardware.wifi.xml -->
     <!-- devices with limited/gestural multitouch must also include
          android.hardware.touchscreen.multitouch.xml -->