av: Update GSI Patches for frameworks/av
Signed-off-by: Jackeagle <jackeagle102@gmail.com>
diff --git a/patches/frameworks/av/0001-Fix-WiFi-Display-on-Huawei-devices-EMUI-8.0.patch b/patches/frameworks/av/0001-Fix-WiFi-Display-on-Huawei-devices-EMUI-8.0.patch
index 02ea467..e7cafe7 100644
--- a/patches/frameworks/av/0001-Fix-WiFi-Display-on-Huawei-devices-EMUI-8.0.patch
+++ b/patches/frameworks/av/0001-Fix-WiFi-Display-on-Huawei-devices-EMUI-8.0.patch
@@ -1,7 +1,7 @@
-From 018fcebd43f359c38a6dbb61367ee4079f062813 Mon Sep 17 00:00:00 2001
+From 91077f6877c2a4b610080900ea1a5296f0d26f39 Mon Sep 17 00:00:00 2001
From: Alexander Pohl <pohl199885@gmail.com>
Date: Fri, 15 Jun 2018 19:58:07 +0200
-Subject: [PATCH 1/6] Fix WiFi-Display on Huawei devices (EMUI 8.0)
+Subject: [PATCH 1/5] Fix WiFi-Display on Huawei devices (EMUI 8.0)
Huaweis media stack doesn't handle intra-refresh-mode, so skip the error instead.
@@ -27,5 +27,5 @@
}
--
-2.17.1
+2.21.0
diff --git a/patches/frameworks/av/0002-Kirin-Remove-lock-to-prevent-self-lock.patch b/patches/frameworks/av/0002-Kirin-Remove-lock-to-prevent-self-lock.patch
index 9e082d9..f729ce7 100644
--- a/patches/frameworks/av/0002-Kirin-Remove-lock-to-prevent-self-lock.patch
+++ b/patches/frameworks/av/0002-Kirin-Remove-lock-to-prevent-self-lock.patch
@@ -1,7 +1,7 @@
-From 132bb1004f9981c8c8ce29ba57a6c9142445f175 Mon Sep 17 00:00:00 2001
+From ac2ae68e4c58bcbb3f4755dcec40086d35c9483d Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 19 Aug 2018 22:59:06 +0200
-Subject: [PATCH 2/6] ::Kirin:: Remove lock to prevent self-lock
+Subject: [PATCH 2/5] Kirin:: Remove lock to prevent self-lock
With Huawei Camera HAL, we get the following call order:
cameraserver CameraService::enumerateProviders (*)
@@ -30,5 +30,5 @@
mNormalDeviceIds =
mCameraProviderManager->getAPI1CompatibleCameraDeviceIds();
--
-2.17.1
+2.21.0
diff --git a/patches/frameworks/av/0003-We-might-not-have-a-mFlashlight-at-this-state-but-th.patch b/patches/frameworks/av/0003-We-might-not-have-a-mFlashlight-at-this-state-but-th.patch
index 038b89d..3739bae 100644
--- a/patches/frameworks/av/0003-We-might-not-have-a-mFlashlight-at-this-state-but-th.patch
+++ b/patches/frameworks/av/0003-We-might-not-have-a-mFlashlight-at-this-state-but-th.patch
@@ -1,7 +1,7 @@
-From 1a48acacf69713582aba409e4b710a91921e78c5 Mon Sep 17 00:00:00 2001
+From 8585c0c495abb6b1c8eb7d064cee7f004278d595 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 19 Aug 2018 23:05:26 +0200
-Subject: [PATCH 3/6] We might not have a mFlashlight at this state, but that's
+Subject: [PATCH 3/5] We might not have a mFlashlight at this state, but that's
ok
---
@@ -22,5 +22,5 @@
mTorchStatusMap.add(id, TorchModeStatus::AVAILABLE_OFF);
}
--
-2.17.1
+2.21.0
diff --git a/patches/frameworks/av/0004-Revert-Set-rlimit-rtprio-for-cameraserver.patch b/patches/frameworks/av/0004-Revert-Set-rlimit-rtprio-for-cameraserver.patch
index 1a97f16..08bd8e8 100644
--- a/patches/frameworks/av/0004-Revert-Set-rlimit-rtprio-for-cameraserver.patch
+++ b/patches/frameworks/av/0004-Revert-Set-rlimit-rtprio-for-cameraserver.patch
@@ -1,7 +1,7 @@
-From 56f442c018adc7a9c7e489d30475cbd15aece6be Mon Sep 17 00:00:00 2001
+From e90bb35e45cdb67e274f81d0a4957c10e95205a1 Mon Sep 17 00:00:00 2001
From: Pierre-Hugues Husson <phh@phh.me>
Date: Sun, 9 Dec 2018 15:56:59 +0100
-Subject: [PATCH 4/6] Revert "Set rlimit rtprio for cameraserver"
+Subject: [PATCH 4/5] Revert "Set rlimit rtprio for cameraserver"
This reverts commit 4ae244cab4fe715fc2729e906b7dda3075fbbac3.
@@ -21,5 +21,5 @@
writepid /dev/cpuset/camera-daemon/tasks /dev/stune/top-app/tasks
- rlimit rtprio 10 10
--
-2.17.1
+2.21.0
diff --git a/patches/frameworks/av/0005-Revert-CameraService-Support-calling-addStates-in-en.patch b/patches/frameworks/av/0005-Revert-CameraService-Support-calling-addStates-in-en.patch
index 4b476e0..cebc559 100644
--- a/patches/frameworks/av/0005-Revert-CameraService-Support-calling-addStates-in-en.patch
+++ b/patches/frameworks/av/0005-Revert-CameraService-Support-calling-addStates-in-en.patch
@@ -1,7 +1,7 @@
-From 7f357fe17ae21f459306ea544ef24b083d41bf0a Mon Sep 17 00:00:00 2001
+From ce88ebbf673e7825c4f924db09aade47b340adcc Mon Sep 17 00:00:00 2001
From: Jon West <electrikjesus@gmail.com>
Date: Wed, 17 Apr 2019 20:42:36 -0400
-Subject: [PATCH 5/6] Revert "CameraService: Support calling addStates in
+Subject: [PATCH 5/5] Revert "CameraService: Support calling addStates in
enumerateProviders"
This reverts commit 2fa8357eeacc88f87c49c7457c94f679cb3b6495.
@@ -69,5 +69,5 @@
updateStatus(newStatus, id);
} else {
--
-2.17.1
+2.21.0
diff --git a/patches/frameworks/av/0006-CameraService-Support-calling-addStates-in-enumerate.patch b/patches/frameworks/av/0006-CameraService-Support-calling-addStates-in-enumerate.patch
deleted file mode 100644
index ad2ab3f..0000000
--- a/patches/frameworks/av/0006-CameraService-Support-calling-addStates-in-enumerate.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From b08e3e719c2401cd4ed9c0c9e639f3f539425918 Mon Sep 17 00:00:00 2001
-From: Artem Borisov <dedsa2002@gmail.com>
-Date: Tue, 25 Sep 2018 12:39:22 +0300
-Subject: [PATCH 6/6] CameraService: Support calling addStates in
- enumerateProviders
-
-Some pre-P camera HALs trigger onDeviceStatusChange callback during HAL init.
-This is horribly wrong and causes a race condition between enumerateProviders
-and onDeviceStatusChange. While it wasn't really harmful in O, in P call sequence
-was changed and now this race condition leads to two problems: null pointer dereference
-in addStates because mFlashlight is not initialized at a proper timing; mServiceLock
-deadlock because updateCameraNumAndIds and enumerateProviders are called at the same time.
-Moving addStates back to enumerateProviders makes the sequence more similar to O, and doesn't
-let these two issues to happen.
-Enable TARGET_CAMERA_NEEDS_ADD_STATES_IN_ENUMERATE when it is necessary.
-
-@Dil3mm4 edit: Instead of TARGET_CAMERA_NEEDS_ADD_STATES_IN_ENUMERATE let's use a system property to make it more generic and suitable for GSI use.
-
-Change-Id: Ife25b9753fdb679ab0c77f385e1b8527551a4711
----
- .../camera/libcameraservice/CameraService.cpp | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
-index 157f769a3..208b27051 100644
---- a/services/camera/libcameraservice/CameraService.cpp
-+++ b/services/camera/libcameraservice/CameraService.cpp
-@@ -181,6 +181,21 @@ status_t CameraService::enumerateProviders() {
-
- for (auto& cameraId : deviceIds) {
- String8 id8 = String8(cameraId.c_str());
-+
-+ if (property_get_bool("persist.sys.camera.huawei", false)) {
-+ bool cameraFound = false;
-+ {
-+ Mutex::Autolock lock(mCameraStatesLock);
-+ auto iter = mCameraStates.find(id8);
-+ if (iter != mCameraStates.end()) {
-+ cameraFound = true;
-+ }
-+ }
-+ if (!cameraFound) {
-+ addStates(id8);
-+ }
-+ }
-+
- onDeviceStatusChanged(id8, CameraDeviceStatus::PRESENT);
- }
-
-@@ -279,8 +294,10 @@ void CameraService::onDeviceStatusChanged(const String8& id,
- ALOGI("%s: Unknown camera ID %s, a new camera is added",
- __FUNCTION__, id.string());
-
-+ if (!property_get_bool("persist.sys.camera.huawei", false)) {
- // First add as absent to make sure clients are notified below
- addStates(id);
-+ }
-
- updateStatus(newStatus, id);
- } else {
---
-2.17.1
-