From 533a2e69bbe78a64ba42abc93ef5f991cf3468d3 Mon Sep 17 00:00:00 2001 From: Tad Date: Mon, 11 Dec 2023 01:13:37 -0500 Subject: [PATCH] Picks Signed-off-by: Tad --- .../0007-Always_Restict_Serial.patch | 2 +- .../android_frameworks_base/0014-Automatic_Reboot.patch | 8 ++++---- .../0001-constify_JNINativeMethod.patch | 4 ++-- Scripts/LineageOS-18.1/Functions.sh | 1 + Scripts/LineageOS-18.1/Patch.sh | 8 ++++++++ 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/Patches/LineageOS-18.1/android_frameworks_base/0007-Always_Restict_Serial.patch b/Patches/LineageOS-18.1/android_frameworks_base/0007-Always_Restict_Serial.patch index d8c09cab..0e6522a2 100644 --- a/Patches/LineageOS-18.1/android_frameworks_base/0007-Always_Restict_Serial.patch +++ b/Patches/LineageOS-18.1/android_frameworks_base/0007-Always_Restict_Serial.patch @@ -10,7 +10,7 @@ requiring the READ_PHONE_STATE permission. 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java -index 5e0ce6eadc95..d49d3ad867fd 100644 +index f8aaa4e5a31e..ce034892f379 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -5285,12 +5285,7 @@ public class ActivityManagerService extends IActivityManager.Stub diff --git a/Patches/LineageOS-18.1/android_frameworks_base/0014-Automatic_Reboot.patch b/Patches/LineageOS-18.1/android_frameworks_base/0014-Automatic_Reboot.patch index d5772058..c68c44d0 100644 --- a/Patches/LineageOS-18.1/android_frameworks_base/0014-Automatic_Reboot.patch +++ b/Patches/LineageOS-18.1/android_frameworks_base/0014-Automatic_Reboot.patch @@ -55,7 +55,7 @@ index cf0607449054..7bf662b86a52 100644 diff --git a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java -index 55ce9c76c42a..0a1b8f4efdd5 100644 +index d60721bfdf84..9b126ac72803 100644 --- a/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java +++ b/packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java @@ -163,6 +163,8 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { @@ -117,7 +117,7 @@ index 55ce9c76c42a..0a1b8f4efdd5 100644 /** * Let's us know when the device is waking up. */ -@@ -1461,6 +1485,10 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { +@@ -1465,6 +1489,10 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { if (DEBUG) Log.d(TAG, "doKeyguard: showing the lock screen"); showLocked(options); @@ -128,7 +128,7 @@ index 55ce9c76c42a..0a1b8f4efdd5 100644 } private void lockProfile(int userId) { -@@ -1624,6 +1652,12 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { +@@ -1628,6 +1656,12 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { } } } @@ -141,7 +141,7 @@ index 55ce9c76c42a..0a1b8f4efdd5 100644 } } }; -@@ -2058,6 +2092,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { +@@ -2062,6 +2096,7 @@ public class KeyguardViewMediator extends SystemUI implements Dumpable { mHideAnimationRun = false; adjustStatusBarLocked(); sendUserPresentBroadcast(); diff --git a/Patches/LineageOS-18.1/android_packages_apps_Bluetooth/0001-constify_JNINativeMethod.patch b/Patches/LineageOS-18.1/android_packages_apps_Bluetooth/0001-constify_JNINativeMethod.patch index 695ff803..a8fbf82e 100644 --- a/Patches/LineageOS-18.1/android_packages_apps_Bluetooth/0001-constify_JNINativeMethod.patch +++ b/Patches/LineageOS-18.1/android_packages_apps_Bluetooth/0001-constify_JNINativeMethod.patch @@ -73,10 +73,10 @@ index 22c954c63..d566efcbc 100644 {"initNative", "()V", (void*)initNative}, {"sendMediaUpdateNative", "(ZZZ)V", (void*)sendMediaUpdateNative}, diff --git a/jni/com_android_bluetooth_btservice_AdapterService.cpp b/jni/com_android_bluetooth_btservice_AdapterService.cpp -index 3e4d27289..6c7c51457 100644 +index e0a16f52a..4639de652 100644 --- a/jni/com_android_bluetooth_btservice_AdapterService.cpp +++ b/jni/com_android_bluetooth_btservice_AdapterService.cpp -@@ -1308,7 +1308,7 @@ static int getMetricIdNative(JNIEnv* env, jobject obj, jbyteArray address) { +@@ -1309,7 +1309,7 @@ static int getMetricIdNative(JNIEnv* env, jobject obj, jbyteArray address) { return sBluetoothInterface->get_metric_id(addr_obj); } diff --git a/Scripts/LineageOS-18.1/Functions.sh b/Scripts/LineageOS-18.1/Functions.sh index 2946d65a..71b72cfa 100644 --- a/Scripts/LineageOS-18.1/Functions.sh +++ b/Scripts/LineageOS-18.1/Functions.sh @@ -123,6 +123,7 @@ patchWorkspaceReal() { repopick -fit msm8974-gps-r; repopick -fit hh-vsync; repopick -fi 311299; #ble: Workaround malformed HCI_BLE_VENDOR_CAP response + repopick -it R_asb_2023-12; sh "$DOS_SCRIPTS/Patch.sh"; sh "$DOS_SCRIPTS_COMMON/Enable_Verity.sh"; diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index 72b95c53..650d1669 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -103,6 +103,10 @@ applyPatch "$DOS_PATCHES/android_build_soong/0001-Enable_fwrapv.patch"; #Use -fw if [ "$DOS_GRAPHENE_MALLOC" = true ]; then applyPatch "$DOS_PATCHES/android_build_soong/0002-hm_apex.patch"; fi; #(GrapheneOS) fi; +if enterAndClear "cts"; then +git fetch https://github.com/LineageOS/android_cts refs/changes/97/376997/1 && git cherry-pick FETCH_HEAD; #R_asb_2023-12 +fi; + if enterAndClear "device/qcom/sepolicy-legacy"; then applyPatch "$DOS_PATCHES/android_device_qcom_sepolicy-legacy/0001-Camera_Fix.patch"; #Fix camera on -user builds XXX: REMOVE THIS TRASH (DivestOS) echo "SELINUX_IGNORE_NEVERALLOWS := true" >> sepolicy.mk; #Ignore neverallow violations XXX: necessary for -user builds of legacy devices @@ -123,6 +127,10 @@ applyPatch "$DOS_PATCHES/android_external_hardened_malloc/0001-Broken_Cameras.pa fi; fi; +if enterAndClear "external/pdfium"; then +git fetch https://github.com/LineageOS/android_external_pdfium refs/changes/98/376998/1 && git cherry-pick FETCH_HEAD; #R_asb_2023-12 +fi; + if enterAndClear "frameworks/base"; then applyPatch "$DOS_PATCHES/android_frameworks_base/0007-Always_Restict_Serial.patch"; #Always restrict access to Build.SERIAL (GrapheneOS) applyPatch "$DOS_PATCHES/android_frameworks_base/0008-Browser_No_Location.patch"; #Don't grant location permission to system browsers (GrapheneOS)