From b3810562527858a3b3d98ffa6e9c9c5b0f4a9a8e Mon Sep 17 00:00:00 2001
From: liyujie <2352380935@qq.com>
Date: Thu, 28 Aug 2025 12:04:14 +0000
Subject: [PATCH] [1/4]解决USB摄像头打开相机预览界面绿屏

---
 android/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/android/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java b/android/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
index 72a641e..3991e7b 100644
--- a/android/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
+++ b/android/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
@@ -52,6 +52,12 @@
     int getFirstFrontCameraId();
 
     /**
+     * @return The first (lowest) ID of the external cameras or {@code NO_DEVICE}
+     *         if not available.
+     */
+    int getFirstExternalCameraId();
+
+    /**
      * Device characteristics for a single camera.
      */
     public abstract class Characteristics {
@@ -68,6 +74,11 @@
         public abstract boolean isFacingFront();
 
         /**
+         * @return Whether the camera faces the device's screen.
+         *                 */
+        public abstract boolean isFacingExternal();
+
+        /**
          * @return The camera sensor orientation, or the counterclockwise angle
          *          from its natural position that the device must be held at
          *          for the sensor to be right side up (in degrees, always a

--
Gitblit v1.6.2