Changes for June 2023, syncing up to 20230614
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
From 5e1a02d51745e80b32a720c907ad335e7273cb52 Mon Sep 17 00:00:00 2001
|
||||
From 26b9c0d76d940676fc12d7f27c13180a4d4bd8e1 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 27 Oct 2021 14:39:29 -0400
|
||||
Subject: [PATCH 1/3] Disable vndklite handling
|
||||
Subject: [PATCH 1/4] Disable vndklite handling
|
||||
|
||||
Change-Id: Ic4474cf80fc4b45a9a2760dd51e2ca29c4d961e2
|
||||
---
|
||||
@@ -32,5 +32,5 @@ index 5df379936..ceaba7d95 100644
|
||||
size_t insert_pos = ld_config_file_vndk.find_last_of('.');
|
||||
if (insert_pos == std::string::npos) {
|
||||
--
|
||||
2.25.1
|
||||
2.34.1
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 86e0672d6cac30d38a9f0a7260e6a6f265dcc866 Mon Sep 17 00:00:00 2001
|
||||
From 3cc1f7f548906eaac5f7347c897494fc10ad6aa9 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 19 Feb 2022 08:20:25 -0500
|
||||
Subject: [PATCH 2/3] Add new mechanism to fake vendor props on a per-process
|
||||
Subject: [PATCH 2/4] Add new mechanism to fake vendor props on a per-process
|
||||
basis
|
||||
|
||||
This reads debug.phh.props.<process name>. If its value is "vendor",
|
||||
@@ -74,5 +74,5 @@ index 1cb15c3df..d6e7e3e68 100644
|
||||
|
||||
if (pi != nullptr) {
|
||||
--
|
||||
2.25.1
|
||||
2.34.1
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4daa38527f099ce9826ced79afbd84cab2e0f6c7 Mon Sep 17 00:00:00 2001
|
||||
From 8b21b5d2efbe2d2c7966885342ed093a43f74af9 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 19 Jan 2023 16:44:01 -0500
|
||||
Subject: [PATCH 3/3] Rework property overriding
|
||||
Subject: [PATCH 3/4] Rework property overriding
|
||||
|
||||
- Support property read with callback in addition to previous
|
||||
constant-size property_get
|
||||
@@ -141,5 +141,5 @@ index d6e7e3e68..40ff48bad 100644
|
||||
|
||||
if (pi != nullptr) {
|
||||
--
|
||||
2.25.1
|
||||
2.34.1
|
||||
|
||||
|
||||
@@ -0,0 +1,31 @@
|
||||
From b9ad9ef613bcc1c7fb7713b5091e98343669d393 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 28 May 2023 16:46:46 -0400
|
||||
Subject: [PATCH 4/4] Add some properties to fake in "keymaster" prop
|
||||
replacement mode, to expose unlocked vbmeta state and orange
|
||||
verifiedbootstate
|
||||
|
||||
---
|
||||
libc/system_properties/system_properties.cpp | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/libc/system_properties/system_properties.cpp b/libc/system_properties/system_properties.cpp
|
||||
index 40ff48bad..057199318 100644
|
||||
--- a/libc/system_properties/system_properties.cpp
|
||||
+++ b/libc/system_properties/system_properties.cpp
|
||||
@@ -121,6 +121,12 @@ static const char* redirectToProp(const char *name) {
|
||||
if(strcmp(name, "ro.build.version.security_patch") == 0) {
|
||||
return "ro.keymaster.xxx.security_patch";
|
||||
}
|
||||
+ if(strcmp(name, "ro.boot.vbmeta.device_state") == 0) {
|
||||
+ return "ro.keymaster.xxx.vbmeta_state";
|
||||
+ }
|
||||
+ if(strcmp(name, "ro.boot.verifiedbootstate") == 0) {
|
||||
+ return "ro.keymaster.xxx.verifiedbootstate";
|
||||
+ }
|
||||
}
|
||||
return name;
|
||||
}
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 210f25d815fae5cdbcaf2381b4a704f30013716a Mon Sep 17 00:00:00 2001
|
||||
From cb6c37a57fcbfe2b78ec56effe1f881ea6a5a8d5 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Thu, 18 Aug 2022 15:44:46 -0400
|
||||
Subject: [PATCH 01/27] APM: Restore S, R and Q behavior respectively for
|
||||
Subject: [PATCH 01/26] APM: Restore S, R and Q behavior respectively for
|
||||
telephony audio
|
||||
|
||||
This conditionally reverts part of b2e5cb (T), 51c9cc (S) and afd4ce (R)
|
||||
@@ -36,7 +36,7 @@ Change-Id: I56d36d2aef4319935cb88a3e4771b23c6d5b2145
|
||||
2 files changed, 143 insertions(+), 57 deletions(-)
|
||||
|
||||
diff --git a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||
index 4573382a06..b7d0dbcca4 100644
|
||||
index f625fdb3be..6c45696005 100644
|
||||
--- a/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||
+++ b/services/audiopolicy/managerdefault/AudioPolicyManager.cpp
|
||||
@@ -675,6 +675,17 @@ status_t AudioPolicyManager::updateCallRoutingInternal(
|
||||
@@ -148,7 +148,7 @@ index 4573382a06..b7d0dbcca4 100644
|
||||
bool AudioPolicyManager::isDeviceOfModule(
|
||||
const sp<DeviceDescriptor>& devDesc, const char *moduleId) const {
|
||||
sp<HwModule> module = mHwModules.getModuleFromName(moduleId);
|
||||
@@ -4541,78 +4605,97 @@ status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch *
|
||||
@@ -4550,78 +4614,97 @@ status_t AudioPolicyManager::createAudioPatchInternal(const struct audio_patch *
|
||||
// in config XML to reach the sink so that is can be declared as available.
|
||||
audio_io_handle_t output = AUDIO_IO_HANDLE_NONE;
|
||||
sp<SwAudioOutputDescriptor> outputDesc;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 135ca4926b066565661b999ddc93aec82f54579e Mon Sep 17 00:00:00 2001
|
||||
From b2067fffebd035a5649a22e7f9887517e3c4c74e 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 02/27] Fix BT in-call on CAF devices
|
||||
Subject: [PATCH 02/26] Fix BT in-call on CAF devices
|
||||
|
||||
See https://github.com/phhusson/treble_experimentations/issues/374
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1b41c02cc71aeda0b3c17d17059a3848ad7f369a Mon Sep 17 00:00:00 2001
|
||||
From 6c82041ec3be8a58afbbb506b97eb4527e58e814 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 1 Oct 2019 13:35:49 +0200
|
||||
Subject: [PATCH 03/27] Add (partial, cam id is hardcoded) support for Asus ZF6
|
||||
Subject: [PATCH 03/26] Add (partial, cam id is hardcoded) support for Asus ZF6
|
||||
motor camera
|
||||
|
||||
Change-Id: Iea6e1370780a1d16f728748d1d948d092532d8fe
|
||||
@@ -11,7 +11,7 @@ Change-Id: Iea6e1370780a1d16f728748d1d948d092532d8fe
|
||||
2 files changed, 29 insertions(+)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/CameraService.cpp b/services/camera/libcameraservice/CameraService.cpp
|
||||
index 3f8a0317e1..688c1e7270 100644
|
||||
index bfd3120f73..653666b15c 100644
|
||||
--- a/services/camera/libcameraservice/CameraService.cpp
|
||||
+++ b/services/camera/libcameraservice/CameraService.cpp
|
||||
@@ -26,6 +26,7 @@
|
||||
@@ -30,7 +30,7 @@ index 3f8a0317e1..688c1e7270 100644
|
||||
mEventLog(DEFAULT_EVENT_LOG_LENGTH),
|
||||
mNumberOfCameras(0),
|
||||
mNumberOfCamerasWithoutSystemCamera(0),
|
||||
@@ -2039,6 +2041,7 @@ Status CameraService::connectHelper(const sp<CALLBACK>& cameraCb, const String8&
|
||||
@@ -2044,6 +2046,7 @@ Status CameraService::connectHelper(const sp<CALLBACK>& cameraCb, const String8&
|
||||
mServiceLock.lock();
|
||||
} else {
|
||||
// Otherwise, add client to active clients list
|
||||
@@ -38,7 +38,7 @@ index 3f8a0317e1..688c1e7270 100644
|
||||
finishConnectLocked(client, partial, oomScoreOffset, systemNativeClient);
|
||||
}
|
||||
|
||||
@@ -2157,6 +2160,27 @@ status_t CameraService::addOfflineClient(String8 cameraId, sp<BasicClient> offli
|
||||
@@ -2163,6 +2166,27 @@ status_t CameraService::addOfflineClient(String8 cameraId, sp<BasicClient> offli
|
||||
return OK;
|
||||
}
|
||||
|
||||
@@ -66,7 +66,7 @@ index 3f8a0317e1..688c1e7270 100644
|
||||
Status CameraService::turnOnTorchWithStrengthLevel(const String16& cameraId, int32_t torchStrength,
|
||||
const sp<IBinder>& clientBinder) {
|
||||
Mutex::Autolock lock(mServiceLock);
|
||||
@@ -3388,6 +3412,8 @@ binder::Status CameraService::BasicClient::disconnect() {
|
||||
@@ -3394,6 +3418,8 @@ binder::Status CameraService::BasicClient::disconnect() {
|
||||
}
|
||||
mDisconnected = true;
|
||||
|
||||
@@ -76,7 +76,7 @@ index 3f8a0317e1..688c1e7270 100644
|
||||
sCameraService->logDisconnected(mCameraIdStr, mClientPid, String8(mClientPackageName));
|
||||
sCameraService->mCameraProviderManager->removeRef(CameraProviderManager::DeviceMode::CAMERA,
|
||||
diff --git a/services/camera/libcameraservice/CameraService.h b/services/camera/libcameraservice/CameraService.h
|
||||
index 840e9b6412..b15f988d9e 100644
|
||||
index 70293f4c5b..4ab725230c 100644
|
||||
--- a/services/camera/libcameraservice/CameraService.h
|
||||
+++ b/services/camera/libcameraservice/CameraService.h
|
||||
@@ -227,6 +227,9 @@ public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 59a7bf23df24f65402cab9df4bdfc0489f51a913 Mon Sep 17 00:00:00 2001
|
||||
From 52e8dbd65b0e119ea95d4c77d6aa71983d14f07c Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 24 Aug 2022 15:42:39 -0400
|
||||
Subject: [PATCH 04/27] APM: Optionally force-load audio policy for system-side
|
||||
Subject: [PATCH 04/26] APM: Optionally force-load audio policy for system-side
|
||||
bt audio HAL
|
||||
|
||||
Required to support our system-side bt audio implementation, i.e.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From dd0a14fbd41d80fc3a2abdf0e09d9ef88900b327 Mon Sep 17 00:00:00 2001
|
||||
From d8562da99ed769e3bdadacb95e9bb5d0d47607cb Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Thu, 25 Aug 2022 13:30:29 -0400
|
||||
Subject: [PATCH 05/27] APM: Remove A2DP audio ports from the primary HAL
|
||||
Subject: [PATCH 05/26] 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
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 997d411b208d12e76a6da8197ad92483a925a3a8 Mon Sep 17 00:00:00 2001
|
||||
From 073693679231981063a1f72494f611197e87e1eb Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Thu, 23 Jan 2020 11:13:43 +0800
|
||||
Subject: [PATCH 06/27] audiopolicy: try again with trimmed audio port name if
|
||||
Subject: [PATCH 06/26] audiopolicy: try again with trimmed audio port name if
|
||||
not found
|
||||
|
||||
* In Spreadtrum BSP, some audio routes may contain ports with extra
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 17cda9abd3ce0eb6571565ac6f4c8f5222fb3587 Mon Sep 17 00:00:00 2001
|
||||
From 6f1e2e575733e8720adb3f7076a58604a74d6cff Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 1 Jun 2022 16:56:46 -0400
|
||||
Subject: [PATCH 07/27] camera: Implement property to override default camera
|
||||
Subject: [PATCH 07/26] camera: Implement property to override default camera
|
||||
|
||||
Complement to the frameworks/base patch.
|
||||
|
||||
@@ -11,7 +11,7 @@ Change-Id: I002bfa974bafc2cc01365eeea31c7a5dcb5a2028
|
||||
1 file changed, 22 insertions(+)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
index 3132787608..5e1ba965b7 100644
|
||||
index 43f92a9927..d9fc2ef135 100644
|
||||
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
@@ -36,6 +36,7 @@
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0cd9a1341279236b0b49129afbfab7b534cd6870 Mon Sep 17 00:00:00 2001
|
||||
From 6a19995756f43d79a6cc5588849e6b4dbc537f92 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 13 Apr 2020 21:01:16 +0200
|
||||
Subject: [PATCH 08/27] There are three SCO devices. Fallback from one to the
|
||||
Subject: [PATCH 08/26] There are three SCO devices. Fallback from one to the
|
||||
others if needed
|
||||
|
||||
Change-Id: I414dcb6b154855c00cb8520b23dc1069827864b2
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From d85a10ed9a1171b94eebb7d43bd1124aa38a4009 Mon Sep 17 00:00:00 2001
|
||||
From 5b1cae905f25ba99cc7c85a94a519fb80fa9d5eb Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 14 May 2020 19:54:55 +0200
|
||||
Subject: [PATCH 09/27] Add persist.sys.phh.samsung.camera_ids property to
|
||||
Subject: [PATCH 09/26] Add persist.sys.phh.samsung.camera_ids property to
|
||||
access hidden Samsung cameras
|
||||
|
||||
Change-Id: I2c7bf535272acc28ed2277e96c78ddd28a0b4593
|
||||
@@ -23,7 +23,7 @@ index 981c56942c..7c4e4d9bcd 100644
|
||||
],
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
index 1df6ec4449..ac579b4f7d 100644
|
||||
index 630090b4ac..1acf9c2990 100644
|
||||
--- a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
+++ b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 2b7924156adfdbf101b94aff0b11f29378d074c5 Mon Sep 17 00:00:00 2001
|
||||
From 2562c9ac80280aaaa4bad2faadc04a43251296be Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 19 May 2020 14:01:14 +0200
|
||||
Subject: [PATCH 11/27] Add a property to force camera timestamp source
|
||||
Subject: [PATCH 10/26] Add a property to force camera timestamp source
|
||||
|
||||
Some devices wrongly report their timesource
|
||||
Camera's timesource can either be CLOCK_MONOTONIC, or CLOCK_BOOTTIME
|
||||
@@ -18,10 +18,10 @@ timestamp source.
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
index 48cc2280ff..830ab0aa9f 100644
|
||||
index 6fb7dfd71f..082428beb0 100644
|
||||
--- a/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
+++ b/services/camera/libcameraservice/device3/Camera3Device.cpp
|
||||
@@ -191,8 +191,16 @@ status_t Camera3Device::initializeCommonLocked() {
|
||||
@@ -194,8 +194,16 @@ status_t Camera3Device::initializeCommonLocked() {
|
||||
mTimestampOffset = getMonoToBoottimeOffset();
|
||||
camera_metadata_entry timestampSource =
|
||||
mDeviceInfo.find(ANDROID_SENSOR_INFO_TIMESTAMP_SOURCE);
|
||||
@@ -1,43 +0,0 @@
|
||||
From 6af7e6d774b0a2797cf0844bbcf866fe614af127 Mon Sep 17 00:00:00 2001
|
||||
From: Emilian Peev <epeev@google.com>
|
||||
Date: Fri, 5 Aug 2022 17:28:06 -0700
|
||||
Subject: [PATCH 10/27] Camera: Avoid unnecessary close of buffer acquire fence
|
||||
fds
|
||||
|
||||
According to the gralloc lock documentation:
|
||||
The ownership of acquireFence is always transferred to the callee, even
|
||||
on errors.
|
||||
|
||||
Bug: 241455881
|
||||
Test: Manual using camera application
|
||||
Change-Id: Ieec34b54aaa7f0d773eccb593c3daaa3e41bae0b
|
||||
Merged-In: Ieec34b54aaa7f0d773eccb593c3daaa3e41bae0b
|
||||
---
|
||||
.../camera/libcameraservice/device3/Camera3OutputStream.cpp | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/device3/Camera3OutputStream.cpp b/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
||||
index 396104c4fd..c725aadb79 100644
|
||||
--- a/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
||||
+++ b/services/camera/libcameraservice/device3/Camera3OutputStream.cpp
|
||||
@@ -331,7 +331,7 @@ status_t Camera3OutputStream::fixUpHidlJpegBlobHeader(ANativeWindowBuffer* anwBu
|
||||
status_t res =
|
||||
gbLocker.lockAsync(
|
||||
GraphicBuffer::USAGE_SW_READ_OFTEN | GraphicBuffer::USAGE_SW_WRITE_RARELY,
|
||||
- &mapped, fenceFd.get());
|
||||
+ &mapped, fenceFd.release());
|
||||
if (res != OK) {
|
||||
ALOGE("%s: Failed to lock the buffer: %s (%d)", __FUNCTION__, strerror(-res), res);
|
||||
return res;
|
||||
@@ -1327,7 +1327,7 @@ void Camera3OutputStream::dumpImageToDisk(nsecs_t timestamp,
|
||||
void* mapped = nullptr;
|
||||
base::unique_fd fenceFd(dup(fence));
|
||||
status_t res = graphicBuffer->lockAsync(GraphicBuffer::USAGE_SW_READ_OFTEN, &mapped,
|
||||
- fenceFd.get());
|
||||
+ fenceFd.release());
|
||||
if (res != OK) {
|
||||
ALOGE("%s: Failed to lock the buffer: %s (%d)", __FUNCTION__, strerror(-res), res);
|
||||
return;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 92ed24d529880069ae92c2ace3a8a0d857f92a8a Mon Sep 17 00:00:00 2001
|
||||
From 85c4a39093b25f29812543429344fe0f4ae3df36 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 24 Apr 2018 00:14:28 +0200
|
||||
Subject: [PATCH 12/27] FIH devices: Fix "Earpiece" audio output
|
||||
Subject: [PATCH 11/26] FIH devices: Fix "Earpiece" audio output
|
||||
|
||||
On some FIH devices (confirmed on Razer, and probably on Aquos SS2),
|
||||
Earpiece is not listed in attachedDevices, and devicePort's profile
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4bc269b014047a61d649b2722144c09b123c7818 Mon Sep 17 00:00:00 2001
|
||||
From 870ab4cd819f5e1fcd365f78eb3b878aed8cfb79 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 12 Sep 2020 12:32:50 +0200
|
||||
Subject: [PATCH 13/27] No longer make re-assigning legacy audio groups fatal.
|
||||
Subject: [PATCH 12/26] No longer make re-assigning legacy audio groups fatal.
|
||||
Mi9 declares AUDIO_STREAM_PATCH and AUDIO_STREAM_REROUTING which is defined
|
||||
by framework too
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 3e0ed9d77b0856878315c4c784d342ee284b24ea Mon Sep 17 00:00:00 2001
|
||||
From 0f756fe5abcc7f88525d6c99ac6b1ba5c24a24a8 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 14/27] Make camera IDs filter-out optional
|
||||
Subject: [PATCH 13/26] 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.
|
||||
@@ -11,7 +11,7 @@ Add a property for that.
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
index 5e1ba965b7..2cb27f4ee5 100644
|
||||
index d9fc2ef135..292342238d 100644
|
||||
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
@@ -260,7 +260,9 @@ std::vector<std::string> CameraProviderManager::getAPI1CompatibleCameraDeviceIds
|
||||
@@ -1,7 +1,7 @@
|
||||
From 6449c086ae493c949106ee7ad79251b3ba21506d Mon Sep 17 00:00:00 2001
|
||||
From 16a72adcdbf2e9769deb88ed369d88a4103e7913 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 13 Mar 2021 14:20:03 -0500
|
||||
Subject: [PATCH 15/27] Support Samsung R multi-cams
|
||||
Subject: [PATCH 14/26] Support Samsung R multi-cams
|
||||
|
||||
Change-Id: If46f385e8dd16185cbf37ab083e6a1242e1d1555
|
||||
---
|
||||
@@ -22,7 +22,7 @@ index 7c4e4d9bcd..1faeb60ba7 100644
|
||||
],
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
index ac579b4f7d..070c9aeeae 100644
|
||||
index 1acf9c2990..367ffb8cdc 100644
|
||||
--- a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
+++ b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
@@ -28,6 +28,7 @@
|
||||
@@ -1,7 +1,7 @@
|
||||
From a359f6ea0efe0f07163c7920448440a9f2725348 Mon Sep 17 00:00:00 2001
|
||||
From 6d192a969db7a9e24cd597f0f0f274390473cf5d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 23 Mar 2021 00:16:42 +0100
|
||||
Subject: [PATCH 16/27] Don't crash on unknown audio devices
|
||||
Subject: [PATCH 15/26] Don't crash on unknown audio devices
|
||||
|
||||
Change-Id: I2df8d88f742da6a84aa8888cdf19de25444de919
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
From 0879f806e8a6da5dc751de71c3c57342cd16ea5d Mon Sep 17 00:00:00 2001
|
||||
From b2f7b7bbbd9eb1943c7f14bd2a9158c8ee10937d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 28 Mar 2021 18:54:47 +0200
|
||||
Subject: [PATCH 17/27] Not all sources in a route are valid. Dont ignore the
|
||||
Subject: [PATCH 16/26] Not all sources in a route are valid. Dont ignore the
|
||||
whole route because of one broken source
|
||||
|
||||
Change-Id: If8a51740e71bef3a4738262ad7b43a337b0ec36d
|
||||
@@ -1,7 +1,7 @@
|
||||
From f58ed8113a8bb271a3180f3f140b67f7e8ad5fe8 Mon Sep 17 00:00:00 2001
|
||||
From 71a2e7c525ff8c93a678c0c9baa3b43dc725de4c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 28 Mar 2021 14:48:49 +0200
|
||||
Subject: [PATCH 18/27] Use a fake volume policy when none has been found
|
||||
Subject: [PATCH 17/26] Use a fake volume policy when none has been found
|
||||
|
||||
This is useful, because on Samsung devices, the "real"
|
||||
(=non-gsi-cheating) audio policy doesn't have any volume policy.
|
||||
@@ -1,7 +1,7 @@
|
||||
From c9c0a6cc8fd9479853c1d06cec72aa796ce7023c Mon Sep 17 00:00:00 2001
|
||||
From 5809e5b3935b98d46a81e3e4fe684d878668d400 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 7 Aug 2021 11:11:39 +0200
|
||||
Subject: [PATCH 19/27] When aux cameras are enabled, ignore "system only"
|
||||
Subject: [PATCH 18/26] When aux cameras are enabled, ignore "system only"
|
||||
camera flag (it shouldnt be q security issue since secure cameras are listed
|
||||
otherwise)
|
||||
|
||||
@@ -10,7 +10,7 @@ Subject: [PATCH 19/27] When aux cameras are enabled, ignore "system only"
|
||||
1 file changed, 6 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/CameraProviderManager.cpp b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
index 2cb27f4ee5..99fc7247b0 100644
|
||||
index 292342238d..4a2fb94da3 100644
|
||||
--- a/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
+++ b/services/camera/libcameraservice/common/CameraProviderManager.cpp
|
||||
@@ -978,10 +978,12 @@ SystemCameraKind CameraProviderManager::ProviderInfo::DeviceInfo3::getSystemCame
|
||||
@@ -1,7 +1,7 @@
|
||||
From 53784b10ffda24be164ef134b91ffca3d08954da Mon Sep 17 00:00:00 2001
|
||||
From 8e3d68f0c713c4a759421a7981661bbde249e8ef Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 11 Oct 2021 16:10:42 -0400
|
||||
Subject: [PATCH 20/27] Revert "Remove support for audio HAL V2 from the
|
||||
Subject: [PATCH 19/26] Revert "Remove support for audio HAL V2 from the
|
||||
framework"
|
||||
|
||||
This reverts commit cbf517f837f7bf8a59f3ff8aa1e0e3e19612e251.
|
||||
@@ -1,7 +1,7 @@
|
||||
From b9bf555e37b304194c602e4eeb806fad45ad77ba Mon Sep 17 00:00:00 2001
|
||||
From bbce086c423807c7b0566bf4a6167cd234ac1b8f Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 30 Jan 2022 07:40:19 -0500
|
||||
Subject: [PATCH 21/27] Fix parsing audio hal 7.0 audio policies
|
||||
Subject: [PATCH 20/26] Fix parsing audio hal 7.0 audio policies
|
||||
|
||||
Google changed separator from natural "," to weird " "
|
||||
We broke its support in "FIH devices: Fix "Earpiece" audio output"
|
||||
@@ -1,7 +1,7 @@
|
||||
From 92c8febfbe746f602e91f3be74538eac3a9f9907 Mon Sep 17 00:00:00 2001
|
||||
From dce9b06ef349b7f63fb048e20c6e537db290e53e Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 12 Mar 2022 18:07:43 -0500
|
||||
Subject: [PATCH 22/27] fixup! Not all sources in a route are valid. Dont
|
||||
Subject: [PATCH 21/26] fixup! Not all sources in a route are valid. Dont
|
||||
ignore the whole route because of one broken source
|
||||
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
From 9df56d42780a25e76bf020eeee234de665fa58e3 Mon Sep 17 00:00:00 2001
|
||||
From 8e6856f46c09f34adde7f29d82a061b82f8ad061 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 16 Apr 2022 14:30:14 -0400
|
||||
Subject: [PATCH 23/27] Add a prop to change Samsung flash strength
|
||||
Subject: [PATCH 22/26] Add a prop to change Samsung flash strength
|
||||
|
||||
---
|
||||
services/camera/libcameraservice/Android.bp | 1 +
|
||||
@@ -21,7 +21,7 @@ index 1faeb60ba7..8c588065cf 100644
|
||||
],
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
index 070c9aeeae..41830f2c82 100644
|
||||
index 367ffb8cdc..362945a1ea 100644
|
||||
--- a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
+++ b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
@@ -29,6 +29,7 @@
|
||||
@@ -1,7 +1,7 @@
|
||||
From 32b048f47465f94e2a4f75c975cd7697715c4c58 Mon Sep 17 00:00:00 2001
|
||||
From af599ed508e955ecf25492020b4f6f6bf08abdce Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 2 May 2022 17:37:09 -0400
|
||||
Subject: [PATCH 24/27] Support variable flash strength on samsung hal 4.0
|
||||
Subject: [PATCH 23/26] Support variable flash strength on samsung hal 4.0
|
||||
|
||||
---
|
||||
services/camera/libcameraservice/Android.bp | 1 +
|
||||
@@ -21,7 +21,7 @@ index 8c588065cf..769862aaa2 100644
|
||||
],
|
||||
|
||||
diff --git a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
index 41830f2c82..a84b58201c 100644
|
||||
index 362945a1ea..62c57cd4f7 100644
|
||||
--- a/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
+++ b/services/camera/libcameraservice/common/hidl/HidlProviderInfo.cpp
|
||||
@@ -30,6 +30,7 @@
|
||||
@@ -1,7 +1,7 @@
|
||||
From a4c965105e5684d1990b8d1ba26252dc09103815 Mon Sep 17 00:00:00 2001
|
||||
From 091266e8f3534f3fc0d20a0d8f14fa1ab3a1cab8 Mon Sep 17 00:00:00 2001
|
||||
From: ponces <ponces26@gmail.com>
|
||||
Date: Mon, 24 Oct 2022 09:38:34 +0100
|
||||
Subject: [PATCH 25/27] voip: Fix high pitched voice on Qualcomm devices
|
||||
Subject: [PATCH 24/26] voip: Fix high pitched voice on Qualcomm devices
|
||||
|
||||
---
|
||||
.../common/managerdefinitions/src/Serializer.cpp | 9 +++++++++
|
||||
@@ -1,7 +1,7 @@
|
||||
From 52aaedd8730d117a34ad3fc40a808d218dfcce59 Mon Sep 17 00:00:00 2001
|
||||
From c484da1761e5fa9df14b81ca95deaf51dcdd3a47 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 9 Nov 2022 17:10:52 -0500
|
||||
Subject: [PATCH 26/27] Fix audio hal 2.0 support. Fixup of Revert "Remove
|
||||
Subject: [PATCH 25/26] Fix audio hal 2.0 support. Fixup of Revert "Remove
|
||||
support for audio HAL V2 from the framework"
|
||||
|
||||
---
|
||||
@@ -0,0 +1,64 @@
|
||||
From fdd219ba505320ea7f065f8b1f3a8166c6847453 Mon Sep 17 00:00:00 2001
|
||||
From: Alberto Ponces <ponces26@gmail.com>
|
||||
Date: Sun, 30 Apr 2023 23:29:04 +0100
|
||||
Subject: [PATCH 26/26] audiopolicy: Fix broken mic while video recording on
|
||||
some Exynos devices This should fix
|
||||
https://github.com/phhusson/treble_experimentations/issues/2021 and
|
||||
https://github.com/phhusson/treble_experimentations/issues/2384. Credits to
|
||||
@haridhayal11.
|
||||
|
||||
---
|
||||
.../managerdefinitions/src/Serializer.cpp | 29 ++++++++++++-------
|
||||
1 file changed, 18 insertions(+), 11 deletions(-)
|
||||
|
||||
diff --git a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
index ef310977b2..da2842656a 100644
|
||||
--- a/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
+++ b/services/audiopolicy/common/managerdefinitions/src/Serializer.cpp
|
||||
@@ -660,6 +660,9 @@ std::variant<status_t, RouteTraits::Element> PolicySerializer::deserialize<Route
|
||||
}
|
||||
route->setSink(sink);
|
||||
|
||||
+ // This fixes broken mic while video record on some Exynos devices
|
||||
+ bool disableBackMic = property_get_bool("persist.sys.phh.disable_back_mic", false);
|
||||
+
|
||||
std::string sourcesAttr = getXmlAttribute(cur, Attributes::sources);
|
||||
if (sourcesAttr.empty()) {
|
||||
ALOGE("%s: No %s found", __func__, Attributes::sources);
|
||||
@@ -672,18 +675,22 @@ std::variant<status_t, RouteTraits::Element> PolicySerializer::deserialize<Route
|
||||
char *devTag = strtok(sourcesLiteral.get(), ",");
|
||||
while (devTag != NULL) {
|
||||
if (strlen(devTag) != 0) {
|
||||
- sp<PolicyAudioPort> source = ctx->findPortByTagName(devTag);
|
||||
- if (source == NULL) {
|
||||
- source = ctx->findPortByTagName(trim(devTag));
|
||||
- }
|
||||
- if (source == NULL && false) {
|
||||
- ALOGE("%s: no source found with name=%s", __func__, devTag);
|
||||
- return BAD_VALUE;
|
||||
- } else if (source == NULL) {
|
||||
- ALOGW("Skipping route source \"%s\" as it likely has vendor extension type",
|
||||
- devTag);
|
||||
+ if (disableBackMic && strcmp(devTag, "Built-In Back Mic") == 0) {
|
||||
+ ALOGW("Skipping route source \"%s\" as it breaks video recording mic", devTag);
|
||||
} else {
|
||||
- sources.add(source);
|
||||
+ sp<PolicyAudioPort> source = ctx->findPortByTagName(devTag);
|
||||
+ if (source == NULL) {
|
||||
+ source = ctx->findPortByTagName(trim(devTag));
|
||||
+ }
|
||||
+ if (source == NULL && false) {
|
||||
+ ALOGE("%s: no source found with name=%s", __func__, devTag);
|
||||
+ return BAD_VALUE;
|
||||
+ } else if (source == NULL) {
|
||||
+ ALOGW("Skipping route source \"%s\" as it likely has vendor extension type",
|
||||
+ devTag);
|
||||
+ } else {
|
||||
+ sources.add(source);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
devTag = strtok(NULL, ",");
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,168 +0,0 @@
|
||||
From 1479c498dd8d720bdfc47c3e36653af9baa829d3 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 29 Mar 2023 16:53:18 -0400
|
||||
Subject: [PATCH 27/27] Allow uname syscall in all seccomp -- This is needed
|
||||
because of the getCallingSid change in fw/n libbinder
|
||||
|
||||
---
|
||||
services/mediacodec/seccomp_policy/mediacodec-arm.policy | 2 ++
|
||||
services/mediacodec/seccomp_policy/mediacodec-arm64.policy | 2 ++
|
||||
services/mediacodec/seccomp_policy/mediacodec-x86.policy | 2 ++
|
||||
services/mediacodec/seccomp_policy/mediacodec-x86_64.policy | 2 ++
|
||||
services/mediacodec/seccomp_policy/mediaswcodec-arm.policy | 2 ++
|
||||
services/mediacodec/seccomp_policy/mediaswcodec-arm64.policy | 2 ++
|
||||
services/mediacodec/seccomp_policy/mediaswcodec-x86.policy | 2 ++
|
||||
services/mediacodec/seccomp_policy/mediaswcodec-x86_64.policy | 2 ++
|
||||
.../mediaextractor/seccomp_policy/mediaextractor-arm.policy | 2 ++
|
||||
.../mediaextractor/seccomp_policy/mediaextractor-arm64.policy | 2 ++
|
||||
.../mediaextractor/seccomp_policy/mediaextractor-x86.policy | 2 ++
|
||||
.../mediaextractor/seccomp_policy/mediaextractor-x86_64.policy | 2 ++
|
||||
12 files changed, 24 insertions(+)
|
||||
|
||||
diff --git a/services/mediacodec/seccomp_policy/mediacodec-arm.policy b/services/mediacodec/seccomp_policy/mediacodec-arm.policy
|
||||
index b4a9ff6249..aa6fc70d45 100644
|
||||
--- a/services/mediacodec/seccomp_policy/mediacodec-arm.policy
|
||||
+++ b/services/mediacodec/seccomp_policy/mediacodec-arm.policy
|
||||
@@ -58,6 +58,8 @@ ugetrlimit: 1
|
||||
getdents64: 1
|
||||
getrandom: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /system/etc/seccomp_policy/crash_dump.arm.policy
|
||||
|
||||
@include /system/etc/seccomp_policy/code_coverage.arm.policy
|
||||
diff --git a/services/mediacodec/seccomp_policy/mediacodec-arm64.policy b/services/mediacodec/seccomp_policy/mediacodec-arm64.policy
|
||||
index b4a9ff6249..aa6fc70d45 100644
|
||||
--- a/services/mediacodec/seccomp_policy/mediacodec-arm64.policy
|
||||
+++ b/services/mediacodec/seccomp_policy/mediacodec-arm64.policy
|
||||
@@ -58,6 +58,8 @@ ugetrlimit: 1
|
||||
getdents64: 1
|
||||
getrandom: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /system/etc/seccomp_policy/crash_dump.arm.policy
|
||||
|
||||
@include /system/etc/seccomp_policy/code_coverage.arm.policy
|
||||
diff --git a/services/mediacodec/seccomp_policy/mediacodec-x86.policy b/services/mediacodec/seccomp_policy/mediacodec-x86.policy
|
||||
index 4bcc077ce8..3a08ff6f09 100644
|
||||
--- a/services/mediacodec/seccomp_policy/mediacodec-x86.policy
|
||||
+++ b/services/mediacodec/seccomp_policy/mediacodec-x86.policy
|
||||
@@ -69,5 +69,7 @@ sched_yield: 1
|
||||
getpid: 1
|
||||
gettid: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /system/etc/seccomp_policy/crash_dump.x86.policy
|
||||
@include /system/etc/seccomp_policy/code_coverage.x86.policy
|
||||
diff --git a/services/mediacodec/seccomp_policy/mediacodec-x86_64.policy b/services/mediacodec/seccomp_policy/mediacodec-x86_64.policy
|
||||
index 4bcc077ce8..3a08ff6f09 100644
|
||||
--- a/services/mediacodec/seccomp_policy/mediacodec-x86_64.policy
|
||||
+++ b/services/mediacodec/seccomp_policy/mediacodec-x86_64.policy
|
||||
@@ -69,5 +69,7 @@ sched_yield: 1
|
||||
getpid: 1
|
||||
gettid: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /system/etc/seccomp_policy/crash_dump.x86.policy
|
||||
@include /system/etc/seccomp_policy/code_coverage.x86.policy
|
||||
diff --git a/services/mediacodec/seccomp_policy/mediaswcodec-arm.policy b/services/mediacodec/seccomp_policy/mediaswcodec-arm.policy
|
||||
index 41efce08b1..3c74e077c6 100644
|
||||
--- a/services/mediacodec/seccomp_policy/mediaswcodec-arm.policy
|
||||
+++ b/services/mediacodec/seccomp_policy/mediaswcodec-arm.policy
|
||||
@@ -86,4 +86,6 @@ getegid32: 1
|
||||
getgroups32: 1
|
||||
sysinfo: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /apex/com.android.media.swcodec/etc/seccomp_policy/code_coverage.arm.policy
|
||||
diff --git a/services/mediacodec/seccomp_policy/mediaswcodec-arm64.policy b/services/mediacodec/seccomp_policy/mediaswcodec-arm64.policy
|
||||
index 4317cccfdd..9d9b11538f 100644
|
||||
--- a/services/mediacodec/seccomp_policy/mediaswcodec-arm64.policy
|
||||
+++ b/services/mediacodec/seccomp_policy/mediaswcodec-arm64.policy
|
||||
@@ -90,4 +90,6 @@ sysinfo: 1
|
||||
setsockopt: 1
|
||||
sendmsg: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /apex/com.android.media.swcodec/etc/seccomp_policy/code_coverage.arm64.policy
|
||||
diff --git a/services/mediacodec/seccomp_policy/mediaswcodec-x86.policy b/services/mediacodec/seccomp_policy/mediaswcodec-x86.policy
|
||||
index 9bafe7bc55..4d9192cfe9 100644
|
||||
--- a/services/mediacodec/seccomp_policy/mediaswcodec-x86.policy
|
||||
+++ b/services/mediacodec/seccomp_policy/mediaswcodec-x86.policy
|
||||
@@ -69,5 +69,7 @@ sched_yield: 1
|
||||
getpid: 1
|
||||
gettid: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /apex/com.android.media.swcodec/etc/seccomp_policy/crash_dump.x86.policy
|
||||
@include /apex/com.android.media.swcodec/etc/seccomp_policy/code_coverage.x86.policy
|
||||
diff --git a/services/mediacodec/seccomp_policy/mediaswcodec-x86_64.policy b/services/mediacodec/seccomp_policy/mediaswcodec-x86_64.policy
|
||||
index b0ed0402bb..607d8dadd8 100644
|
||||
--- a/services/mediacodec/seccomp_policy/mediaswcodec-x86_64.policy
|
||||
+++ b/services/mediacodec/seccomp_policy/mediaswcodec-x86_64.policy
|
||||
@@ -69,5 +69,7 @@ sched_yield: 1
|
||||
getpid: 1
|
||||
gettid: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /apex/com.android.media.swcodec/etc/seccomp_policy/crash_dump.x86_64.policy
|
||||
@include /apex/com.android.media.swcodec/etc/seccomp_policy/code_coverage.x86_64.policy
|
||||
diff --git a/services/mediaextractor/seccomp_policy/mediaextractor-arm.policy b/services/mediaextractor/seccomp_policy/mediaextractor-arm.policy
|
||||
index e1f7fe7265..435f76cf9d 100644
|
||||
--- a/services/mediaextractor/seccomp_policy/mediaextractor-arm.policy
|
||||
+++ b/services/mediaextractor/seccomp_policy/mediaextractor-arm.policy
|
||||
@@ -60,5 +60,7 @@ mremap: arg3 == 3 || arg3 == MREMAP_MAYMOVE
|
||||
readlinkat: 1
|
||||
_llseek: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /apex/com.android.media/etc/seccomp_policy/crash_dump.arm.policy
|
||||
@include /apex/com.android.media/etc/seccomp_policy/code_coverage.arm.policy
|
||||
diff --git a/services/mediaextractor/seccomp_policy/mediaextractor-arm64.policy b/services/mediaextractor/seccomp_policy/mediaextractor-arm64.policy
|
||||
index e54c9187e7..c2be7cf820 100644
|
||||
--- a/services/mediaextractor/seccomp_policy/mediaextractor-arm64.policy
|
||||
+++ b/services/mediaextractor/seccomp_policy/mediaextractor-arm64.policy
|
||||
@@ -57,5 +57,7 @@ setsockopt: 1
|
||||
sendmsg: 1
|
||||
set_tid_address: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /apex/com.android.media/etc/seccomp_policy/crash_dump.arm64.policy
|
||||
@include /apex/com.android.media/etc/seccomp_policy/code_coverage.arm64.policy
|
||||
diff --git a/services/mediaextractor/seccomp_policy/mediaextractor-x86.policy b/services/mediaextractor/seccomp_policy/mediaextractor-x86.policy
|
||||
index 5b3762712d..5897402ca1 100644
|
||||
--- a/services/mediaextractor/seccomp_policy/mediaextractor-x86.policy
|
||||
+++ b/services/mediaextractor/seccomp_policy/mediaextractor-x86.policy
|
||||
@@ -59,5 +59,7 @@ sched_yield: 1
|
||||
getpid: 1
|
||||
gettid: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /apex/com.android.media/etc/seccomp_policy/crash_dump.x86.policy
|
||||
@include /apex/com.android.media/etc/seccomp_policy/code_coverage.x86.policy
|
||||
diff --git a/services/mediaextractor/seccomp_policy/mediaextractor-x86_64.policy b/services/mediaextractor/seccomp_policy/mediaextractor-x86_64.policy
|
||||
index 51df1a238d..6846c01d0e 100644
|
||||
--- a/services/mediaextractor/seccomp_policy/mediaextractor-x86_64.policy
|
||||
+++ b/services/mediaextractor/seccomp_policy/mediaextractor-x86_64.policy
|
||||
@@ -53,5 +53,7 @@ sched_yield: 1
|
||||
getpid: 1
|
||||
gettid: 1
|
||||
|
||||
+uname: 1
|
||||
+
|
||||
@include /apex/com.android.media/etc/seccomp_policy/crash_dump.x86_64.policy
|
||||
@include /apex/com.android.media/etc/seccomp_policy/code_coverage.x86_64.policy
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 8bb17811e9783cb9d05023b907463b4d8178ec79 Mon Sep 17 00:00:00 2001
|
||||
From 15e7893c7072a2d912a48dd2bec2b7ce368d6088 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 5 Oct 2021 17:59:16 -0400
|
||||
Subject: [PATCH 01/35] Fallback to stupid autobrightness if brightness values
|
||||
Subject: [PATCH 01/36] Fallback to stupid autobrightness if brightness values
|
||||
are broken
|
||||
|
||||
This is needed because of:
|
||||
@@ -14,10 +14,10 @@ Change-Id: Ieb679b34239013a5e31b34cb010b12febd9ef6d9
|
||||
1 file changed, 7 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/display/DisplayDeviceConfig.java b/services/core/java/com/android/server/display/DisplayDeviceConfig.java
|
||||
index fa812c163643..e8e2fc69e646 100644
|
||||
index c36c5b6c1e81..851162968dbe 100644
|
||||
--- a/services/core/java/com/android/server/display/DisplayDeviceConfig.java
|
||||
+++ b/services/core/java/com/android/server/display/DisplayDeviceConfig.java
|
||||
@@ -650,9 +650,14 @@ public class DisplayDeviceConfig {
|
||||
@@ -676,9 +676,14 @@ public class DisplayDeviceConfig {
|
||||
* @return A configuration instance.
|
||||
*/
|
||||
public static DisplayDeviceConfig create(Context context, boolean useConfigXml) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 62fdde809e3ac3bb3dbfa22e64d84ffb6180d7a1 Mon Sep 17 00:00:00 2001
|
||||
From 5111abd8552dd2b97bc3ef436fc0b64001998a25 Mon Sep 17 00:00:00 2001
|
||||
From: Raphael Mounier <mounierr07@gmail.com>
|
||||
Date: Sat, 6 Aug 2022 18:08:36 +0200
|
||||
Subject: [PATCH 02/35] Fix env empty string - ANDROID_STORAGE
|
||||
Subject: [PATCH 02/36] Fix env empty string - ANDROID_STORAGE
|
||||
|
||||
Huawei hi6250 define in init.hi6250.rc ANDROID_STORAGE to "", so check empty string and replace with default path. Apply change for all env directory
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1e432153ed75c31abe94df1250ade6b3db515cfb Mon Sep 17 00:00:00 2001
|
||||
From 4236c37fb14996fef7e8341ede0a939f6afe61a0 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 28 Nov 2017 18:28:04 +0100
|
||||
Subject: [PATCH 03/35] Relax requirement for visible flag to sdcards
|
||||
Subject: [PATCH 03/36] Relax requirement for visible flag to sdcards
|
||||
|
||||
The vast majority of sdcard readers are stable enough to be declared by
|
||||
the API. (I see no counter-example)
|
||||
@@ -13,7 +13,7 @@ Change-Id: Ia616671c03562d1eadaff5531a5c708a62d7ad3a
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/StorageManagerService.java b/services/core/java/com/android/server/StorageManagerService.java
|
||||
index c367dcec1b08..3680221b7f52 100644
|
||||
index c127a9f69caf..6885f2f2c583 100644
|
||||
--- a/services/core/java/com/android/server/StorageManagerService.java
|
||||
+++ b/services/core/java/com/android/server/StorageManagerService.java
|
||||
@@ -1616,7 +1616,8 @@ class StorageManagerService extends IStorageManager.Stub
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4628b7d028f66e72d2916cc1a28e05352284bf5b Mon Sep 17 00:00:00 2001
|
||||
From b90b81d2f3122e90da0ccdf0947289ed15aaf99d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 17 May 2018 20:28:35 +0200
|
||||
Subject: [PATCH 04/35] Don't crash if there is IR HAL is not declared
|
||||
Subject: [PATCH 04/36] Don't crash if there is IR HAL is not declared
|
||||
|
||||
Change-Id: I3afded27441bbee8244d5fda544b3e6d1238dc1b
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f960e230476cf36078619e632f28c886ba5a723c Mon Sep 17 00:00:00 2001
|
||||
From d1c40c7e22c23bd9ffd6ce78bbecf0ab69ae8f31 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 1 Jun 2022 16:56:20 -0400
|
||||
Subject: [PATCH 05/35] Implement a persistent property to override the default
|
||||
Subject: [PATCH 05/36] Implement a persistent property to override the default
|
||||
primary camera (0)
|
||||
|
||||
Change-Id: I49b45d00bf71d7932591b3516d49a680e1b6568b
|
||||
@@ -11,10 +11,10 @@ Change-Id: I49b45d00bf71d7932591b3516d49a680e1b6568b
|
||||
2 files changed, 14 insertions(+)
|
||||
|
||||
diff --git a/core/java/android/hardware/Camera.java b/core/java/android/hardware/Camera.java
|
||||
index 2fbcf5bfaf52..df9c13edf337 100644
|
||||
index e986320b4a9f..a7002ec60cd4 100644
|
||||
--- a/core/java/android/hardware/Camera.java
|
||||
+++ b/core/java/android/hardware/Camera.java
|
||||
@@ -465,6 +465,11 @@ public class Camera {
|
||||
@@ -453,6 +453,11 @@ public class Camera {
|
||||
* @see #open(int)
|
||||
*/
|
||||
public static Camera open() {
|
||||
@@ -27,10 +27,10 @@ index 2fbcf5bfaf52..df9c13edf337 100644
|
||||
CameraInfo cameraInfo = new CameraInfo();
|
||||
for (int i = 0; i < numberOfCameras; i++) {
|
||||
diff --git a/core/java/android/hardware/camera2/CameraManager.java b/core/java/android/hardware/camera2/CameraManager.java
|
||||
index db19394c16e4..c2f7ecf94580 100644
|
||||
index 3e5fee84b7be..06519a49b7b4 100644
|
||||
--- a/core/java/android/hardware/camera2/CameraManager.java
|
||||
+++ b/core/java/android/hardware/camera2/CameraManager.java
|
||||
@@ -1789,6 +1789,15 @@ public final class CameraManager {
|
||||
@@ -1829,6 +1829,15 @@ public final class CameraManager {
|
||||
}
|
||||
}});
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 9a744b795bdb1a65fef7736581c3f8149c3f00b7 Mon Sep 17 00:00:00 2001
|
||||
From c069368112a6d809a9a67515139e816a6ac3df9f Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 6 Aug 2018 12:49:00 +0200
|
||||
Subject: [PATCH 06/35] Show APN Settings for CDMA carriers
|
||||
Subject: [PATCH 06/36] Show APN Settings for CDMA carriers
|
||||
|
||||
---
|
||||
telephony/java/android/telephony/CarrierConfigManager.java | 2 +-
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 9fcf1455d6bdcb7b4158f7dc7362e7b6a50586bd Mon Sep 17 00:00:00 2001
|
||||
From 081b2db68c6e3e94ef5fc5ec661d65626b7398ea Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 8 Nov 2018 23:04:03 +0100
|
||||
Subject: [PATCH 07/35] Re-order services so that it works even without qtaguid
|
||||
Subject: [PATCH 07/36] Re-order services so that it works even without qtaguid
|
||||
|
||||
Change-Id: I0c0f527b3ae151d45c68f7ac6c205da3f34e74df
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 8bcce90bcd403dd7b8304fb044f6ce9023d8ff52 Mon Sep 17 00:00:00 2001
|
||||
From f845026696358476f62d994469503a78c1708347 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 24 Mar 2019 23:05:14 +0100
|
||||
Subject: [PATCH 08/35] Support samsung Pie and Q light hal
|
||||
Subject: [PATCH 08/36] Support samsung Pie and Q light hal
|
||||
|
||||
Change-Id: I01f94acd7d0672733e48854d80368f9ac6f861c6
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From afafdbbdb3d98d61b9234a94142b556ba1add3b8 Mon Sep 17 00:00:00 2001
|
||||
From 03c4069fbc2b8293981720a511f254646dae55b7 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 12 Aug 2019 23:08:26 +0200
|
||||
Subject: [PATCH 09/35] Add support for samsung touch, physical and hover
|
||||
Subject: [PATCH 09/36] Add support for samsung touch, physical and hover
|
||||
proximity sensor as fallback to real proximity sensor
|
||||
|
||||
Change-Id: I7a0f8b4665c802140d19197d850b77b2a7ac1865
|
||||
@@ -10,10 +10,10 @@ Change-Id: I7a0f8b4665c802140d19197d850b77b2a7ac1865
|
||||
1 file changed, 35 insertions(+)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
|
||||
index 8e1d1ae494e4..909d1d533a67 100644
|
||||
index 2d9f1399ba8c..cd2cca8860b0 100644
|
||||
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
|
||||
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
|
||||
@@ -2152,6 +2152,27 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
@@ -2186,6 +2186,27 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
? Sensor.TYPE_PROXIMITY : SensorUtils.NO_FALLBACK;
|
||||
mProximitySensor = SensorUtils.findSensor(mSensorManager, proxSensor.type, proxSensor.name,
|
||||
fallbackType);
|
||||
@@ -41,7 +41,7 @@ index 8e1d1ae494e4..909d1d533a67 100644
|
||||
if (mProximitySensor != null) {
|
||||
mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(),
|
||||
TYPICAL_PROXIMITY_THRESHOLD);
|
||||
@@ -3214,6 +3235,20 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
@@ -3304,6 +3325,20 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
if (mProximitySensorEnabled) {
|
||||
final long time = SystemClock.uptimeMillis();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From d596f036963daa2a7d4d6cef0419f5198a6dd385 Mon Sep 17 00:00:00 2001
|
||||
From f2eb9f0bec676e79e8542d284c537c9fa13b34ff Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 5 Apr 2020 16:32:46 +0200
|
||||
Subject: [PATCH 10/35] Always allow overriding the number of work profiles
|
||||
Subject: [PATCH 10/36] Always allow overriding the number of work profiles
|
||||
|
||||
Change-Id: I6eb09aa71663c6fbe7563e3038bffcabdba0ff6a
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Change-Id: I6eb09aa71663c6fbe7563e3038bffcabdba0ff6a
|
||||
1 file changed, 2 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
|
||||
index 7090881138c7..2f2b423a9a3b 100644
|
||||
index af7b481dd311..5f61eb596889 100644
|
||||
--- a/services/core/java/com/android/server/pm/UserManagerService.java
|
||||
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
|
||||
@@ -6432,12 +6432,8 @@ public class UserManagerService extends IUserManager.Stub {
|
||||
@@ -6490,12 +6490,8 @@ public class UserManagerService extends IUserManager.Stub {
|
||||
*/
|
||||
private static int getMaxUsersOfTypePerParent(UserTypeDetails userTypeDetails) {
|
||||
final int defaultMax = userTypeDetails.getMaxAllowedPerParent();
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 3fdb0ba3d7ec30aebd578f213b1e104fddcd5edf Mon Sep 17 00:00:00 2001
|
||||
From 6f3a5b5a9e5e57e3866bc271a83ad8941f1bdd44 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 6 Jun 2020 18:21:56 +0200
|
||||
Subject: [PATCH 11/35] HOME deserves to wake-up devices just as well as back
|
||||
Subject: [PATCH 11/36] HOME deserves to wake-up devices just as well as back
|
||||
and menu
|
||||
|
||||
Change-Id: Ia562bafd8c620d00c17e8eb338e4701c6c4a3c3a
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 3c1464a7850baf06f8776082a8a5f9fb8d2c107f Mon Sep 17 00:00:00 2001
|
||||
From 743c3b688e9fbfc793dfb1cf436097f395782807 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 29 Sep 2020 22:39:47 +0200
|
||||
Subject: [PATCH 12/35] Some devices have proximity sensor reporting NaN as max
|
||||
Subject: [PATCH 12/36] Some devices have proximity sensor reporting NaN as max
|
||||
range for some reason. Make them behave standard way by setting 5 cm
|
||||
|
||||
Change-Id: I3c39e3e914a05903c140235702e0480d2d58a612
|
||||
@@ -10,10 +10,10 @@ Change-Id: I3c39e3e914a05903c140235702e0480d2d58a612
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/display/DisplayPowerController.java b/services/core/java/com/android/server/display/DisplayPowerController.java
|
||||
index 909d1d533a67..5b16e66fa56d 100644
|
||||
index cd2cca8860b0..c50d0dd77265 100644
|
||||
--- a/services/core/java/com/android/server/display/DisplayPowerController.java
|
||||
+++ b/services/core/java/com/android/server/display/DisplayPowerController.java
|
||||
@@ -2176,6 +2176,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
@@ -2210,6 +2210,9 @@ final class DisplayPowerController implements AutomaticBrightnessController.Call
|
||||
if (mProximitySensor != null) {
|
||||
mProximityThreshold = Math.min(mProximitySensor.getMaximumRange(),
|
||||
TYPICAL_PROXIMITY_THRESHOLD);
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a506043b070b18093cc1eaa94a1574f8303996bf Mon Sep 17 00:00:00 2001
|
||||
From ccd4514be6b981a828e8f87ca8a8927eb448327b Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 29 Sep 2020 22:40:10 +0200
|
||||
Subject: [PATCH 13/35] Fix brightness range not being complete on Samsung
|
||||
Subject: [PATCH 13/36] Fix brightness range not being complete on Samsung
|
||||
devices
|
||||
|
||||
On some devices, minimum brightness is 0, which totally messes with
|
||||
@@ -15,7 +15,7 @@ Change-Id: I4d97cbc32490949e83272b81ec6320a5483310b1
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/power/PowerManagerService.java b/services/core/java/com/android/server/power/PowerManagerService.java
|
||||
index 0901d2598e32..57e4ac6149d9 100644
|
||||
index e08fa53ba381..87805dd5ea72 100644
|
||||
--- a/services/core/java/com/android/server/power/PowerManagerService.java
|
||||
+++ b/services/core/java/com/android/server/power/PowerManagerService.java
|
||||
@@ -1147,9 +1147,11 @@ public final class PowerManagerService extends SystemService
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 49498f83f3be5f12c61f5ce3a462cd94896c5c71 Mon Sep 17 00:00:00 2001
|
||||
From f3a51f5d2f66f34e83db99606581e8975b1d0c14 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 25 Oct 2020 23:57:26 +0100
|
||||
Subject: [PATCH 14/35] Re-implement fnmatch-like behaviour for RRO java-side
|
||||
Subject: [PATCH 14/36] Re-implement fnmatch-like behaviour for RRO java-side
|
||||
|
||||
T: Also apply to FrameworkParsingPackageUtils (@PeterCxy)
|
||||
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
From 45bd2fbb05786524850cfe21585273ae4e0b705d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 6 Dec 2020 12:20:08 +0100
|
||||
Subject: [PATCH 15/35] Make rounded corners padding overridable with
|
||||
persist.sys.phh.rounded_corners_padding
|
||||
|
||||
Change-Id: I481c1c8849b2f22a7cdfb2896a6d3c2e7e3b44d9
|
||||
---
|
||||
.../src/com/android/systemui/qs/QuickStatusBarHeader.java | 7 +++++--
|
||||
.../systemui/statusbar/phone/KeyguardStatusBarView.java | 7 +++++--
|
||||
.../statusbar/phone/StatusBarContentInsetsProvider.kt | 5 ++++-
|
||||
3 files changed, 14 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
||||
index 24ab2729384a..b4ff80303d92 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/qs/QuickStatusBarHeader.java
|
||||
@@ -23,6 +23,7 @@ import android.content.res.Configuration;
|
||||
import android.content.res.Resources;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Rect;
|
||||
+import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.AlarmClock;
|
||||
import android.util.AttributeSet;
|
||||
@@ -275,8 +276,10 @@ public class QuickStatusBarHeader extends FrameLayout implements TunerService.Tu
|
||||
|
||||
mConfigShowBatteryEstimate = resources.getBoolean(R.bool.config_showBatteryEstimateQSBH);
|
||||
|
||||
- mRoundedCornerPadding = resources.getDimensionPixelSize(
|
||||
- R.dimen.rounded_corner_content_padding);
|
||||
+ mRoundedCornerPadding = SystemProperties.getInt("persist.sys.phh.rounded_corners_padding", -1);
|
||||
+ if(mRoundedCornerPadding == -1)
|
||||
+ mRoundedCornerPadding = resources.getDimensionPixelSize(
|
||||
+ R.dimen.rounded_corner_content_padding);
|
||||
|
||||
int statusBarHeight = SystemBarUtils.getStatusBarHeight(mContext);
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||
index 7b6fc66a208d..6589955c90ff 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/KeyguardStatusBarView.java
|
||||
@@ -29,6 +29,7 @@ import android.graphics.drawable.Drawable;
|
||||
import android.os.Trace;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.Pair;
|
||||
+import android.os.SystemProperties;
|
||||
import android.util.TypedValue;
|
||||
import android.view.DisplayCutout;
|
||||
import android.view.Gravity;
|
||||
@@ -195,8 +196,10 @@ public class KeyguardStatusBarView extends RelativeLayout {
|
||||
R.dimen.ongoing_appops_dot_min_padding);
|
||||
mCutoutSideNudge = getResources().getDimensionPixelSize(
|
||||
R.dimen.display_cutout_margin_consumption);
|
||||
- mRoundedCornerPadding = res.getDimensionPixelSize(
|
||||
- R.dimen.rounded_corner_content_padding);
|
||||
+ mRoundedCornerPadding = SystemProperties.getInt("persist.sys.phh.rounded_corners_padding", -1);
|
||||
+ if(mRoundedCornerPadding == -1)
|
||||
+ mRoundedCornerPadding = res.getDimensionPixelSize(
|
||||
+ R.dimen.rounded_corner_content_padding);
|
||||
}
|
||||
|
||||
private void updateVisibilities() {
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt
|
||||
index c850d4f9c56b..af12f592398b 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarContentInsetsProvider.kt
|
||||
@@ -39,6 +39,7 @@ import com.android.systemui.util.leak.RotationUtils.Rotation
|
||||
import com.android.systemui.util.leak.RotationUtils.getExactRotation
|
||||
import com.android.systemui.util.leak.RotationUtils.getResourcesForRotation
|
||||
import com.android.systemui.util.traceSection
|
||||
+import android.os.SystemProperties
|
||||
|
||||
import java.io.PrintWriter
|
||||
import java.lang.Math.max
|
||||
@@ -231,7 +232,9 @@ class StatusBarContentInsetsProvider @Inject constructor(
|
||||
): Rect {
|
||||
val currentRotation = getExactRotation(context)
|
||||
|
||||
- val roundedCornerPadding = rotatedResources
|
||||
+ var roundedCornerPadding = SystemProperties.getInt("persist.sys.phh.rounded_corners_padding", -1);
|
||||
+ if(roundedCornerPadding == -1)
|
||||
+ roundedCornerPadding = rotatedResources
|
||||
.getDimensionPixelSize(R.dimen.rounded_corner_content_padding)
|
||||
val minDotPadding = if (isPrivacyDotEnabled)
|
||||
rotatedResources.getDimensionPixelSize(R.dimen.ongoing_appops_dot_min_padding)
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 9f85fd8b971d048be3036b7939efd96939403626 Mon Sep 17 00:00:00 2001
|
||||
From bca6a22f8d31410f9eb3110e0b7449f26c0396a8 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 11 Dec 2020 14:41:09 +0100
|
||||
Subject: [PATCH 16/35] Remove useless notification about "console" service
|
||||
Subject: [PATCH 15/36] Remove useless notification about "console" service
|
||||
being running
|
||||
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Subject: [PATCH 16/35] Remove useless notification about "console" service
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
index 5d4dc39341a1..49ceb55a4f4a 100644
|
||||
index f0dac2607a4e..37797e35b769 100644
|
||||
--- a/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
+++ b/services/core/java/com/android/server/am/ActivityManagerService.java
|
||||
@@ -5175,7 +5175,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
@@ -5203,7 +5203,7 @@ public class ActivityManagerService extends IActivityManager.Stub
|
||||
}
|
||||
|
||||
private void showConsoleNotificationIfActive() {
|
||||
@@ -1,7 +1,7 @@
|
||||
From dda8543c697810aabf14444a1957f6eb3fc49855 Mon Sep 17 00:00:00 2001
|
||||
From 203b42247a0a9d1a4c32c37db757554b6da81b20 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 16 Dec 2020 21:24:12 +0800
|
||||
Subject: [PATCH 17/35] Revert "Remove unused SystemProperties.set"
|
||||
Subject: [PATCH 16/36] Revert "Remove unused SystemProperties.set"
|
||||
|
||||
This reverts commit debb4616ef67f9ed5054eca51ec58592358ff55f.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From da5a82ecf8a1b9f3973cb6c1eeb8da57f17dcde0 Mon Sep 17 00:00:00 2001
|
||||
From 62de6bcef085cc707c11854f65ccb3e41be8910d Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 16 Dec 2020 13:46:15 +0800
|
||||
Subject: [PATCH 18/35] TelephonyManager: bring back getNetworkClass()
|
||||
Subject: [PATCH 17/36] TelephonyManager: bring back getNetworkClass()
|
||||
|
||||
This partially reverts commit c058cac051ab083dc7fb7ea6aa85699110b2e9bf.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 71f470a72dd90ab43f69e657fd11d43cdac376c0 Mon Sep 17 00:00:00 2001
|
||||
From a3b1c9ce980751fd57029248cf07efffc19d883f Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 16 Dec 2020 21:26:45 +0800
|
||||
Subject: [PATCH 19/35] TelephonyManager: add API annotations for
|
||||
Subject: [PATCH 18/36] TelephonyManager: add API annotations for
|
||||
setTelephonyProperty
|
||||
|
||||
* This method was added back by reverting commit
|
||||
@@ -1,7 +1,7 @@
|
||||
From 7c0498878b8ec06404ea3d84bfbbab6121b86daa Mon Sep 17 00:00:00 2001
|
||||
From b74f87ee20c3d15b09b15ba8ac02f3c605ce1ab4 Mon Sep 17 00:00:00 2001
|
||||
From: Alberto Ponces <ponces26@gmail.com>
|
||||
Date: Tue, 2 Feb 2021 10:20:51 +0000
|
||||
Subject: [PATCH 20/35] Fix Wakelock issue
|
||||
Subject: [PATCH 19/36] Fix Wakelock issue
|
||||
|
||||
Prevent SystemUI crash due to "WakeLock under-locked Doze" (issue #12) by only releasing a wakelock that was not already released
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
From 592b55b29ed9a65fb60497f1267d983d04e695e3 Mon Sep 17 00:00:00 2001
|
||||
From 58abbc1f534bc80d37afa671a61e3ad19a89e270 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 20 Mar 2021 14:31:01 +0100
|
||||
Subject: [PATCH 21/35] Automatically detect pick up sensor, so that an overlay
|
||||
Subject: [PATCH 20/36] Automatically detect pick up sensor, so that an overlay
|
||||
is required for the sole purpose of enabling pulse doze on pick up sensor
|
||||
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
From 18501641658cb60092f113b48fa8273f6cfe6322 Mon Sep 17 00:00:00 2001
|
||||
From 41fd41f8738b4af84b3dbbd83db160a548ca9705 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 23 Mar 2021 19:43:26 +0100
|
||||
Subject: [PATCH 22/35] Catch broken mainBuiltInDisplayCutoutRectApproximation
|
||||
Subject: [PATCH 21/36] Catch broken mainBuiltInDisplayCutoutRectApproximation
|
||||
|
||||
Some devices (Redmi Note 9T) have:
|
||||
mainBuiltInDisplayCutoutRectApproximation = @android:mainBuiltInDisplayCutout
|
||||
@@ -1,7 +1,7 @@
|
||||
From 583cb3343b8223de9ee18982122dc3adcad4ace9 Mon Sep 17 00:00:00 2001
|
||||
From bd838504833d00d0ba166deadfb402e2adce7e6f Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 24 Mar 2018 08:01:48 +0100
|
||||
Subject: [PATCH 23/35] backlight: Fix backlight control on Galaxy S9(+)
|
||||
Subject: [PATCH 22/36] backlight: Fix backlight control on Galaxy S9(+)
|
||||
|
||||
Change-Id: I1fbbb47939c377597ef8ad6b88b2acea5f4acaa6
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 36ccebb5338549275d96a4369b50a74b8155934f Mon Sep 17 00:00:00 2001
|
||||
From 28f11c7bafdc29940b9bd3ca49f75303b7d97ae1 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 4 Sep 2021 08:26:30 +0000
|
||||
Subject: [PATCH 24/35] Revert "Switch long-press power behavior in AOSP."
|
||||
Subject: [PATCH 23/36] Revert "Switch long-press power behavior in AOSP."
|
||||
|
||||
This reverts commit 803c77a0a24624111944832098c6f65158051dc4.
|
||||
---
|
||||
@@ -9,10 +9,10 @@ This reverts commit 803c77a0a24624111944832098c6f65158051dc4.
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/core/res/res/values/config.xml b/core/res/res/values/config.xml
|
||||
index 987426f56463..a5e687da1155 100644
|
||||
index 91dd9179c329..96066bf60a5f 100644
|
||||
--- a/core/res/res/values/config.xml
|
||||
+++ b/core/res/res/values/config.xml
|
||||
@@ -1029,7 +1029,7 @@
|
||||
@@ -1083,7 +1083,7 @@
|
||||
5 - Go to assistant (Settings.Secure.ASSISTANT)
|
||||
6 - Toggle torch on / off (if screen is off)
|
||||
-->
|
||||
@@ -21,7 +21,7 @@ index 987426f56463..a5e687da1155 100644
|
||||
|
||||
<!-- The time in milliseconds after which a press on power button is considered "long". -->
|
||||
<integer name="config_longPressOnPowerDurationMs">500</integer>
|
||||
@@ -1061,7 +1061,7 @@
|
||||
@@ -1115,7 +1115,7 @@
|
||||
1 - Mute toggle
|
||||
2 - Global actions menu
|
||||
-->
|
||||
@@ -1,7 +1,7 @@
|
||||
From 84b149c85627215054dc93c97c792eaa37c2051c Mon Sep 17 00:00:00 2001
|
||||
From 948060e0d47c7324cfd4ac77910d9bcb9e03c0a5 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 27 Dec 2021 17:57:11 -0500
|
||||
Subject: [PATCH 25/35] Once we integrate Samsung Power hal in libpowermanager,
|
||||
Subject: [PATCH 24/36] Once we integrate Samsung Power hal in libpowermanager,
|
||||
libpowermanager and its deps require linking against
|
||||
vendor.samsung.hardware.miscpower@2.0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f497ca6442653b8eef253ad724bb6f90543141a9 Mon Sep 17 00:00:00 2001
|
||||
From 292bc6431c2a32d750a0a5e97a3833ff81f94399 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 2 Apr 2022 18:04:01 -0400
|
||||
Subject: [PATCH 26/35] Allow disabling of fingerprint cleanups, needed on some
|
||||
Subject: [PATCH 25/36] Allow disabling of fingerprint cleanups, needed on some
|
||||
Realme devices that cant enumerate
|
||||
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
From 63c5c95736d70ad64c144b731a6fb8b83c8e6ee3 Mon Sep 17 00:00:00 2001
|
||||
From 766c755564a764bb9934a94addc0e61156fe38f4 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 17 Dec 2021 17:16:14 -0500
|
||||
Subject: [PATCH 27/35] Reduce the size of udfps enroll progress bar. Some
|
||||
Subject: [PATCH 26/36] Reduce the size of udfps enroll progress bar. Some
|
||||
devices have their udfps pretty low, and the progress bar would make the icon
|
||||
at the wrong place
|
||||
|
||||
@@ -11,10 +11,10 @@ Change-Id: I1609ad9ca316293dcaaf07f7e681d11aadfcd29c
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||
index 48c35ae8789d..d3e22e610fc7 100644
|
||||
index 374cff002d29..6bfbe512c72c 100644
|
||||
--- a/packages/SystemUI/res/values/config.xml
|
||||
+++ b/packages/SystemUI/res/values/config.xml
|
||||
@@ -580,7 +580,7 @@
|
||||
@@ -585,7 +585,7 @@
|
||||
|
||||
<!-- The radius of the enrollment progress bar, in dp -->
|
||||
<integer name="config_udfpsEnrollProgressBar" translatable="false">
|
||||
@@ -1,7 +1,7 @@
|
||||
From 5ceaeac2773c51308899e7e9aac4bfed4180082c Mon Sep 17 00:00:00 2001
|
||||
From 0808d5fd7f8b8e2d1af3d9048e67fb5018398216 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 20 Dec 2021 15:01:41 -0500
|
||||
Subject: [PATCH 28/35] Dynamically resize boot animation to match screen size
|
||||
Subject: [PATCH 27/36] Dynamically resize boot animation to match screen size
|
||||
|
||||
Change-Id: I54e49fc6b8c670103852e212d1416e27ff976205
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Change-Id: I54e49fc6b8c670103852e212d1416e27ff976205
|
||||
1 file changed, 20 insertions(+)
|
||||
|
||||
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
|
||||
index 53fe0ba84387..73c2276a032f 100644
|
||||
index 9284ed8e11ca..f90ae0ef7b89 100644
|
||||
--- a/cmds/bootanimation/BootAnimation.cpp
|
||||
+++ b/cmds/bootanimation/BootAnimation.cpp
|
||||
@@ -600,6 +600,26 @@ status_t BootAnimation::readyToRun() {
|
||||
@@ -601,6 +601,26 @@ status_t BootAnimation::readyToRun() {
|
||||
mFlingerSurface = s;
|
||||
mTargetInset = -1;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b307f9724346245c3c7463d3e4bca613db68acfa Mon Sep 17 00:00:00 2001
|
||||
From 7630da97cd575007923bc90544bebfdada9aa442 Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Sat, 15 Oct 2022 09:33:56 +0000
|
||||
Subject: [PATCH 29/35] Revert "Remove more FDE methods from StorageManager"
|
||||
Subject: [PATCH 28/36] Revert "Remove more FDE methods from StorageManager"
|
||||
|
||||
This reverts commit bd13f84152449a3ead6fa8604fd31f48c0224676.
|
||||
---
|
||||
@@ -10,7 +10,7 @@ This reverts commit bd13f84152449a3ead6fa8604fd31f48c0224676.
|
||||
2 files changed, 65 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/core/java/android/os/storage/StorageManager.java b/core/java/android/os/storage/StorageManager.java
|
||||
index 497bfa6380bc..646a7095c1b3 100644
|
||||
index d9604b3f0145..603612e82007 100644
|
||||
--- a/core/java/android/os/storage/StorageManager.java
|
||||
+++ b/core/java/android/os/storage/StorageManager.java
|
||||
@@ -1681,13 +1681,18 @@ public class StorageManager {
|
||||
@@ -104,10 +104,10 @@ index 497bfa6380bc..646a7095c1b3 100644
|
||||
public static boolean isFileEncryptedEmulatedOnly() {
|
||||
return SystemProperties.getBoolean(StorageManager.PROP_EMULATE_FBE, false);
|
||||
diff --git a/core/java/com/android/internal/os/RoSystemProperties.java b/core/java/com/android/internal/os/RoSystemProperties.java
|
||||
index 98d81c9598b8..8b659f927633 100644
|
||||
index cccd80e82420..adb5c107bc62 100644
|
||||
--- a/core/java/com/android/internal/os/RoSystemProperties.java
|
||||
+++ b/core/java/com/android/internal/os/RoSystemProperties.java
|
||||
@@ -60,10 +60,14 @@ public class RoSystemProperties {
|
||||
@@ -62,10 +62,14 @@ public class RoSystemProperties {
|
||||
public static final CryptoProperties.type_values CRYPTO_TYPE =
|
||||
CryptoProperties.type().orElse(CryptoProperties.type_values.NONE);
|
||||
// These are pseudo-properties
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4af95a9f96b824f61a0710a8132e007247fa5094 Mon Sep 17 00:00:00 2001
|
||||
From 21cc4681dddd9b26b9db885fd7074a0f6a225a7a Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 3 Dec 2022 17:13:24 -0500
|
||||
Subject: [PATCH 30/35] Set old fingerprint sensors to security "strong"
|
||||
Subject: [PATCH 29/36] Set old fingerprint sensors to security "strong"
|
||||
|
||||
This allows removing config_biometric_sensors from overlays, which led
|
||||
to Pixels not booting, because they are using AIDL biometric sensor, and
|
||||
@@ -1,29 +1,29 @@
|
||||
From 22ad6e21e9330b89e7af8ac4cbd44f6627c688a2 Mon Sep 17 00:00:00 2001
|
||||
From 2fd62edb166b5a5392ae43b47602888427721d8a Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 14 Dec 2022 17:21:00 -0500
|
||||
Subject: [PATCH 31/35] Call Samsung's ISehSysInputDev to report screen state
|
||||
Subject: [PATCH 30/36] Call Samsung's ISehSysInputDev to report screen state
|
||||
to touchscreen driver
|
||||
|
||||
This fixes touchscreen not waking up on Galaxy F23
|
||||
---
|
||||
services/core/Android.bp | 1 +
|
||||
.../server/display/LocalDisplayAdapter.java | 31 +++++++++++++++++++
|
||||
2 files changed, 32 insertions(+)
|
||||
.../server/display/LocalDisplayAdapter.java | 32 +++++++++++++++++++
|
||||
2 files changed, 33 insertions(+)
|
||||
|
||||
diff --git a/services/core/Android.bp b/services/core/Android.bp
|
||||
index f6ba92a94cde..39161ba0df68 100644
|
||||
index faf7da35813a..ebd4373e25c1 100644
|
||||
--- a/services/core/Android.bp
|
||||
+++ b/services/core/Android.bp
|
||||
@@ -175,6 +175,7 @@ java_library_static {
|
||||
@@ -174,6 +174,7 @@ java_library_static {
|
||||
"motorola.hardware.health-V1.0-java",
|
||||
"overlayable_policy_aidl-java",
|
||||
"SurfaceFlingerProperties",
|
||||
"com.android.sysprop.watchdog",
|
||||
+ "vendor.samsung.hardware.sysinput-V1.2-java", // HIDL
|
||||
],
|
||||
javac_shard_size: 50,
|
||||
}
|
||||
diff --git a/services/core/java/com/android/server/display/LocalDisplayAdapter.java b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
|
||||
index efb2cb7a3283..2807f3e7fbf4 100644
|
||||
index 58a182a61e44..84c3982458ff 100644
|
||||
--- a/services/core/java/com/android/server/display/LocalDisplayAdapter.java
|
||||
+++ b/services/core/java/com/android/server/display/LocalDisplayAdapter.java
|
||||
@@ -33,6 +33,7 @@ import android.os.Trace;
|
||||
@@ -43,7 +43,7 @@ index efb2cb7a3283..2807f3e7fbf4 100644
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
@@ -226,6 +229,8 @@ final class LocalDisplayAdapter extends DisplayAdapter {
|
||||
@@ -228,6 +231,8 @@ final class LocalDisplayAdapter extends DisplayAdapter {
|
||||
|
||||
private DisplayEventReceiver.FrameRateOverride[] mFrameRateOverrides =
|
||||
new DisplayEventReceiver.FrameRateOverride[0];
|
||||
@@ -52,7 +52,7 @@ index efb2cb7a3283..2807f3e7fbf4 100644
|
||||
|
||||
LocalDisplayDevice(IBinder displayToken, long physicalDisplayId,
|
||||
SurfaceControl.StaticDisplayInfo staticDisplayInfo,
|
||||
@@ -812,16 +817,42 @@ final class LocalDisplayAdapter extends DisplayAdapter {
|
||||
@@ -815,17 +820,44 @@ final class LocalDisplayAdapter extends DisplayAdapter {
|
||||
}
|
||||
mSidekickActive = false;
|
||||
}
|
||||
@@ -91,6 +91,8 @@ index efb2cb7a3283..2807f3e7fbf4 100644
|
||||
+ Log.d("PHH", "Failed settings tsp enable", t);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
setCommittedState(state);
|
||||
+
|
||||
// If we're entering a suspended (but not OFF) power state and we
|
||||
// have a sidekick available, tell it now that it can take control.
|
||||
@@ -1,7 +1,7 @@
|
||||
From efbde1bfc3f4566490494e634814cf4b66058e41 Mon Sep 17 00:00:00 2001
|
||||
From 8e19c87d70cac69499e6a2d5f476b7a2a563a69a Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 15 Dec 2022 15:54:50 -0500
|
||||
Subject: [PATCH 32/35] Fixup of c50777 -- original commit only cares about R
|
||||
Subject: [PATCH 31/36] Fixup of c50777 -- original commit only cares about R
|
||||
vendors, but not about older ones. Apply that on older ones as well
|
||||
|
||||
---
|
||||
@@ -1,7 +1,7 @@
|
||||
From e4930b4d867d872a0e4c1a28b274dca7e2d84d5e Mon Sep 17 00:00:00 2001
|
||||
From 2791003adb0d155a17fa663fb58265a86b653ab8 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 18 Dec 2022 18:20:40 -0500
|
||||
Subject: [PATCH 33/35] FOD support for Asus ZF8 and Samsung devices
|
||||
Subject: [PATCH 32/36] FOD support for Asus ZF8 and Samsung devices
|
||||
|
||||
Thanks Asus for providing a free device to make this support
|
||||
And thanks @davigamer987 for donating enough to get a Samsung FOD device
|
||||
@@ -18,7 +18,7 @@ Change-Id: Ib328f39217c3f9b42e13e186496b3f6391643637
|
||||
6 files changed, 388 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
|
||||
index 2438af19317c..60baf02c4aca 100644
|
||||
index b4027197344d..0637dd4b4471 100644
|
||||
--- a/packages/SystemUI/Android.bp
|
||||
+++ b/packages/SystemUI/Android.bp
|
||||
@@ -178,6 +178,7 @@ android_library {
|
||||
@@ -30,10 +30,10 @@ index 2438af19317c..60baf02c4aca 100644
|
||||
manifest: "AndroidManifest.xml",
|
||||
additional_manifests: ["LineageManifest.xml"],
|
||||
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
|
||||
index d3e22e610fc7..ea4075b75e00 100644
|
||||
index 6bfbe512c72c..4c0db53799d4 100644
|
||||
--- a/packages/SystemUI/res/values/config.xml
|
||||
+++ b/packages/SystemUI/res/values/config.xml
|
||||
@@ -580,7 +580,7 @@
|
||||
@@ -585,7 +585,7 @@
|
||||
|
||||
<!-- The radius of the enrollment progress bar, in dp -->
|
||||
<integer name="config_udfpsEnrollProgressBar" translatable="false">
|
||||
@@ -43,10 +43,10 @@ index d3e22e610fc7..ea4075b75e00 100644
|
||||
|
||||
<!-- The time (in ms) needed to trigger the lock icon view's long-press affordance -->
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
|
||||
index 8db4927ee059..b14e2ebb56ca 100644
|
||||
index b6b5d26b398c..88c2976d81ab 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsControllerOverlay.kt
|
||||
@@ -118,7 +118,9 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
|
||||
@@ -120,7 +120,9 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
|
||||
gravity = android.view.Gravity.TOP or android.view.Gravity.LEFT
|
||||
layoutInDisplayCutoutMode = WindowManager.LayoutParams.LAYOUT_IN_DISPLAY_CUTOUT_MODE_ALWAYS
|
||||
flags = (Utils.FINGERPRINT_OVERLAY_LAYOUT_PARAM_FLAGS or
|
||||
@@ -57,7 +57,7 @@ index 8db4927ee059..b14e2ebb56ca 100644
|
||||
privateFlags = WindowManager.LayoutParams.PRIVATE_FLAG_TRUSTED_OVERLAY
|
||||
// Avoid announcing window title.
|
||||
accessibilityTitle = " "
|
||||
@@ -187,6 +189,9 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
|
||||
@@ -189,6 +191,9 @@ class UdfpsControllerOverlay @JvmOverloads constructor(
|
||||
windowManager.addView(this, coreLayoutParams.updateDimensions(animation))
|
||||
sensorRect = sensorBounds
|
||||
touchExplorationEnabled = accessibilityManager.isTouchExplorationEnabled
|
||||
@@ -68,7 +68,7 @@ index 8db4927ee059..b14e2ebb56ca 100644
|
||||
if (accessibilityManager.isTouchExplorationEnabled) {
|
||||
setOnHoverListener { v, event -> onTouch(v, event, true) }
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
|
||||
index 4a8877edfa53..c8c17b56cd92 100644
|
||||
index e61c614f0292..cdaad81b9222 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
|
||||
@@ -19,18 +19,27 @@ import android.content.Context
|
||||
@@ -163,7 +163,7 @@ index 4a8877edfa53..c8c17b56cd92 100644
|
||||
/** Debug message. */
|
||||
var debugMessage: String? = null
|
||||
set(value) {
|
||||
@@ -150,15 +209,94 @@ class UdfpsView(
|
||||
@@ -146,15 +205,94 @@ class UdfpsView(
|
||||
!(animationViewController?.shouldPauseAuth() ?: false)
|
||||
}
|
||||
|
||||
@@ -259,12 +259,12 @@ index 4a8877edfa53..c8c17b56cd92 100644
|
||||
}
|
||||
}
|
||||
diff --git a/services/core/Android.bp b/services/core/Android.bp
|
||||
index 39161ba0df68..e9332f19fb3f 100644
|
||||
index ebd4373e25c1..c4c8ee1f565a 100644
|
||||
--- a/services/core/Android.bp
|
||||
+++ b/services/core/Android.bp
|
||||
@@ -175,7 +175,12 @@ java_library_static {
|
||||
@@ -174,7 +174,12 @@ java_library_static {
|
||||
"motorola.hardware.health-V1.0-java",
|
||||
"overlayable_policy_aidl-java",
|
||||
"SurfaceFlingerProperties",
|
||||
"com.android.sysprop.watchdog",
|
||||
- "vendor.samsung.hardware.sysinput-V1.2-java", // HIDL
|
||||
+ // HIDL
|
||||
@@ -1,7 +1,7 @@
|
||||
From 628db9ac97006a1dbb5e216fcc0b374ddd4bb4bd Mon Sep 17 00:00:00 2001
|
||||
From a1ea8d1d2ccfbd33eba3c05427aad5a9032b38c2 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 3 Jan 2023 17:59:00 -0500
|
||||
Subject: [PATCH 34/35] Always add HIDL fingerprint config (Galaxy A53 is
|
||||
Subject: [PATCH 33/36] Always add HIDL fingerprint config (Galaxy A53 is
|
||||
missing it on A12 vendor) -- but first enumerate AIDL
|
||||
|
||||
---
|
||||
@@ -28,10 +28,10 @@ index 063e3599d6cd..7d6f9a12057f 100644
|
||||
}
|
||||
hidlConfigs = new SensorConfig[configStrings.length];
|
||||
diff --git a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
|
||||
index 94b67cedf86c..9468f5f91c24 100644
|
||||
index d55dd8ab85f8..7d537425e6d2 100644
|
||||
--- a/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
|
||||
+++ b/services/core/java/com/android/server/biometrics/sensors/fingerprint/FingerprintService.java
|
||||
@@ -905,8 +905,9 @@ public class FingerprintService extends SystemService {
|
||||
@@ -899,8 +899,9 @@ public class FingerprintService extends SystemService {
|
||||
final Handler handler = new Handler(thread.getLooper());
|
||||
|
||||
handler.post(() -> {
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1688bfdd53c2d2967264f4a1fba92a8dbc7e1b8e Mon Sep 17 00:00:00 2001
|
||||
From 21d904e94229f5854e41d3b4a55960422a956347 Mon Sep 17 00:00:00 2001
|
||||
From: ItsLynix <71310187+ItsLynix@users.noreply.github.com>
|
||||
Date: Sat, 28 Jan 2023 10:25:16 +0100
|
||||
Subject: [PATCH 35/35] SystemUI: Implement alternate brightness path for FOD
|
||||
Subject: [PATCH 34/36] SystemUI: Implement alternate brightness path for FOD
|
||||
|
||||
Change-Id: I0d9d7352c507529a3aa66e7a7d78220887a5a532
|
||||
---
|
||||
@@ -9,10 +9,10 @@ Change-Id: I0d9d7352c507529a3aa66e7a7d78220887a5a532
|
||||
1 file changed, 13 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
|
||||
index c8c17b56cd92..b3df894fe625 100644
|
||||
index cdaad81b9222..6cc9ab3da570 100644
|
||||
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
|
||||
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt
|
||||
@@ -232,8 +232,19 @@ Log.d("PHH", "Surface destroyed!")
|
||||
@@ -228,8 +228,19 @@ Log.d("PHH", "Surface destroyed!")
|
||||
mySurfaceView.setVisibility(VISIBLE)
|
||||
Log.d("PHH", "setting surface visible!")
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
From 2e71720d383555e8ae99376fe279c3473971814d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 10 May 2023 11:28:27 -0400
|
||||
Subject: [PATCH 35/36] bootanimation: Fix bootanimation when using mask+shine
|
||||
rather than animation
|
||||
|
||||
This was broken by the commit that automatically resizes animations
|
||||
|
||||
Fixes: e27e0e177fe88584a280e0f7f624c249623efea1
|
||||
---
|
||||
cmds/bootanimation/BootAnimation.cpp | 38 +++++++++++++++-------------
|
||||
1 file changed, 20 insertions(+), 18 deletions(-)
|
||||
|
||||
diff --git a/cmds/bootanimation/BootAnimation.cpp b/cmds/bootanimation/BootAnimation.cpp
|
||||
index f90ae0ef7b89..99eab66c9d2e 100644
|
||||
--- a/cmds/bootanimation/BootAnimation.cpp
|
||||
+++ b/cmds/bootanimation/BootAnimation.cpp
|
||||
@@ -601,24 +601,26 @@ status_t BootAnimation::readyToRun() {
|
||||
mFlingerSurface = s;
|
||||
mTargetInset = -1;
|
||||
|
||||
- SLOGE("Got screen size %d, animation size %d", mWidth, mAnimation->width);
|
||||
- int origWidth = mAnimation->width;
|
||||
- if ( mAnimation->width*2 < mWidth ) {
|
||||
- SLOGE("Making animation bigger");
|
||||
- mAnimation->width *= 2;
|
||||
- mAnimation->height *= 2;
|
||||
- } else if ( mWidth < mAnimation->width ) {
|
||||
- SLOGE("Making animation smaller");
|
||||
- mAnimation->width /= 2;
|
||||
- mAnimation->height /= 2;
|
||||
- }
|
||||
- for (Animation::Part& part : mAnimation->parts) {
|
||||
- for(auto& frame: part.frames) {
|
||||
- if(frame.trimWidth == origWidth && frame.trimX == 0 && frame.trimY == 0) {
|
||||
- frame.trimWidth = mAnimation->width;
|
||||
- frame.trimHeight = mAnimation->height;
|
||||
- }
|
||||
- }
|
||||
+ if ( mAnimation != nullptr ) {
|
||||
+ SLOGE("Got screen size %d, animation size %d", mWidth, mAnimation->width);
|
||||
+ int origWidth = mAnimation->width;
|
||||
+ if ( mAnimation->width*2 < mWidth ) {
|
||||
+ SLOGE("Making animation bigger");
|
||||
+ mAnimation->width *= 2;
|
||||
+ mAnimation->height *= 2;
|
||||
+ } else if ( mWidth < mAnimation->width ) {
|
||||
+ SLOGE("Making animation smaller");
|
||||
+ mAnimation->width /= 2;
|
||||
+ mAnimation->height /= 2;
|
||||
+ }
|
||||
+ for (Animation::Part& part : mAnimation->parts) {
|
||||
+ for(auto& frame: part.frames) {
|
||||
+ if(frame.trimWidth == origWidth && frame.trimX == 0 && frame.trimY == 0) {
|
||||
+ frame.trimWidth = mAnimation->width;
|
||||
+ frame.trimHeight = mAnimation->height;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
}
|
||||
|
||||
// Rotate the boot animation according to the value specified in the sysprop
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
From 58f6ed39c0f2bc90db6920e025ae59b04e0fa9e3 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 2 Jun 2023 19:19:31 -0400
|
||||
Subject: [PATCH 36/36] Try catch around constrainNitsAndBacklightArrays, and
|
||||
falls back to dumb curve. It crashes on Xperia 1 IV.
|
||||
|
||||
---
|
||||
.../server/display/DisplayDeviceConfig.java | 58 ++++++++++---------
|
||||
1 file changed, 32 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/services/core/java/com/android/server/display/DisplayDeviceConfig.java b/services/core/java/com/android/server/display/DisplayDeviceConfig.java
|
||||
index 851162968dbe..135ae69a30cf 100644
|
||||
--- a/services/core/java/com/android/server/display/DisplayDeviceConfig.java
|
||||
+++ b/services/core/java/com/android/server/display/DisplayDeviceConfig.java
|
||||
@@ -1708,37 +1708,43 @@ public class DisplayDeviceConfig {
|
||||
return;
|
||||
}
|
||||
|
||||
- // Use the (preferred) display device config mapping
|
||||
- final List<Point> points = map.getPoint();
|
||||
- final int size = points.size();
|
||||
-
|
||||
- float[] nits = new float[size];
|
||||
- float[] backlight = new float[size];
|
||||
+ try {
|
||||
+ // Use the (preferred) display device config mapping
|
||||
+ final List<Point> points = map.getPoint();
|
||||
+ final int size = points.size();
|
||||
|
||||
- mInterpolationType = convertInterpolationType(map.getInterpolation());
|
||||
- int i = 0;
|
||||
- for (Point point : points) {
|
||||
- nits[i] = point.getNits().floatValue();
|
||||
- backlight[i] = point.getValue().floatValue();
|
||||
- if (i > 0) {
|
||||
- if (nits[i] < nits[i - 1]) {
|
||||
- Slog.e(TAG, "screenBrightnessMap must be non-decreasing, ignoring rest "
|
||||
- + " of configuration. Nits: " + nits[i] + " < " + nits[i - 1]);
|
||||
- return;
|
||||
- }
|
||||
+ float[] nits = new float[size];
|
||||
+ float[] backlight = new float[size];
|
||||
|
||||
- if (backlight[i] < backlight[i - 1]) {
|
||||
- Slog.e(TAG, "screenBrightnessMap must be non-decreasing, ignoring rest "
|
||||
- + " of configuration. Value: " + backlight[i] + " < "
|
||||
- + backlight[i - 1]);
|
||||
- return;
|
||||
+ mInterpolationType = convertInterpolationType(map.getInterpolation());
|
||||
+ int i = 0;
|
||||
+ for (Point point : points) {
|
||||
+ nits[i] = point.getNits().floatValue();
|
||||
+ backlight[i] = point.getValue().floatValue();
|
||||
+ if (i > 0) {
|
||||
+ if (nits[i] < nits[i - 1]) {
|
||||
+ Slog.e(TAG, "screenBrightnessMap must be non-decreasing, ignoring rest "
|
||||
+ + " of configuration. Nits: " + nits[i] + " < " + nits[i - 1]);
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ if (backlight[i] < backlight[i - 1]) {
|
||||
+ Slog.e(TAG, "screenBrightnessMap must be non-decreasing, ignoring rest "
|
||||
+ + " of configuration. Value: " + backlight[i] + " < "
|
||||
+ + backlight[i - 1]);
|
||||
+ return;
|
||||
+ }
|
||||
}
|
||||
+ ++i;
|
||||
}
|
||||
- ++i;
|
||||
+ mRawNits = nits;
|
||||
+ mRawBacklight = backlight;
|
||||
+ constrainNitsAndBacklightArrays();
|
||||
+ } catch(Throwable t) {
|
||||
+ mRawNits = null;
|
||||
+ mRawBacklight = null;
|
||||
+ setSimpleMappingStrategyValues();
|
||||
}
|
||||
- mRawNits = nits;
|
||||
- mRawBacklight = backlight;
|
||||
- constrainNitsAndBacklightArrays();
|
||||
}
|
||||
|
||||
private Spline loadSdrHdrRatioMap(HighBrightnessMode hbmConfig) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 30f63b6a34c43294b71b06066c7592c640485d6c Mon Sep 17 00:00:00 2001
|
||||
From c27f6299504342badced594ae52d0f77eda447eb Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 14 Aug 2019 23:37:10 +0200
|
||||
Subject: [PATCH 01/11] On Samsung, we need to send a hack-message to HAL to
|
||||
Subject: [PATCH 01/10] On Samsung, we need to send a hack-message to HAL to
|
||||
get all Sensors
|
||||
|
||||
Change-Id: Id6a1fa48340de61c418493668e9abd22c2599376
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From c95bc2642cb6dcb675e09035e3b8801bc7912d67 Mon Sep 17 00:00:00 2001
|
||||
From 2a865cd297d8f99612f5fcd61dbd0eecc0536aa5 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 22 Oct 2020 23:22:46 +0200
|
||||
Subject: [PATCH 02/11] Matching an input with a display uses uniqueId
|
||||
Subject: [PATCH 02/10] Matching an input with a display uses uniqueId
|
||||
|
||||
Not all devices have a `location`, notably bluetooth devices.
|
||||
However, we might still want to associate them with a screen,
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 87f585a3bfc96c95c585021fcb6ed06fbc18cfee Mon Sep 17 00:00:00 2001
|
||||
From 36abbaa8184bf5550b609362932a653eb17dda9e Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 5 Jan 2021 23:44:00 +0100
|
||||
Subject: [PATCH 03/11] unshared_oob didn't exist in O/P, so detect its
|
||||
Subject: [PATCH 03/10] unshared_oob didn't exist in O/P, so detect its
|
||||
supported based on vndk version
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 203e9fa87950fae83214c7a5762e217e1b56979f Mon Sep 17 00:00:00 2001
|
||||
From ca1a996ac9076302682afe4138ccf907675c664e Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 31 Mar 2021 23:36:03 +0200
|
||||
Subject: [PATCH 04/11] Remove Samsung system permission on sensors
|
||||
Subject: [PATCH 04/10] Remove Samsung system permission on sensors
|
||||
|
||||
---
|
||||
libs/sensor/Sensor.cpp | 1 +
|
||||
@@ -9,7 +9,7 @@ Subject: [PATCH 04/11] Remove Samsung system permission on sensors
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/libs/sensor/Sensor.cpp b/libs/sensor/Sensor.cpp
|
||||
index ec0ced8663..19da9d70ba 100644
|
||||
index b865c4d5d6..56dc219f33 100644
|
||||
--- a/libs/sensor/Sensor.cpp
|
||||
+++ b/libs/sensor/Sensor.cpp
|
||||
@@ -433,6 +433,7 @@ const String8& Sensor::getStringType() const {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 9aec0884fff527a97f08a930112e0e9ca5324161 Mon Sep 17 00:00:00 2001
|
||||
From 8393f064ff4cea6faffb3b4c09197b84d9e4cdb6 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 12 Dec 2021 08:45:36 -0500
|
||||
Subject: [PATCH 05/11] Mark accelerometer input as sensor exclusively if there
|
||||
Subject: [PATCH 05/10] Mark accelerometer input as sensor exclusively if there
|
||||
are ABS axis
|
||||
|
||||
The reason this is needed is that on -fucked up- Xiami Mi A2 Lite and
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 8f8b2ca55f0b030692aba1db4a36c98ecce03a62 Mon Sep 17 00:00:00 2001
|
||||
From 4eca6bb36b071de20f2defe141ff7a880596114c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Mon, 27 Dec 2021 18:00:43 -0500
|
||||
Subject: [PATCH 06/11] powermanager: Add support Samsung miscpower HAL
|
||||
Subject: [PATCH 06/10] powermanager: Add support Samsung miscpower HAL
|
||||
|
||||
Several various configurations need to be supported:
|
||||
- Android Pie vendors have a android.hardware.power HIDL default + "miscpower"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ed7cb34a01b44348feb2ff81d7ffb6fdf8faa5ce Mon Sep 17 00:00:00 2001
|
||||
From 430e53f071a6cbb8d1b2d700b081f5fbedf543ff Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 12 Jan 2022 04:07:34 -0500
|
||||
Subject: [PATCH 07/11] Fix loading power hidl v1.0
|
||||
Subject: [PATCH 07/10] Fix loading power hidl v1.0
|
||||
|
||||
Change-Id: Ife20a98d2a11c79c7b42f359f30c28e2dede1f25
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 48575bfacb379944f3796958287f2ab1410d4cd1 Mon Sep 17 00:00:00 2001
|
||||
From b6a029560d93ce3e5535ab97e3cfbc7d1ca0f02c Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 25 Mar 2022 05:37:56 -0400
|
||||
Subject: [PATCH 08/11] MIUI13 devices hide their vibrator HAL behind
|
||||
Subject: [PATCH 08/10] MIUI13 devices hide their vibrator HAL behind
|
||||
non-default name: "vibratorfeature"
|
||||
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From a3c1b022989d468e32821ed9933857de7c0c1bea Mon Sep 17 00:00:00 2001
|
||||
From 1093dcac13fc8c18e24e8b6394dc2beee6b5d309 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 18 Dec 2022 18:17:30 -0500
|
||||
Subject: [PATCH 09/11] FOD support for Samsung and Asus
|
||||
Subject: [PATCH 09/10] FOD support for Samsung and Asus
|
||||
|
||||
---
|
||||
libs/gui/BLASTBufferQueue.cpp | 20 ++++++++++++++--
|
||||
@@ -20,7 +20,7 @@ Subject: [PATCH 09/11] FOD support for Samsung and Asus
|
||||
13 files changed, 77 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
|
||||
index 24a5295112..de01525001 100644
|
||||
index b8ea0808ab..f6b6752b01 100644
|
||||
--- a/libs/gui/BLASTBufferQueue.cpp
|
||||
+++ b/libs/gui/BLASTBufferQueue.cpp
|
||||
@@ -33,11 +33,20 @@
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b46f222a169c4d27f9b5470a252ccecc5d63a2d2 Mon Sep 17 00:00:00 2001
|
||||
From 85eaba4f3b4e0c85411158807b677f135fd4331f Mon Sep 17 00:00:00 2001
|
||||
From: Andy CrossGate Yan <GeForce8800Ultra@gmail.com>
|
||||
Date: Tue, 18 Apr 2023 23:48:15 +0000
|
||||
Subject: [PATCH 11/11] Fix light sensor crash on Xiaomi 13
|
||||
Subject: [PATCH 10/10] Fix light sensor crash on Xiaomi 13
|
||||
|
||||
SensorService expects a scalar, but Xiaomi HAL returns a pose6DOF vector encapsulation
|
||||
Thanks @phhusson for the analysis
|
||||
@@ -1,106 +0,0 @@
|
||||
From 70bff60fcd94ac2e4585e4ac69b301ee05d3d00d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 20 Oct 2021 09:39:47 -0400
|
||||
Subject: [PATCH 10/11] Try to fallback mCallingSid to getpidcon
|
||||
|
||||
This is needed because old vendors (before April 2019 ~) don't support
|
||||
reporting SELinux context of the caller.
|
||||
This doesn't work for all processes, because it requires some additional
|
||||
SELinux permissions. At the moment, only keystore2 requires this
|
||||
|
||||
As a rule of thumb, assume only 3.18 kernel are old enough to have that
|
||||
issue.
|
||||
That's not strictly accurate, there have also been 4.4 kernels with that
|
||||
issue (maybe even 4.9?). But let's assume that devices with >=4.4
|
||||
kernels have got an upgrade after April 2019
|
||||
|
||||
Change-Id: I3b6c4dac9d0e20a3d66f931b283e3a535ab499cd
|
||||
---
|
||||
libs/binder/IPCThreadState.cpp | 48 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 48 insertions(+)
|
||||
|
||||
diff --git a/libs/binder/IPCThreadState.cpp b/libs/binder/IPCThreadState.cpp
|
||||
index 3c97dcab93..b15ac9bcd9 100644
|
||||
--- a/libs/binder/IPCThreadState.cpp
|
||||
+++ b/libs/binder/IPCThreadState.cpp
|
||||
@@ -35,8 +35,10 @@
|
||||
#include <sched.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
+#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/resource.h>
|
||||
+#include <sys/utsname.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#include "Static.h"
|
||||
@@ -1144,6 +1146,25 @@ void IPCThreadState::setTheContextObject(const sp<BBinder>& obj)
|
||||
the_context_object = obj;
|
||||
}
|
||||
|
||||
+static bool _supportsSid;
|
||||
+static bool _supportsSid_done;
|
||||
+static void supportsSid() {
|
||||
+ if (_supportsSid_done) return;
|
||||
+ //Put a threshold at >= 4.0
|
||||
+ struct utsname buf;
|
||||
+ uname(&buf);
|
||||
+ const char *where = buf.release;
|
||||
+ int a = strtol(where, NULL, 10);
|
||||
+ ALOGE("Got kernel major version %d", a);
|
||||
+ if(a <= 3) {
|
||||
+ _supportsSid = false;
|
||||
+ } else {
|
||||
+ _supportsSid = true;
|
||||
+ }
|
||||
+ _supportsSid_done = true;
|
||||
+
|
||||
+}
|
||||
+
|
||||
status_t IPCThreadState::executeCommand(int32_t cmd)
|
||||
{
|
||||
BBinder* obj;
|
||||
@@ -1269,6 +1290,32 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
|
||||
mCallingUid = tr.sender_euid;
|
||||
mLastTransactionBinderFlags = tr.flags;
|
||||
|
||||
+ if (mCallingSid != nullptr) {
|
||||
+ _supportsSid = true;
|
||||
+ _supportsSid_done = true;
|
||||
+ }
|
||||
+ supportsSid();
|
||||
+
|
||||
+ // This is recoding libselinux's getpidcon()
|
||||
+ // We are in a NDK lib, so we need to keep changes to a minimum
|
||||
+ bool allocatedSid = false;
|
||||
+ if (!_supportsSid && mCallingSid == nullptr && mCallingPid != 0) {
|
||||
+ char buf[4096];
|
||||
+ char *path = NULL;
|
||||
+ (void)asprintf(&path, "/proc/%d/attr/current", mCallingPid);
|
||||
+ int fd = open(path, O_RDONLY | O_CLOEXEC);
|
||||
+ if (fd != -1) {
|
||||
+ int readRet = read(fd, buf, sizeof(buf)-1);
|
||||
+ if(readRet != -1) {
|
||||
+ buf[readRet] = 0;
|
||||
+ mCallingSid = strdup(buf);
|
||||
+ allocatedSid = true;
|
||||
+ }
|
||||
+ close(fd);
|
||||
+ }
|
||||
+ free(path);
|
||||
+ }
|
||||
+
|
||||
// ALOGI(">>>> TRANSACT from pid %d sid %s uid %d\n", mCallingPid,
|
||||
// (mCallingSid ? mCallingSid : "<N/A>"), mCallingUid);
|
||||
|
||||
@@ -1333,6 +1380,7 @@ status_t IPCThreadState::executeCommand(int32_t cmd)
|
||||
|
||||
mServingStackPointer = origServingStackPointer;
|
||||
mCallingPid = origPid;
|
||||
+ if (allocatedSid) free((void*)mCallingSid);
|
||||
mCallingSid = origSid;
|
||||
mCallingUid = origUid;
|
||||
mStrictModePolicy = origStrictModePolicy;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 74332fd5cf8c33e6cd32d61c5abc5675524f9f28 Mon Sep 17 00:00:00 2001
|
||||
From 907eaa56c8e515b8295fd097e5358d881120a3a6 Mon Sep 17 00:00:00 2001
|
||||
From: Peter Cai <peter@typeblog.net>
|
||||
Date: Wed, 24 Aug 2022 15:45:18 -0400
|
||||
Subject: [PATCH 1/4] audio_hal_interface: Optionally use sysbta HAL
|
||||
Subject: [PATCH 1/6] audio_hal_interface: Optionally use sysbta HAL
|
||||
|
||||
Required to support sysbta, our system-side bt audio implementation.
|
||||
|
||||
@@ -13,31 +13,31 @@ Change-Id: I59973e6ec84c5923be8a7c67b36b2e237f000860
|
||||
3 files changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/system/audio_hal_interface/aidl/client_interface_aidl.cc b/system/audio_hal_interface/aidl/client_interface_aidl.cc
|
||||
index efdc469de4..3dd65b5394 100644
|
||||
index 9af28031f7..5a9dbbccad 100644
|
||||
--- a/system/audio_hal_interface/aidl/client_interface_aidl.cc
|
||||
+++ b/system/audio_hal_interface/aidl/client_interface_aidl.cc
|
||||
@@ -56,7 +56,7 @@ BluetoothAudioClientInterface::BluetoothAudioClientInterface(
|
||||
|
||||
bool BluetoothAudioClientInterface::is_aidl_available() {
|
||||
auto service = AServiceManager_checkService(
|
||||
return AServiceManager_isDeclared(
|
||||
- kDefaultAudioProviderFactoryInterface.c_str());
|
||||
+ audioProviderFactoryInterface().c_str());
|
||||
return (service != nullptr);
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ BluetoothAudioClientInterface::GetAudioCapabilities(SessionType session_type) {
|
||||
std::vector<AudioCapabilities>
|
||||
@@ -72,7 +72,7 @@ BluetoothAudioClientInterface::GetAudioCapabilities(SessionType session_type) {
|
||||
}
|
||||
auto provider_factory = IBluetoothAudioProviderFactory::fromBinder(
|
||||
::ndk::SpAIBinder(AServiceManager_getService(
|
||||
::ndk::SpAIBinder(AServiceManager_waitForService(
|
||||
- kDefaultAudioProviderFactoryInterface.c_str())));
|
||||
+ audioProviderFactoryInterface().c_str())));
|
||||
|
||||
if (provider_factory == nullptr) {
|
||||
LOG(ERROR) << __func__ << ", can't get capability from unknown factory";
|
||||
@@ -101,7 +101,7 @@ void BluetoothAudioClientInterface::FetchAudioProvider() {
|
||||
@@ -99,7 +99,7 @@ void BluetoothAudioClientInterface::FetchAudioProvider() {
|
||||
}
|
||||
auto provider_factory = IBluetoothAudioProviderFactory::fromBinder(
|
||||
::ndk::SpAIBinder(AServiceManager_getService(
|
||||
::ndk::SpAIBinder(AServiceManager_waitForService(
|
||||
- kDefaultAudioProviderFactoryInterface.c_str())));
|
||||
+ audioProviderFactoryInterface().c_str())));
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 696440946140355e4282f41c470f9ad181089403 Mon Sep 17 00:00:00 2001
|
||||
From 0bac082841f09b83b2a103d2f534b73482fdae0a Mon Sep 17 00:00:00 2001
|
||||
From: Alberto Ponces <ponces26@gmail.com>
|
||||
Date: Thu, 17 Jun 2021 15:48:53 +0100
|
||||
Subject: [PATCH 2/4] Add option to change eSCO Transport Unit Size
|
||||
Subject: [PATCH 2/6] Add option to change eSCO Transport Unit Size
|
||||
|
||||
Fixes Bluetooth calls on some Samsung devices if set to 16.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 5a0f4b6007c2c7573618fde34b8b6d878b4054d8 Mon Sep 17 00:00:00 2001
|
||||
From 0c930c0b8e74f1a329f98241e94ccf1002c872fd Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 17 Oct 2021 17:17:13 -0400
|
||||
Subject: [PATCH 3/4] Don't abort when failing to get real-time priority
|
||||
Subject: [PATCH 3/6] Don't abort when failing to get real-time priority
|
||||
|
||||
On some devices (like OP6), for unknown reason, trying to go to realtime
|
||||
fails with EPERM.
|
||||
@@ -32,10 +32,10 @@ index 9d52524b4b..95a129d2b5 100644
|
||||
#endif
|
||||
}
|
||||
diff --git a/system/btif/src/btif_a2dp_source.cc b/system/btif/src/btif_a2dp_source.cc
|
||||
index f13abac71a..a6a84b519e 100644
|
||||
index 4ca2c8c265..db5ff20444 100644
|
||||
--- a/system/btif/src/btif_a2dp_source.cc
|
||||
+++ b/system/btif/src/btif_a2dp_source.cc
|
||||
@@ -364,7 +364,7 @@ static void btif_a2dp_source_startup_delayed() {
|
||||
@@ -365,7 +365,7 @@ static void btif_a2dp_source_startup_delayed() {
|
||||
LOG_INFO("%s: state=%s", __func__, btif_a2dp_source_cb.StateStr().c_str());
|
||||
if (!btif_a2dp_source_thread.EnableRealTimeScheduling()) {
|
||||
#if defined(OS_ANDROID)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 4291a5b6999072d722d7ebc8968012d2c4a075da Mon Sep 17 00:00:00 2001
|
||||
From bf9eaae54146d19877e8b142e826f0519bb6578a Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schneider <asn@cryptomilk.org>
|
||||
Date: Sat, 12 Nov 2022 00:35:46 +0000
|
||||
Subject: [PATCH 4/4] On Samsung devices, we need to tell Audio HAL if we're
|
||||
Subject: [PATCH 4/6] On Samsung devices, we need to tell Audio HAL if we're
|
||||
running narrow band or wide band
|
||||
|
||||
Ported to Android 13.
|
||||
@@ -12,10 +12,10 @@ Change-Id: I7802b7a29c017a2cd7018e82772183df1dfa0b89
|
||||
1 file changed, 8 insertions(+)
|
||||
|
||||
diff --git a/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java b/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
|
||||
index b237e7d6cc..73579cba50 100644
|
||||
index 52f2949d4d..4e46f47eab 100644
|
||||
--- a/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
|
||||
+++ b/android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java
|
||||
@@ -147,6 +147,7 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
@@ -150,6 +150,7 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
// Audio Parameters
|
||||
private boolean mHasNrecEnabled = false;
|
||||
private boolean mHasWbsEnabled = false;
|
||||
@@ -23,7 +23,7 @@ index b237e7d6cc..73579cba50 100644
|
||||
// AT Phone book keeps a group of states used by AT+CPBR commands
|
||||
@VisibleForTesting
|
||||
final AtPhonebook mPhonebook;
|
||||
@@ -228,6 +229,7 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
@@ -250,6 +251,7 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
}
|
||||
mHasWbsEnabled = false;
|
||||
mHasNrecEnabled = false;
|
||||
@@ -31,7 +31,7 @@ index b237e7d6cc..73579cba50 100644
|
||||
}
|
||||
|
||||
public void dump(StringBuilder sb) {
|
||||
@@ -457,6 +459,7 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
@@ -481,6 +483,7 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
mNeedDialingOutReply = false;
|
||||
mHasWbsEnabled = false;
|
||||
mHasNrecEnabled = false;
|
||||
@@ -39,7 +39,7 @@ index b237e7d6cc..73579cba50 100644
|
||||
broadcastStateTransitions();
|
||||
// Remove the state machine for unbonded devices
|
||||
if (mPrevState != null
|
||||
@@ -1542,6 +1545,9 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
@@ -1566,6 +1569,9 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
+ " hasNrecEnabled=" + mHasNrecEnabled
|
||||
+ " hasWbsEnabled=" + mHasWbsEnabled);
|
||||
am.setBluetoothHeadsetProperties(getCurrentDeviceName(), mHasNrecEnabled, mHasWbsEnabled);
|
||||
@@ -49,7 +49,7 @@ index b237e7d6cc..73579cba50 100644
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -1685,10 +1691,12 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
@@ -1709,10 +1715,12 @@ public class HeadsetStateMachine extends StateMachine {
|
||||
switch (wbsConfig) {
|
||||
case HeadsetHalConstants.BTHF_WBS_YES:
|
||||
mHasWbsEnabled = true;
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
From 31b01259f381831bb13108c4d59780908cf7cb23 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 27 May 2023 06:41:32 -0400
|
||||
Subject: [PATCH 5/6] Add properties to disable some features/commands/states
|
||||
that the ble chip declared but doesnt actually support
|
||||
|
||||
---
|
||||
system/gd/hci/controller.cc | 73 +++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 69 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc
|
||||
index 18f881369e..88fd8ecfc4 100644
|
||||
--- a/system/gd/hci/controller.cc
|
||||
+++ b/system/gd/hci/controller.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
#include "hci/controller.h"
|
||||
|
||||
+#include <base/strings/string_split.h>
|
||||
#include <future>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -25,6 +26,8 @@
|
||||
#include "hci/hci_layer.h"
|
||||
#include "hci_controller_generated.h"
|
||||
#include "os/metrics.h"
|
||||
+#include "os/system_properties.h"
|
||||
+using bluetooth::os::GetSystemProperty;
|
||||
|
||||
namespace bluetooth {
|
||||
namespace hci {
|
||||
@@ -259,7 +262,23 @@ struct Controller::impl {
|
||||
ASSERT(complete_view.IsValid());
|
||||
ErrorCode status = complete_view.GetStatus();
|
||||
ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str());
|
||||
- local_supported_commands_ = complete_view.GetSupportedCommands();
|
||||
+ //local_supported_commands_ = complete_view.GetSupportedCommands();
|
||||
+
|
||||
+ auto local_commands = complete_view.GetSupportedCommands();
|
||||
+ std::string ignored_commands = GetSystemProperty("persist.sys.bt.unsupported.commands").value_or("");
|
||||
+
|
||||
+ if (ignored_commands != "") {
|
||||
+ auto s = base::SplitString(ignored_commands, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
||||
+ for(auto command: s) {
|
||||
+ int index = std::stoi(command);
|
||||
+ LOG_WARN("Ignoring local supported command %d", index);
|
||||
+ uint16_t byte_index = index / 10;
|
||||
+ uint16_t bit_index = index % 10;
|
||||
+ local_commands[byte_index] &= ~(1 << bit_index);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ local_supported_commands_ = local_commands;
|
||||
}
|
||||
|
||||
void read_local_extended_features_complete_handler(std::promise<void> promise, CommandCompleteView view) {
|
||||
@@ -268,7 +287,25 @@ struct Controller::impl {
|
||||
ErrorCode status = complete_view.GetStatus();
|
||||
ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str());
|
||||
uint8_t page_number = complete_view.GetPageNumber();
|
||||
- extended_lmp_features_array_.push_back(complete_view.GetExtendedLmpFeatures());
|
||||
+
|
||||
+ //extended_lmp_features_array_.push_back(complete_view.GetExtendedLmpFeatures());
|
||||
+ auto lmp_features = complete_view.GetExtendedLmpFeatures();
|
||||
+
|
||||
+ std::string ignored_features = GetSystemProperty("persist.sys.bt.unsupported.ogfeatures").value_or("");
|
||||
+
|
||||
+ if (ignored_features != "") {
|
||||
+ auto s = base::SplitString(ignored_features, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
||||
+ int offset = page_number * 64;
|
||||
+ for(auto feature: s) {
|
||||
+ int index = std::stoi(feature) - offset;
|
||||
+ if(index >= 0 && index < 64) {
|
||||
+ LOG_WARN("Ignoring local supported feature %d", index);
|
||||
+ lmp_features &= ~(1ULL << index);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ extended_lmp_features_array_.push_back(lmp_features);
|
||||
+
|
||||
bluetooth::os::LogMetricBluetoothLocalSupportedFeatures(page_number, complete_view.GetExtendedLmpFeatures());
|
||||
// Query all extended features
|
||||
if (page_number < complete_view.GetMaximumPageNumber()) {
|
||||
@@ -348,7 +385,21 @@ struct Controller::impl {
|
||||
ASSERT(complete_view.IsValid());
|
||||
ErrorCode status = complete_view.GetStatus();
|
||||
ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str());
|
||||
- le_local_supported_features_ = complete_view.GetLeFeatures();
|
||||
+
|
||||
+ //le_local_supported_features_ = complete_view.GetLeFeatures();
|
||||
+ auto local_features = complete_view.GetLeFeatures();
|
||||
+ std::string ignored_features = GetSystemProperty("persist.sys.bt.unsupported.lefeatures").value_or("");
|
||||
+
|
||||
+ if (ignored_features != "") {
|
||||
+ auto s = base::SplitString(ignored_features, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
||||
+ for(auto feature: s) {
|
||||
+ int index = std::stoi(feature);
|
||||
+ LOG_WARN("Ignoring local supported feature %d", index);
|
||||
+ local_features &= ~(1ULL << index);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ le_local_supported_features_ = local_features;
|
||||
}
|
||||
|
||||
void le_read_supported_states_handler(CommandCompleteView view) {
|
||||
@@ -356,7 +407,21 @@ struct Controller::impl {
|
||||
ASSERT(complete_view.IsValid());
|
||||
ErrorCode status = complete_view.GetStatus();
|
||||
ASSERT_LOG(status == ErrorCode::SUCCESS, "Status 0x%02hhx, %s", status, ErrorCodeText(status).c_str());
|
||||
- le_supported_states_ = complete_view.GetLeStates();
|
||||
+ //le_supported_states_ = complete_view.GetLeStates();
|
||||
+
|
||||
+ auto local_states = complete_view.GetLeStates();
|
||||
+ std::string ignored_states = GetSystemProperty("persist.sys.bt.unsupported.states").value_or("");
|
||||
+
|
||||
+ if (ignored_states != "") {
|
||||
+ auto s = base::SplitString(ignored_states, ",", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
|
||||
+ for(auto state: s) {
|
||||
+ int index = std::stoi(state);
|
||||
+ LOG_WARN("Ignoring local supported state %d", index);
|
||||
+ local_states &= ~(1ULL << index);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ le_supported_states_ = local_states;
|
||||
}
|
||||
|
||||
void le_read_connect_list_size_handler(CommandCompleteView view) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
From 042412c837c28ea7c1c7b83ae45a4cc007b8cfa0 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 30 May 2023 17:34:03 -0400
|
||||
Subject: [PATCH 6/6] Add a property to cap declared le vendor version. Found
|
||||
needed on unisoc
|
||||
|
||||
---
|
||||
system/gd/hci/controller.cc | 11 +++++++++++
|
||||
1 file changed, 11 insertions(+)
|
||||
|
||||
diff --git a/system/gd/hci/controller.cc b/system/gd/hci/controller.cc
|
||||
index 88fd8ecfc4..3caa76991b 100644
|
||||
--- a/system/gd/hci/controller.cc
|
||||
+++ b/system/gd/hci/controller.cc
|
||||
@@ -503,6 +503,13 @@ struct Controller::impl {
|
||||
if (complete_view.IsValid()) {
|
||||
vendor_capabilities_.is_supported_ = 0x01;
|
||||
|
||||
+ int vendor_cap_max = 0xffff;
|
||||
+ std::string vendor_cap_max_prop = GetSystemProperty("persist.sys.bt.max_vendor_cap").value_or("");
|
||||
+ if (vendor_cap_max_prop != "") {
|
||||
+ vendor_cap_max = std::stoi(vendor_cap_max_prop);
|
||||
+ }
|
||||
+ if (vendor_cap_max < 55) return;
|
||||
+
|
||||
// v0.55
|
||||
BaseVendorCapabilities base_vendor_capabilities = complete_view.GetBaseVendorCapabilities();
|
||||
vendor_capabilities_.max_advt_instances_ = base_vendor_capabilities.max_advt_instances_;
|
||||
@@ -518,6 +525,8 @@ struct Controller::impl {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (vendor_cap_max < 95) return;
|
||||
+
|
||||
// v0.95
|
||||
auto v95 = LeGetVendorCapabilitiesComplete095View::Create(complete_view);
|
||||
if (!v95.IsValid()) {
|
||||
@@ -532,6 +541,7 @@ struct Controller::impl {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (vendor_cap_max < 96) return;
|
||||
// v0.96
|
||||
auto v96 = LeGetVendorCapabilitiesComplete096View::Create(v95);
|
||||
if (!v96.IsValid()) {
|
||||
@@ -543,6 +553,7 @@ struct Controller::impl {
|
||||
return;
|
||||
}
|
||||
|
||||
+ if (vendor_cap_max < 98) return;
|
||||
// v0.98
|
||||
auto v98 = LeGetVendorCapabilitiesComplete098View::Create(v96);
|
||||
if (!v98.IsValid()) {
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ac48adab4937cf7f58ca773ca71e681f7775bd43 Mon Sep 17 00:00:00 2001
|
||||
From 84a2ccce45d2940a18d82665026cdbeaaed9082f 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 01/16] Let system override ro.apex.updatable
|
||||
Subject: [PATCH 01/18] Let system override ro.apex.updatable
|
||||
|
||||
APEX are broken because of a kernel bug in Android 10 devices
|
||||
So we have system set ro.apex.updatable = false
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From c5156f8e2a156a902f0e5acb41eb0fda580555b5 Mon Sep 17 00:00:00 2001
|
||||
From e8bee0466c8df3d00ef350073c687b592cb17cb7 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 12 Sep 2019 13:05:37 +0200
|
||||
Subject: [PATCH 02/16] If Vboot2 fails, fall-back to Vboot1
|
||||
Subject: [PATCH 02/18] If Vboot2 fails, fall-back to Vboot1
|
||||
|
||||
Some devices, for instance Honor View 10, running Pie vendor declares
|
||||
vbmeta in their device-tree, but doesn't have a vbmeta partition.
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 985fd14abf275700574cd8b0a296658dbae3aee5 Mon Sep 17 00:00:00 2001
|
||||
From a3c5e1273b07143deb6674aadc83a48ee533256d Mon Sep 17 00:00:00 2001
|
||||
From: Alberto Ponces <ponces26@gmail.com>
|
||||
Date: Wed, 28 Sep 2022 17:04:03 +0100
|
||||
Subject: [PATCH 03/16] Revert "Remove support for AVB 1.0."
|
||||
Subject: [PATCH 03/18] Revert "Remove support for AVB 1.0."
|
||||
|
||||
This reverts commit 21ef2310eb1ef4e61117b8a63741f3a9577a20c9.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f06a75effbe761c587230b185f60de1a52646ec7 Mon Sep 17 00:00:00 2001
|
||||
From 76f477bfcfb884dfc8e744d6965279baf7e30e65 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sun, 18 Oct 2020 18:14:47 +0200
|
||||
Subject: [PATCH 04/16] Don't abandon creating property tree if there is a
|
||||
Subject: [PATCH 04/18] Don't abandon creating property tree if there is a
|
||||
conflict, and hope for the best
|
||||
|
||||
Change-Id: I194c815fdd58bfb84aaf7db02b8f0d00b4db21e8
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From db118048c81b4f3df407959b61623ec346487b48 Mon Sep 17 00:00:00 2001
|
||||
From 8f3e34d45306f1d56dadc898f903d04ba3d319a4 Mon Sep 17 00:00:00 2001
|
||||
From: Isaac Chen <tingyi364@gmail.com>
|
||||
Date: Wed, 23 Jun 2021 13:07:30 +0800
|
||||
Subject: [PATCH 05/16] init: Do not start console service when debuggable
|
||||
Subject: [PATCH 05/18] init: Do not start console service when debuggable
|
||||
|
||||
Google added a check for this in R, when it's running it will show a
|
||||
notification about that performance is impacted.
|
||||
@@ -13,10 +13,10 @@ Change-Id: I34cfd6b42d3b9aee4b3e63181480cfb8b1255f29
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index 02e51d2c4..ab45bb032 100644
|
||||
index 2b53d883e..45fde5225 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -1277,9 +1277,6 @@ on property:ro.debuggable=1
|
||||
@@ -1280,9 +1280,6 @@ on property:ro.debuggable=1
|
||||
# Give reads to anyone for the accessibility trace folder on debug builds.
|
||||
chmod 0775 /data/misc/a11ytrace
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 1cbce95dd3de98e9b7f0241f9c4741fcd5f943dd Mon Sep 17 00:00:00 2001
|
||||
From ad71b6344150ff1210f8a18466d3e7b5ded363ef Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 4 Sep 2019 21:11:48 +0200
|
||||
Subject: [PATCH 06/16] Panic into recovery rather than bootloader
|
||||
Subject: [PATCH 06/18] Panic into recovery rather than bootloader
|
||||
|
||||
Getting last_kmsg/pstore from bootloader isn't possible for other people
|
||||
than the OEM, but we have TWRP to access last_kmsg/pstore
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From ead95f309a69e3de6107a15e460be30fbd309f86 Mon Sep 17 00:00:00 2001
|
||||
From 20ec90b2213291c7d944165cfb56d3a5fe83c647 Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Tue, 14 Aug 2018 19:33:03 +0200
|
||||
Subject: [PATCH 07/16] Detect allowed sdcard options based on vndk
|
||||
Subject: [PATCH 07/18] Detect allowed sdcard options based on vndk
|
||||
|
||||
Some kernel crashes when using too recent sdcardfs options
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 23ffc138d6bf032f93cf22b911031c32ceebc74b Mon Sep 17 00:00:00 2001
|
||||
From b7e4a2199e4136acf28455ac2ead4a221b9114c0 Mon Sep 17 00:00:00 2001
|
||||
From: Alberto Ponces <ponces26@gmail.com>
|
||||
Date: Tue, 1 Feb 2022 13:48:35 +0000
|
||||
Subject: [PATCH 08/16] Revert "Set /system/xbin permissions to 750."
|
||||
Subject: [PATCH 08/18] Revert "Set /system/xbin permissions to 750."
|
||||
|
||||
This reverts commit 42a1a126e554a8bca31d0afc832848b7b0fa1f4e.
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From f31fd342eaf6f98e769e1f121f56eaf81def02df Mon Sep 17 00:00:00 2001
|
||||
From 07019bb5dfc336be516933b632bb4e2e7c8aa76a Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Fri, 1 Nov 2019 18:22:13 +0100
|
||||
Subject: [PATCH 09/16] Ugly but secure: Set /dev/uinput as 0666 to fix
|
||||
Subject: [PATCH 09/18] Ugly but secure: Set /dev/uinput as 0666 to fix
|
||||
fingerprint sensor on some devices
|
||||
|
||||
cf https://github.com/phhusson/device_phh_treble/pull/122/commits/e000d69c286b6686777ea6f1867f379e30273e48
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From d6a1d56b28a1d01aa6fdf7ebe8235381c7a00ed7 Mon Sep 17 00:00:00 2001
|
||||
From e9708de0e4a9964367ba8b5234744bfcf542775f Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Sat, 22 Jan 2022 14:34:45 -0500
|
||||
Subject: [PATCH 10/16] Add my own OTA mechanism going over /data
|
||||
Subject: [PATCH 10/18] Add my own OTA mechanism going over /data
|
||||
|
||||
Change-Id: I9cacff2d761affa0376b4bb8ca63353a9d95b5de
|
||||
---
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From 558b30744fda7ce35699525bb5e674acdfc66a49 Mon Sep 17 00:00:00 2001
|
||||
From 231e9f580d15d1fa8921997e67658fb309c39e45 Mon Sep 17 00:00:00 2001
|
||||
From: Alberto Ponces <ponces26@gmail.com>
|
||||
Date: Mon, 3 Oct 2022 13:50:36 +0100
|
||||
Subject: [PATCH 11/16] fs_mgr: Keep allowing encryptable fstab flag
|
||||
Subject: [PATCH 11/18] fs_mgr: Keep allowing encryptable fstab flag
|
||||
|
||||
Some users still use "encryptable" flag while being unencrypted. Let them still boot their devices.
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From edfd2c0ba42a35e223b3bd35983edf9427c11fa8 Mon Sep 17 00:00:00 2001
|
||||
From: ChonDoit <thphantomblog@gmail.com>
|
||||
Date: Sat, 6 Aug 2022 15:20:41 +0000
|
||||
Subject: [PATCH 12/16] Add offline Charge Service
|
||||
|
||||
Properly Thanks to Victor Bo/Ponces for base patches.
|
||||
|
||||
Additions
|
||||
| Use default charger service instead gsicharger
|
||||
| Capabilities SYS_BOOT to be able to directly boot system
|
||||
| Seclabel before run service
|
||||
| chown-chmod for Smart Charging
|
||||
---
|
||||
rootdir/init.rc | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/rootdir/init.rc b/rootdir/init.rc
|
||||
index ab45bb032..a26e6679e 100644
|
||||
--- a/rootdir/init.rc
|
||||
+++ b/rootdir/init.rc
|
||||
@@ -11,6 +11,17 @@ import /vendor/etc/init/hw/init.${ro.hardware}.rc
|
||||
import /system/etc/init/hw/init.usb.configfs.rc
|
||||
import /system/etc/init/hw/init.${ro.zygote}.rc
|
||||
|
||||
+service charger /bin/charger
|
||||
+ class charger
|
||||
+ user system
|
||||
+ group system shell graphics input wakelock
|
||||
+ capabilities SYS_BOOT
|
||||
+ seclabel u:r:charger:s0
|
||||
+
|
||||
+on boot
|
||||
+ chown system system /sys/class/power_supply/batery/input_suspend
|
||||
+ chmod 0777 /sys/class/power_supply/batery/input_suspend
|
||||
+
|
||||
# Cgroups are mounted right before early-init using list from /etc/cgroups.json
|
||||
on early-init
|
||||
# Disable sysrq from keyboard
|
||||
@@ -1187,6 +1198,10 @@ on nonencrypted
|
||||
on property:sys.init_log_level=*
|
||||
loglevel ${sys.init_log_level}
|
||||
|
||||
+on charger && property:ro.hardware=mt*
|
||||
+ write /sys/class/leds/lcd-backlight/trigger "backlight"
|
||||
+ write /sys/class/android_usb/android0/enable 1
|
||||
+
|
||||
on charger
|
||||
class_start charger
|
||||
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
From b390c9c1861eff260c57944dba34e265dca7d541 Mon Sep 17 00:00:00 2001
|
||||
From 60859460f47b4c0b49a3940c444f7a3fb8f6d23e Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Wed, 26 Oct 2022 17:59:11 -0400
|
||||
Subject: [PATCH 13/16] Fix support for devices without cgroupv2 support
|
||||
Subject: [PATCH 12/18] Fix support for devices without cgroupv2 support
|
||||
|
||||
This is technically a revert of 1bd1746447.
|
||||
The warning inside the commit doesn't really apply to us, because the
|
||||
@@ -1,7 +1,7 @@
|
||||
From dfcffd8d842e382dd1b94ea63125ed29c9532c4e Mon Sep 17 00:00:00 2001
|
||||
From cd69cc61a42634a79a41d0101d94948fb391245d Mon Sep 17 00:00:00 2001
|
||||
From: Pierre-Hugues Husson <phh@phh.me>
|
||||
Date: Thu, 10 Nov 2022 13:30:50 -0500
|
||||
Subject: [PATCH 14/16] FDE is dead. Fallback FDE to no encryption, and FDE+FBE
|
||||
Subject: [PATCH 13/18] FDE is dead. Fallback FDE to no encryption, and FDE+FBE
|
||||
to FBE
|
||||
|
||||
---
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user