Unhide new API for supporting multiple cameras.

Change-Id: I916a536c80330444a15986ba380205a6deed2390
diff --git a/api/current.xml b/api/current.xml
index 8cc95ab..9145462 100644
--- a/api/current.xml
+++ b/api/current.xml
@@ -48968,6 +48968,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"
@@ -75329,6 +75340,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"
@@ -75361,6 +75398,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"
@@ -75607,6 +75657,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"
@@ -75631,6 +75691,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 44317bc..62fd169 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 -->