liyujie
2025-08-28 b3810562527858a3b3d98ffa6e9c9c5b0f4a9a8e
android/frameworks/ex/camera2/portability/src/com/android/ex/camera2/portability/CameraDeviceInfo.java
....@@ -52,6 +52,12 @@
5252 int getFirstFrontCameraId();
5353
5454 /**
55
+ * @return The first (lowest) ID of the external cameras or {@code NO_DEVICE}
56
+ * if not available.
57
+ */
58
+ int getFirstExternalCameraId();
59
+
60
+ /**
5561 * Device characteristics for a single camera.
5662 */
5763 public abstract class Characteristics {
....@@ -68,6 +74,11 @@
6874 public abstract boolean isFacingFront();
6975
7076 /**
77
+ * @return Whether the camera faces the device's screen.
78
+ * */
79
+ public abstract boolean isFacingExternal();
80
+
81
+ /**
7182 * @return The camera sensor orientation, or the counterclockwise angle
7283 * from its natural position that the device must be held at
7384 * for the sensor to be right side up (in degrees, always a