Sync up to v300.l

This commit is contained in:
Andy CrossGate Yan
2021-01-13 14:02:28 +00:00
parent 2347b96190
commit 7d0836656a
15 changed files with 1238 additions and 99 deletions

View File

@@ -0,0 +1,30 @@
From 6a6c54584fae07783b493a56afd047984f589ed0 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Mon, 21 Dec 2020 20:19:11 +0100
Subject: [PATCH 16/16] Make camera IDs filter-out optional
Nowadays most people have Camera 2 apps, and would like to have all
cameras, rather than limit which cameras are available.
Add a property for that.
---
.../camera/libcameraservice/common/CameraProviderManager.cpp | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
index 0bff3606df..3e6ad1ef52 100644
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
@@ -183,7 +183,9 @@ std::vector<std::string> CameraProviderManager::getAPI1CompatibleCameraDeviceIds
// API1 app doesn't handle logical and physical camera devices well. So
// for each camera facing, only take the first id advertised by HAL in
// all [logical, physical1, physical2, ...] id combos, and filter out the rest.
- filterLogicalCameraIdsLocked(providerDeviceIds);
+ if(!property_get_bool("persist.sys.phh.include_all_cameras", false)) {
+ filterLogicalCameraIdsLocked(providerDeviceIds);
+ }
collectDeviceIdsLocked(providerDeviceIds, publicDeviceIds, systemDeviceIds);
}
auto sortFunc =
--
2.25.1