浏览代码

DeviceAsWebcam: Add overlays for physical camera id

Using physical streams reduces power since camera consumes
a bulk of the power.

Bug: 242346116

Test: Manual webcam use; See power reduction
Change-Id: Icd0c7c720128604e0c0987ae90fc3bdb99d9a95a
Avichal Rakesh 1 年之前
父节点
当前提交
24f43348a9

+ 4 - 0
device-lynx.mk

@@ -223,6 +223,10 @@ PRODUCT_PACKAGES += \
     NoCutoutOverlay \
     AvoidAppsInCutoutOverlay
 
+# Android DeviceAsWebcam specific overlay
+PRODUCT_PACKAGES += \
+    DeviceAsWebcamLynx
+
 # MIPI Coex Configs
 PRODUCT_COPY_FILES += \
     device/google/lynx/lynx/radio/lynx_display_primary_mipi_coex_table.csv:$(TARGET_COPY_OUT_VENDOR)/etc/modem/display_primary_mipi_coex_table.csv

+ 10 - 0
rro_overlays/DeviceAsWebcamOverlay/Android.bp

@@ -0,0 +1,10 @@
+package {
+    default_applicable_licenses: ["Android-Apache-2.0"],
+}
+
+runtime_resource_overlay {
+    name: "DeviceAsWebcamLynx",
+    certificate: "platform",
+    product_specific: true,
+    sdk_version: "current",
+}

+ 25 - 0
rro_overlays/DeviceAsWebcamOverlay/AndroidManifest.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2023 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.
+-->
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+          package="com.google.android.overlay.DeviceAsWebcam"
+          android:versionCode="1"
+          android:versionName="1.0" >
+    <application android:hasCode="false" />
+    <overlay
+        android:targetPackage="com.android.DeviceAsWebcam"
+        android:isStatic="true"
+        android:priority="1"/>
+</manifest>

+ 1 - 0
rro_overlays/DeviceAsWebcamOverlay/OWNERS

@@ -0,0 +1 @@
+include platform/frameworks/av:/camera/OWNERS

+ 1 - 0
rro_overlays/DeviceAsWebcamOverlay/res/raw/physical_camera_mapping.json

@@ -0,0 +1 @@
+{"0": {"3" : "UW"}}