Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit de1057c4 authored by Chih-Chung Chang's avatar Chih-Chung Chang
Browse files

Unhide new API for supporting multiple cameras.

Change-Id: I916a536c80330444a15986ba380205a6deed2390
parent 9005e7f4
Loading
Loading
Loading
Loading
+119 −0
Original line number Diff line number Diff line
@@ -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"
+7 −0
Original line number Diff line number Diff line
@@ -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
+0 −5
Original line number Diff line number Diff line
@@ -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;

+2 −2
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
<?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>
Loading