-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Sync with latest sources of TrebleDroid
- Loading branch information
Showing
47 changed files
with
196 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...bledroid/platform_frameworks_base/0041-Fix-brightness-slider-curve-for-some-devices.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
patches/trebledroid/platform_frameworks_base/0042-Ignore-cgroup-creation-errors.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../platform_frameworks_base/0043-Samsung-tablets-use-SW_MACHINE_COVER-rather-than-SW_.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.../trebledroid/platform_frameworks_base/0044-Revert-Removed-IWLAN-legacy-mode-support.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
.../platform_frameworks_base/0046-UDFPS-Don-t-crash-if-we-can-t-compute-a-dim.-Just-do.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 67460d4704d5d0cc353e34470e77c6922ebb05d2 Mon Sep 17 00:00:00 2001 | ||
From: Pierre-Hugues Husson <phh@phh.me> | ||
Date: Wed, 25 Oct 2023 07:30:10 -0400 | ||
Subject: [PATCH 46/47] UDFPS: Don't crash if we can't compute a dim. Just | ||
don't dim. | ||
|
||
--- | ||
.../src/com/android/systemui/biometrics/UdfpsView.kt | 7 ++++--- | ||
1 file changed, 4 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt | ||
index f86e8436b608..4377dd7e70a7 100644 | ||
--- a/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt | ||
+++ b/packages/SystemUI/src/com/android/systemui/biometrics/UdfpsView.kt | ||
@@ -270,12 +270,13 @@ class UdfpsView( | ||
} | ||
} | ||
|
||
- if (!bmFilesExist) { | ||
- throw FileNotFoundException("No brightness files under expected paths") | ||
+ val dim = if (bmFilesExist) { | ||
+ 1.0 - Math.pow( (brightness / maxBrightness), 1/2.3); | ||
+ } else { | ||
+ 0.0 | ||
} | ||
|
||
// Assume HBM is max brightness | ||
- val dim = 1.0 - Math.pow( (brightness / maxBrightness), 1/2.3); | ||
Log.d("PHH-Enroll", "Brightness is $brightness / $maxBrightness, setting dim to $dim") | ||
if (hasAsusGhbm) { | ||
dimUpdate(dim.toFloat()) | ||
-- | ||
2.34.1 | ||
|
25 changes: 0 additions & 25 deletions
25
patches/trebledroid/platform_frameworks_base/0046-fix-finger-up-cmd-code.patch
This file was deleted.
Oops, something went wrong.
31 changes: 31 additions & 0 deletions
31
...edroid/platform_frameworks_base/0047-UDFPS-Don-t-crash-if-we-can-t-find-UDFPS-props.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From ff8a0ebfcca14acbb4a69efc7bdf724938fce8c5 Mon Sep 17 00:00:00 2001 | ||
From: Pierre-Hugues Husson <phh@phh.me> | ||
Date: Wed, 25 Oct 2023 07:30:45 -0400 | ||
Subject: [PATCH 47/47] UDFPS Don't crash if we can't find UDFPS props | ||
|
||
--- | ||
.../java/com/android/server/biometrics/AuthService.java | 8 +++++++- | ||
1 file changed, 7 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/services/core/java/com/android/server/biometrics/AuthService.java b/services/core/java/com/android/server/biometrics/AuthService.java | ||
index add882656713..26ca8c9940f5 100644 | ||
--- a/services/core/java/com/android/server/biometrics/AuthService.java | ||
+++ b/services/core/java/com/android/server/biometrics/AuthService.java | ||
@@ -1016,7 +1016,13 @@ public class AuthService extends SystemService { | ||
com.android.internal.R.array.config_udfps_sensor_props); | ||
|
||
boolean isUdfps = !ArrayUtils.isEmpty(udfpsProps); | ||
- if(!isUdfps) udfpsProps = dynamicUdfpsProps(); | ||
+ if(!isUdfps) { | ||
+ try { | ||
+ udfpsProps = dynamicUdfpsProps(); | ||
+ } catch(Throwable t) { | ||
+ Slog.e("PHH-Enroll", "Failed generating UDFPS props"); | ||
+ } | ||
+ } | ||
isUdfps = !ArrayUtils.isEmpty(udfpsProps); | ||
|
||
if(udfpsProps.length > 0) { | ||
-- | ||
2.34.1 | ||
|
26 changes: 0 additions & 26 deletions
26
.../platform_frameworks_base/0047-fixup-FOD-support-for-Asus-Samsung-and-recent-Xiaomi.patch
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...tform_hardware_interfaces/0001-Add-a-vendor800-command-to-be-able-to-call-vendor-sp.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...s/trebledroid/platform_hardware_interfaces/0002-Fix-light-sensor-crash-on-Xiaomi-13.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
...tform_hardware_interfaces/0003-Fix-crash-on-Samsung-S23-using-stock-properties-beca.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
From cd80c23bc3bd357946d679da60704a70757eaffd Mon Sep 17 00:00:00 2001 | ||
From: Pierre-Hugues Husson <phh@phh.me> | ||
Date: Tue, 24 Oct 2023 04:59:57 -0400 | ||
Subject: [PATCH 3/3] Fix crash on Samsung S23 using stock properties, because | ||
of sensor reporting vec3 instead of scalar. Likely the device orientation | ||
sensor | ||
|
||
--- | ||
sensors/aidl/convert/convert.cpp | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/sensors/aidl/convert/convert.cpp b/sensors/aidl/convert/convert.cpp | ||
index be3833dfa7..c56b30475c 100644 | ||
--- a/sensors/aidl/convert/convert.cpp | ||
+++ b/sensors/aidl/convert/convert.cpp | ||
@@ -167,6 +167,9 @@ void convertToSensorEvent(const Event& src, sensors_event_t* dst) { | ||
auto dstr = ::android::internal::ToString(d); | ||
// ALOGE("Received 6DOF for expected scalar %s", dstr.c_str()); | ||
dst->data[0] = d.values[0]; | ||
+ } else if (src.payload.getTag() == Event::EventPayload::vec3) { | ||
+ auto d = src.payload.get<Event::EventPayload::vec3>(); | ||
+ dst->data[0] = d.x; | ||
} else { | ||
dst->data[0] = src.payload.get<Event::EventPayload::scalar>(); | ||
} | ||
-- | ||
2.34.1 | ||
|
30 changes: 30 additions & 0 deletions
30
...trebledroid/platform_packages_apps_Nfc/0001-Don-t-crash-when-there-is-no-VR-service.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 0e5671e933147c3a6d4c334dcd9bebf4c76a00ba Mon Sep 17 00:00:00 2001 | ||
From: Pierre-Hugues Husson <phh@phh.me> | ||
Date: Fri, 20 Oct 2023 13:02:43 -0400 | ||
Subject: [PATCH] Don't crash when there is no VR service | ||
|
||
Change-Id: I02d672f9a2688df7b1abf16377634fdcf4132511 | ||
--- | ||
src/com/android/nfc/NfcService.java | 6 +++++- | ||
1 file changed, 5 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/src/com/android/nfc/NfcService.java b/src/com/android/nfc/NfcService.java | ||
index f22dc9da..1b786842 100644 | ||
--- a/src/com/android/nfc/NfcService.java | ||
+++ b/src/com/android/nfc/NfcService.java | ||
@@ -572,7 +572,11 @@ public class NfcService implements DeviceHostListener, ForegroundUtils.Callback | ||
mActivityManager = mContext.getSystemService(ActivityManager.class); | ||
mVibrator = mContext.getSystemService(Vibrator.class); | ||
mVibrationEffect = VibrationEffect.createOneShot(200, VibrationEffect.DEFAULT_AMPLITUDE); | ||
- mVrManager = mContext.getSystemService(VrManager.class); | ||
+ try { | ||
+ mVrManager = mContext.getSystemService(VrManager.class); | ||
+ } catch(Throwable t) { | ||
+ mVrManager = null; | ||
+ } | ||
|
||
mScreenState = mScreenStateHelper.checkScreenState(); | ||
|
||
-- | ||
2.34.1 | ||
|
2 changes: 1 addition & 1 deletion
2
patches/trebledroid/platform_system_core/0001-Let-system-override-ro.apex.updatable.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
patches/trebledroid/platform_system_core/0002-If-Vboot2-fails-fall-back-to-Vboot1.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
patches/trebledroid/platform_system_core/0003-Revert-Remove-support-for-AVB-1.0.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.