am de1057c4
: Unhide new API for supporting multiple cameras.
Merge commit 'de1057c4a6aa41c3b88bcc4fd49d70f973f1d9eb' into gingerbread-plus-aosp * commit 'de1057c4a6aa41c3b88bcc4fd49d70f973f1d9eb': Unhide new API for supporting multiple cameras.
This commit is contained in:
119
api/current.xml
119
api/current.xml
@ -48980,6 +48980,17 @@
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="FEATURE_CAMERA_FRONT"
|
||||
type="java.lang.String"
|
||||
transient="false"
|
||||
volatile="false"
|
||||
value=""android.hardware.camera.front""
|
||||
static="true"
|
||||
final="true"
|
||||
deprecated="not deprecated"
|
||||
visibility="public"
|
||||
>
|
||||
</field>
|
||||
<field name="FEATURE_LIVE_WALLPAPER"
|
||||
type="java.lang.String"
|
||||
transient="false"
|
||||
@ -75341,6 +75352,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"
|
||||
@ -75373,6 +75410,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"
|
||||
@ -75619,6 +75669,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"
|
||||
@ -75643,6 +75703,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"
|
||||
|
@ -654,6 +654,13 @@ public abstract class PackageManager {
|
||||
@SdkConstant(SdkConstantType.FEATURE)
|
||||
public static final String FEATURE_CAMERA_FLASH = "android.hardware.camera.flash";
|
||||
|
||||
/**
|
||||
* 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
|
||||
|
@ -85,20 +85,17 @@ public class Camera {
|
||||
|
||||
/**
|
||||
* 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 @@ public class Camera {
|
||||
* 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 @@ public class Camera {
|
||||
|
||||
/**
|
||||
* The id for the default camera.
|
||||
* @hide
|
||||
*/
|
||||
public static int CAMERA_ID_DEFAULT = 0;
|
||||
|
||||
|
@ -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>
|
||||
|
||||
|
20
data/etc/android.hardware.camera.front.xml
Normal file
20
data/etc/android.hardware.camera.front.xml
Normal file
@ -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>
|
@ -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 -->
|
||||
|
Reference in New Issue
Block a user