Compare commits
2 commits
23d4cb289c
...
714720852e
Author | SHA1 | Date | |
---|---|---|---|
Peter Cai | 714720852e | ||
Peter Cai | 2eb02ceb6b |
|
@ -1,7 +1,7 @@
|
|||
From 8ce083670ba59e4ddd33895d491a050744dcc134 Mon Sep 17 00:00:00 2001
|
||||
From 682110b814e507f7ab30f0027fb3d41519fc809d Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 24 Aug 2022 15:42:39 -0400
|
||||
Subject: [PATCH 1/6] APM: Optionally force-load audio policy for system-side
|
||||
Subject: [PATCH 1/5] APM: Optionally force-load audio policy for system-side
|
||||
bt audio HAL
|
||||
|
||||
Required to support our system-side bt audio implementation, i.e.
|
||||
|
@ -57,5 +57,5 @@ index 6f19a7a145..08836377b7 100644
|
|||
|
||||
// Global Configuration
|
||||
--
|
||||
2.43.1
|
||||
2.44.0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From 54dd7999a1345914fed398daf604522f0e177227 Mon Sep 17 00:00:00 2001
|
||||
From 4dc4f2ff0eb1df7d8bfaab7d5d6a006035c3b403 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Thu, 25 Aug 2022 13:30:29 -0400
|
||||
Subject: [PATCH 2/6] APM: Remove A2DP audio ports from the primary HAL
|
||||
Subject: [PATCH 2/5] APM: Remove A2DP audio ports from the primary HAL
|
||||
|
||||
These ports defined in the primary HAL are intended for A2DP offloading,
|
||||
however they do not work in general on GSIs, and will interfere with
|
||||
|
@ -75,5 +75,5 @@ index 08836377b7..0f7c903909 100644
|
|||
|
||||
RouteTraits::Collection routes;
|
||||
--
|
||||
2.43.1
|
||||
2.44.0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From fc5eda105a6c5bdc57a75d6fc459c7041dc87dde Mon Sep 17 00:00:00 2001
|
||||
From 819c95781f525035656b02f00d5251d1328f5073 Mon Sep 17 00:00:00 2001
|
||||
From: ponces <ponces26@gmail.com>
|
||||
Date: Mon, 24 Oct 2022 09:38:34 +0100
|
||||
Subject: [PATCH 3/6] voip: Fix high pitched voice on Qualcomm devices
|
||||
Subject: [PATCH 3/5] voip: Fix high pitched voice on Qualcomm devices
|
||||
|
||||
Change-Id: I6d314912169776b76d07d8c0301ec5249c1870a2
|
||||
---
|
||||
|
@ -52,5 +52,5 @@ index 0f7c903909..c4474cf1c2 100644
|
|||
ALOGE("%s: No %s found", __func__, Attributes::name);
|
||||
return BAD_VALUE;
|
||||
--
|
||||
2.43.1
|
||||
2.44.0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From a7b1332761ec195370f701ec38d81d37c7fb082c Mon Sep 17 00:00:00 2001
|
||||
From 96765f345007ee59522f839a6e994f571dc782d3 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Thu, 18 Aug 2022 15:44:46 -0400
|
||||
Subject: [PATCH 4/6] APM: Restore S, R and Q behavior respectively for
|
||||
Subject: [PATCH 4/5] APM: Restore S, R and Q behavior respectively for
|
||||
telephony audio
|
||||
|
||||
This conditionally reverts part of b2e5cb (T), 51c9cc (S) and afd4ce (R)
|
||||
|
@ -322,5 +322,5 @@ index a1c8f6202c..ee1b595e30 100644
|
|||
SourceClientCollection mAudioSources;
|
||||
|
||||
--
|
||||
2.43.1
|
||||
2.44.0
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
From d118ce30ea1536f2883e23636d74b90973e3ebf5 Mon Sep 17 00:00:00 2001
|
||||
From caaf4d4bd4fcc3fd59a2185b69ba0d77fe2e66c6 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 5 Aug 2019 18:09:50 +0200
|
||||
Subject: [PATCH 5/6] Fix BT in-call on CAF devices
|
||||
Subject: [PATCH 5/5] Fix BT in-call on CAF devices
|
||||
|
||||
See https://github.com/phhusson/treble_experimentations/issues/374
|
||||
|
||||
|
@ -127,5 +127,5 @@ index c4474cf1c2..c1df8f278b 100644
|
|||
|
||||
for (const xmlNode *children = cur->xmlChildrenNode; children != NULL;
|
||||
--
|
||||
2.43.1
|
||||
2.44.0
|
||||
|
||||
|
|
|
@ -1,48 +0,0 @@
|
|||
From ab96b0bbaa4bd636121f8015cf9b0406625513d2 Mon Sep 17 00:00:00 2001
|
||||
From: danielml <daniel@danielml.dev>
|
||||
Date: Tue, 26 Mar 2024 11:49:00 +0100
|
||||
Subject: [PATCH 6/6] libcameraservice: Use the correct vendor tag id type on
|
||||
filterParameters
|
||||
|
||||
This fixes an overflow caused by using the `int` type, thus breaking
|
||||
the camera on cases where the actual vendor tag id is bigger than the
|
||||
maximum value `int` can hold.
|
||||
|
||||
Test: Open camera, make sure that preview shows correctly and that
|
||||
there are no vendor tag errors in logs.
|
||||
Change-Id: Ia00e9e3fcc737bfaf0a917f11690f15d686441ba
|
||||
Signed-off-by: danielml <daniel@danielml.dev>
|
||||
---
|
||||
.../camera/libcameraservice/utils/SessionConfigurationUtils.cpp | 2 +-
|
||||
.../camera/libcameraservice/utils/SessionConfigurationUtils.h | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp b/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
|
||||
index 3be8e15161..384f53e23d 100644
|
||||
--- a/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
|
||||
+++ b/services/camera/libcameraservice/utils/SessionConfigurationUtils.cpp
|
||||
@@ -1133,7 +1133,7 @@ status_t mapRequestTemplateToAidl(camera_request_template_t templateId,
|
||||
}
|
||||
|
||||
void filterParameters(const CameraMetadata& src, const CameraMetadata& deviceInfo,
|
||||
- int vendorTagId, CameraMetadata& dst) {
|
||||
+ metadata_vendor_id_t vendorTagId, CameraMetadata& dst) {
|
||||
const CameraMetadata params(src);
|
||||
camera_metadata_ro_entry_t availableSessionKeys = deviceInfo.find(
|
||||
ANDROID_REQUEST_AVAILABLE_SESSION_KEYS);
|
||||
diff --git a/services/camera/libcameraservice/utils/SessionConfigurationUtils.h b/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
|
||||
index 29e3eca9af..5b2ea5c06f 100644
|
||||
--- a/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
|
||||
+++ b/services/camera/libcameraservice/utils/SessionConfigurationUtils.h
|
||||
@@ -177,7 +177,7 @@ status_t mapRequestTemplateToAidl(camera_request_template_t templateId,
|
||||
aidl::android::hardware::camera::device::RequestTemplate* tempId /*out*/);
|
||||
|
||||
void filterParameters(const CameraMetadata& src, const CameraMetadata& deviceInfo,
|
||||
- int vendorTagId, CameraMetadata& dst);
|
||||
+ metadata_vendor_id_t vendorTagId, CameraMetadata& dst);
|
||||
|
||||
constexpr int32_t MAX_SURFACES_PER_STREAM = 4;
|
||||
|
||||
--
|
||||
2.43.1
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
From 9a08bf33057b2fe1ec3e4e2d922a67462bafe347 Mon Sep 17 00:00:00 2001
|
||||
From ce23dec99926b3e688ae5cd85f5da71c8765f89c Mon Sep 17 00:00:00 2001
|
||||
From: Isaac Chen <tingyi364@gmail.com>
|
||||
Date: Wed, 23 Jun 2021 13:07:30 +0800
|
||||
Subject: [PATCH 1/2] init: Do not start console service when debuggable
|
||||
|
@ -27,5 +27,5 @@ index 317f80908..9dc09ea4a 100644
|
|||
# TODO(b/135984674): reset all necessary properties here.
|
||||
setprop sys.boot_completed ""
|
||||
--
|
||||
2.43.1
|
||||
2.44.0
|
||||
|
||||
|
|
|
@ -1,66 +1,33 @@
|
|||
From a0aa4c41f921134482737cf32437854816aba057 Mon Sep 17 00:00:00 2001
|
||||
From b5256522214257f1a5f8ee5ecac84609993f8129 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 23 Feb 2022 17:37:47 -0500
|
||||
Subject: [PATCH 2/2] init: Override select system properties
|
||||
|
||||
* ro.apex.updatable is overridden based on the kernel version and
|
||||
vendor.
|
||||
* adb secure props and logd can be overridden from system.
|
||||
|
||||
Change-Id: I94efa3f108ae97711026f099f367b6bea325629f
|
||||
---
|
||||
init/property_service.cpp | 42 +++++++++++++++++++++++++++++++++++----
|
||||
1 file changed, 38 insertions(+), 4 deletions(-)
|
||||
init/property_service.cpp | 16 ++++++++++++----
|
||||
1 file changed, 12 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/init/property_service.cpp b/init/property_service.cpp
|
||||
index 013924778..90c6fa538 100644
|
||||
index 013924778..ce164372a 100644
|
||||
--- a/init/property_service.cpp
|
||||
+++ b/init/property_service.cpp
|
||||
@@ -64,6 +64,8 @@
|
||||
@@ -64,6 +64,7 @@
|
||||
#include <selinux/android.h>
|
||||
#include <selinux/label.h>
|
||||
#include <selinux/selinux.h>
|
||||
+#include <sys/utsname.h>
|
||||
+
|
||||
#include "debug_ramdisk.h"
|
||||
#include "epoll.h"
|
||||
#include "init.h"
|
||||
@@ -704,6 +706,26 @@ uint32_t InitPropertySet(const std::string& name, const std::string& value) {
|
||||
static Result<void> load_properties_from_file(const char*, const char*,
|
||||
std::map<std::string, std::string>*);
|
||||
|
||||
+static bool kernel_supports_capex() {
|
||||
+ // Put a threshold at >= 5.0
|
||||
+ struct utsname buf;
|
||||
+ uname(&buf);
|
||||
+ const char *where = buf.release;
|
||||
+ int a = atoi(where);
|
||||
+ if (a >= 5) return true;
|
||||
+
|
||||
+ // If there are vendor apexes, we most likely actually need them
|
||||
+ auto dir = std::unique_ptr<DIR, decltype(&closedir)>{opendir("/vendor/apex"), closedir};
|
||||
+ if (!dir) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ for (struct dirent* ent = readdir(dir.get()); ent; ent = readdir(dir.get())) {
|
||||
+ if(strstr(ent->d_name, "apex")) return true;
|
||||
+ }
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Filter is used to decide which properties to load: NULL loads all keys,
|
||||
* "ro.foo.*" is a prefix match, and "ro.foo.bar" is an exact match.
|
||||
@@ -796,13 +818,25 @@ static void LoadProperties(char* data, const char* filter, const char* filename,
|
||||
@@ -796,13 +797,20 @@ static void LoadProperties(char* data, const char* filter, const char* filename,
|
||||
std::string error;
|
||||
if (CheckPermissions(key, value, context, cr, &error) == PROP_SUCCESS) {
|
||||
auto it = properties->find(key);
|
||||
+ const char *new_value = value;
|
||||
+
|
||||
+ if (strcmp("ro.apex.updatable", key) == 0) {
|
||||
+ new_value = kernel_supports_capex() ? "true" : "false";
|
||||
+ }
|
||||
if (it == properties->end()) {
|
||||
- (*properties)[key] = value;
|
||||
- } else if (it->second != value) {
|
||||
|
@ -70,9 +37,7 @@ index 013924778..90c6fa538 100644
|
|||
<< "' with new value '" << value << "'";
|
||||
- it->second = value;
|
||||
- }
|
||||
+ if (strcmp("ro.apex.updatable", key) == 0) {
|
||||
+ LOG(WARNING) << "... Ignored apex by kernel version";
|
||||
+ } else if (strstr(key, "adb") || strstr(key, "secure") || strstr(key, "ro.logd.kernel")
|
||||
+ if (strstr(key, "adb") || strstr(key, "secure") || strstr(key, "ro.logd.kernel")
|
||||
+ || strcmp("ro.control_privapp_permissions", key) == 0) {
|
||||
+ LOG(WARNING) << "... Ignored";
|
||||
+ } else {
|
||||
|
@ -83,5 +48,5 @@ index 013924778..90c6fa538 100644
|
|||
LOG(ERROR) << "Do not have permissions to set '" << key << "' to '" << value
|
||||
<< "' in property file '" << filename << "': " << error;
|
||||
--
|
||||
2.43.1
|
||||
2.44.0
|
||||
|
||||
|
|
Loading…
Reference in a new issue