From c5b1cc9a35e61375c7fe958ff66a9e6d2c5781e0 Mon Sep 17 00:00:00 2001 From: Tad Date: Tue, 19 Apr 2022 17:42:02 -0400 Subject: [PATCH] Simplify 8e3f0438 Signed-off-by: Tad --- .../0007-ABI_Warning.patch} | 0 .../0020-ABI_Warning.patch | 289 ------------------ .../0020-ABI_Warning.patch | 289 ------------------ PrebuiltApps | 2 +- Scripts/LineageOS-17.1/Patch.sh | 2 +- Scripts/LineageOS-18.1/Patch.sh | 2 +- Scripts/LineageOS-19.1/Patch.sh | 2 +- 7 files changed, 4 insertions(+), 582 deletions(-) rename Patches/{LineageOS-19.1/android_frameworks_base/0022-ABI_Warning.patch => Common/android_frameworks_base/0007-ABI_Warning.patch} (100%) delete mode 100644 Patches/LineageOS-17.1/android_frameworks_base/0020-ABI_Warning.patch delete mode 100644 Patches/LineageOS-18.1/android_frameworks_base/0020-ABI_Warning.patch diff --git a/Patches/LineageOS-19.1/android_frameworks_base/0022-ABI_Warning.patch b/Patches/Common/android_frameworks_base/0007-ABI_Warning.patch similarity index 100% rename from Patches/LineageOS-19.1/android_frameworks_base/0022-ABI_Warning.patch rename to Patches/Common/android_frameworks_base/0007-ABI_Warning.patch diff --git a/Patches/LineageOS-17.1/android_frameworks_base/0020-ABI_Warning.patch b/Patches/LineageOS-17.1/android_frameworks_base/0020-ABI_Warning.patch deleted file mode 100644 index ce6ee14c..00000000 --- a/Patches/LineageOS-17.1/android_frameworks_base/0020-ABI_Warning.patch +++ /dev/null @@ -1,289 +0,0 @@ -From 7151fea3ef434af357a468fa4c93645912a89849 Mon Sep 17 00:00:00 2001 -From: Tibor Dusnoki -Date: Wed, 23 Feb 2022 10:37:45 +0100 -Subject: [PATCH 1/2] Warn when running activity from 32 bit app on ARM - devices. - -Starting August 1, 2019 it is required to have 64-bit versions of apps. -As we prepare for the 64-bit requirement this warning dialog notifies users when running an APK using deprecated ABI to update their apps or contact developers to comply to Google's policies. - -Change-Id: If0ca5cbcee571a1095c45c96f0126fce8d0f218c ---- - core/res/res/values/strings.xml | 3 + - core/res/res/values/symbols.xml | 2 + - .../com/android/server/wm/AppWarnings.java | 55 +++++++++++++ - .../server/wm/DeprecatedAbiDialog.java | 80 +++++++++++++++++++ - 4 files changed, 140 insertions(+) - create mode 100644 services/core/java/com/android/server/wm/DeprecatedAbiDialog.java - -diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml -index ae206c1f5872..5581a56ade91 100644 ---- a/core/res/res/values/strings.xml -+++ b/core/res/res/values/strings.xml -@@ -5083,6 +5083,9 @@ - - Check for update - -+ -+ This app needs to be updated by its developer to improve compatibility. Try checking for updates, or contact the developer. -+ - - You have new messages - -diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml -index 5481457d0958..e632f3ef5903 100644 ---- a/core/res/res/values/symbols.xml -+++ b/core/res/res/values/symbols.xml -@@ -3007,6 +3007,8 @@ - - - -+ -+ - - - -diff --git a/services/core/java/com/android/server/wm/AppWarnings.java b/services/core/java/com/android/server/wm/AppWarnings.java -index 6c3fbc1f4160..08e842fe79f9 100644 ---- a/services/core/java/com/android/server/wm/AppWarnings.java -+++ b/services/core/java/com/android/server/wm/AppWarnings.java -@@ -42,6 +42,7 @@ import java.nio.charset.StandardCharsets; - import java.util.HashMap; - import java.util.HashSet; - import java.util.Map; -+import java.util.Arrays; - - /** - * Manages warning dialogs shown during application lifecycle. -@@ -53,6 +54,7 @@ class AppWarnings { - public static final int FLAG_HIDE_DISPLAY_SIZE = 0x01; - public static final int FLAG_HIDE_COMPILE_SDK = 0x02; - public static final int FLAG_HIDE_DEPRECATED_SDK = 0x04; -+ public static final int FLAG_HIDE_DEPRECATED_ABI = 0x05; - - private final HashMap mPackageFlags = new HashMap<>(); - -@@ -65,6 +67,7 @@ class AppWarnings { - private UnsupportedDisplaySizeDialog mUnsupportedDisplaySizeDialog; - private UnsupportedCompileSdkDialog mUnsupportedCompileSdkDialog; - private DeprecatedTargetSdkVersionDialog mDeprecatedTargetSdkVersionDialog; -+ private DeprecatedAbiDialog mDeprecatedAbiDialog; - - /** @see android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning */ - private HashSet mAlwaysShowUnsupportedCompileSdkWarningActivities = -@@ -158,6 +161,19 @@ class AppWarnings { - } - } - -+ /** -+ * Shows the "deprecated abi" warning, if necessary. -+ * -+ * @param r activity record for which the warning may be displayed -+ */ -+ public void showDeprecatedAbiDialogIfNeeded(ActivityRecord r) { -+ final String appAbi = r.info.applicationInfo.primaryCpuAbi; -+ final boolean is64BitArmDevice = Arrays.stream(Build.SUPPORTED_64_BIT_ABIS).anyMatch("arm64-v8a"::equals); -+ if (is64BitArmDevice && appAbi != null && appAbi != "arm64-v8a") { -+ mUiHandler.showDeprecatedAbiDialog(r); -+ } -+ } -+ - /** - * Called when an activity is being started. - * -@@ -167,6 +183,7 @@ class AppWarnings { - showUnsupportedCompileSdkDialogIfNeeded(r); - showUnsupportedDisplaySizeDialogIfNeeded(r); - showDeprecatedTargetDialogIfNeeded(r); -+ showDeprecatedAbiDialogIfNeeded(r); - } - - /** -@@ -291,6 +308,27 @@ class AppWarnings { - } - } - -+ /** -+ * Shows the "deprecated abi" warning for the given application. -+ *

-+ * Note: Must be called on the UI thread. -+ * -+ * @param ar record for the activity that triggered the warning -+ */ -+ @UiThread -+ private void showDeprecatedAbiDialogUiThread(ActivityRecord ar) { -+ if (mDeprecatedAbiDialog != null) { -+ mDeprecatedAbiDialog.dismiss(); -+ mDeprecatedAbiDialog = null; -+ } -+ if (ar != null && !hasPackageFlag( -+ ar.packageName, FLAG_HIDE_DEPRECATED_ABI)) { -+ mDeprecatedAbiDialog = new DeprecatedAbiDialog( -+ AppWarnings.this, mUiContext, ar.info.applicationInfo); -+ mDeprecatedAbiDialog.show(); -+ } -+ } -+ - /** - * Dismisses all warnings for the given package. - *

-@@ -321,6 +359,13 @@ class AppWarnings { - mDeprecatedTargetSdkVersionDialog.dismiss(); - mDeprecatedTargetSdkVersionDialog = null; - } -+ -+ // Hides the "deprecated abi" dialog if necessary. -+ if (mDeprecatedAbiDialog != null && (name == null || name.equals( -+ mDeprecatedAbiDialog.getPackageName()))) { -+ mDeprecatedAbiDialog.dismiss(); -+ mDeprecatedAbiDialog = null; -+ } - } - - /** -@@ -374,6 +419,7 @@ class AppWarnings { - private static final int MSG_SHOW_UNSUPPORTED_COMPILE_SDK_DIALOG = 3; - private static final int MSG_HIDE_DIALOGS_FOR_PACKAGE = 4; - private static final int MSG_SHOW_DEPRECATED_TARGET_SDK_DIALOG = 5; -+ private static final int MSG_SHOW_DEPRECATED_ABI_DIALOG = 6; - - public UiHandler(Looper looper) { - super(looper, null, true); -@@ -401,6 +447,10 @@ class AppWarnings { - final ActivityRecord ar = (ActivityRecord) msg.obj; - showDeprecatedTargetSdkDialogUiThread(ar); - } break; -+ case MSG_SHOW_DEPRECATED_ABI_DIALOG: { -+ final ActivityRecord ar = (ActivityRecord) msg.obj; -+ showDeprecatedAbiDialogUiThread(ar); -+ } break; - } - } - -@@ -424,6 +474,11 @@ class AppWarnings { - obtainMessage(MSG_SHOW_DEPRECATED_TARGET_SDK_DIALOG, r).sendToTarget(); - } - -+ public void showDeprecatedAbiDialog(ActivityRecord r) { -+ removeMessages(MSG_SHOW_DEPRECATED_ABI_DIALOG); -+ obtainMessage(MSG_SHOW_DEPRECATED_ABI_DIALOG, r).sendToTarget(); -+ } -+ - public void hideDialogsForPackage(String name) { - obtainMessage(MSG_HIDE_DIALOGS_FOR_PACKAGE, name).sendToTarget(); - } -diff --git a/services/core/java/com/android/server/wm/DeprecatedAbiDialog.java b/services/core/java/com/android/server/wm/DeprecatedAbiDialog.java -new file mode 100644 -index 000000000000..d2e611965dd4 ---- /dev/null -+++ b/services/core/java/com/android/server/wm/DeprecatedAbiDialog.java -@@ -0,0 +1,80 @@ -+/* -+ * Copyright (C) 2022 The Android Open Source Project -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+package com.android.server.wm; -+ -+import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM; -+import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME; -+ -+import android.app.AlertDialog; -+import android.content.Context; -+import android.content.pm.ApplicationInfo; -+import android.content.pm.PackageItemInfo; -+import android.content.pm.PackageManager; -+import android.util.Log; -+import android.view.Window; -+import android.view.WindowManager; -+ -+import com.android.internal.R; -+ -+public class DeprecatedAbiDialog { -+ private static final String TAG = TAG_WITH_CLASS_NAME ? "DeprecatedAbiDialog" : TAG_ATM; -+ -+ private final AlertDialog mDialog; -+ private final String mPackageName; -+ -+ public DeprecatedAbiDialog(final AppWarnings manager, Context context, -+ ApplicationInfo appInfo) { -+ mPackageName = appInfo.packageName; -+ -+ final PackageManager pm = context.getPackageManager(); -+ final CharSequence label = appInfo.loadSafeLabel(pm, -+ PackageItemInfo.DEFAULT_MAX_LABEL_SIZE_PX, -+ PackageItemInfo.SAFE_LABEL_FLAG_FIRST_LINE -+ | PackageItemInfo.SAFE_LABEL_FLAG_TRIM); -+ final CharSequence message = context.getString(R.string.deprecated_abi_message); -+ -+ final AlertDialog.Builder builder = new AlertDialog.Builder(context) -+ .setPositiveButton(R.string.ok, (dialog, which) -> -+ manager.setPackageFlag( -+ mPackageName, AppWarnings.FLAG_HIDE_DEPRECATED_ABI, true)) -+ .setMessage(message) -+ .setTitle(label); -+ -+ // Ensure the content view is prepared. -+ mDialog = builder.create(); -+ mDialog.create(); -+ -+ final Window window = mDialog.getWindow(); -+ window.setType(WindowManager.LayoutParams.TYPE_PHONE); -+ -+ // DO NOT MODIFY. Used by CTS to verify the dialog is displayed. -+ window.getAttributes().setTitle("DeprecatedAbiDialog"); -+ } -+ -+ public String getPackageName() { -+ return mPackageName; -+ } -+ -+ public void show() { -+ Log.w(TAG, "Showing ABI deprecation warning for package " + mPackageName); -+ mDialog.show(); -+ } -+ -+ public void dismiss() { -+ mDialog.dismiss(); -+ } -+} --- -2.35.1 - - -From 8380b8e8ddf41a7a0a20a95861f9dafcb7bff110 Mon Sep 17 00:00:00 2001 -From: flawedworld -Date: Tue, 12 Apr 2022 23:32:31 +0100 -Subject: [PATCH 2/2] Make 32 bit deprecation dialogue more user friendly - ---- - core/res/res/values/strings.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml -index 5581a56ade91..a5fa280f41f7 100644 ---- a/core/res/res/values/strings.xml -+++ b/core/res/res/values/strings.xml -@@ -5084,7 +5084,7 @@ - Check for update - - -- This app needs to be updated by its developer to improve compatibility. Try checking for updates, or contact the developer. -+ This is a 32 bit app, which is a likely indicator that this app is outdated and potentially unmaintained. Try checking for updates, or contact the developer. - - - You have new messages --- -2.35.1 - diff --git a/Patches/LineageOS-18.1/android_frameworks_base/0020-ABI_Warning.patch b/Patches/LineageOS-18.1/android_frameworks_base/0020-ABI_Warning.patch deleted file mode 100644 index 3ddce1cd..00000000 --- a/Patches/LineageOS-18.1/android_frameworks_base/0020-ABI_Warning.patch +++ /dev/null @@ -1,289 +0,0 @@ -From 2dca1d27e02d5daa132435055b82b1c22c25d1c3 Mon Sep 17 00:00:00 2001 -From: Tibor Dusnoki -Date: Wed, 23 Feb 2022 10:37:45 +0100 -Subject: [PATCH 1/2] Warn when running activity from 32 bit app on ARM - devices. - -Starting August 1, 2019 it is required to have 64-bit versions of apps. -As we prepare for the 64-bit requirement this warning dialog notifies users when running an APK using deprecated ABI to update their apps or contact developers to comply to Google's policies. - -Change-Id: If0ca5cbcee571a1095c45c96f0126fce8d0f218c ---- - core/res/res/values/strings.xml | 3 + - core/res/res/values/symbols.xml | 2 + - .../com/android/server/wm/AppWarnings.java | 55 +++++++++++++ - .../server/wm/DeprecatedAbiDialog.java | 80 +++++++++++++++++++ - 4 files changed, 140 insertions(+) - create mode 100644 services/core/java/com/android/server/wm/DeprecatedAbiDialog.java - -diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml -index 7eaa99ab324f..476064ca5c5b 100644 ---- a/core/res/res/values/strings.xml -+++ b/core/res/res/values/strings.xml -@@ -5080,6 +5080,9 @@ - - Check for update - -+ -+ This app needs to be updated by its developer to improve compatibility. Try checking for updates, or contact the developer. -+ - - You have new messages - -diff --git a/core/res/res/values/symbols.xml b/core/res/res/values/symbols.xml -index 8401a1bc4271..d76440a590c2 100644 ---- a/core/res/res/values/symbols.xml -+++ b/core/res/res/values/symbols.xml -@@ -2939,6 +2939,8 @@ - - - -+ -+ - - - -diff --git a/services/core/java/com/android/server/wm/AppWarnings.java b/services/core/java/com/android/server/wm/AppWarnings.java -index 21b68095ef67..debf4cc34f0a 100644 ---- a/services/core/java/com/android/server/wm/AppWarnings.java -+++ b/services/core/java/com/android/server/wm/AppWarnings.java -@@ -42,6 +42,7 @@ import java.nio.charset.StandardCharsets; - import java.util.HashMap; - import java.util.HashSet; - import java.util.Map; -+import java.util.Arrays; - - /** - * Manages warning dialogs shown during application lifecycle. -@@ -53,6 +54,7 @@ class AppWarnings { - public static final int FLAG_HIDE_DISPLAY_SIZE = 0x01; - public static final int FLAG_HIDE_COMPILE_SDK = 0x02; - public static final int FLAG_HIDE_DEPRECATED_SDK = 0x04; -+ public static final int FLAG_HIDE_DEPRECATED_ABI = 0x05; - - private final HashMap mPackageFlags = new HashMap<>(); - -@@ -65,6 +67,7 @@ class AppWarnings { - private UnsupportedDisplaySizeDialog mUnsupportedDisplaySizeDialog; - private UnsupportedCompileSdkDialog mUnsupportedCompileSdkDialog; - private DeprecatedTargetSdkVersionDialog mDeprecatedTargetSdkVersionDialog; -+ private DeprecatedAbiDialog mDeprecatedAbiDialog; - - /** @see android.app.ActivityManager#alwaysShowUnsupportedCompileSdkWarning */ - private HashSet mAlwaysShowUnsupportedCompileSdkWarningActivities = -@@ -162,6 +165,19 @@ class AppWarnings { - } - } - -+ /** -+ * Shows the "deprecated abi" warning, if necessary. -+ * -+ * @param r activity record for which the warning may be displayed -+ */ -+ public void showDeprecatedAbiDialogIfNeeded(ActivityRecord r) { -+ final String appAbi = r.info.applicationInfo.primaryCpuAbi; -+ final boolean is64BitArmDevice = Arrays.stream(Build.SUPPORTED_64_BIT_ABIS).anyMatch("arm64-v8a"::equals); -+ if (is64BitArmDevice && appAbi != null && appAbi != "arm64-v8a") { -+ mUiHandler.showDeprecatedAbiDialog(r); -+ } -+ } -+ - /** - * Called when an activity is being started. - * -@@ -171,6 +187,7 @@ class AppWarnings { - showUnsupportedCompileSdkDialogIfNeeded(r); - showUnsupportedDisplaySizeDialogIfNeeded(r); - showDeprecatedTargetDialogIfNeeded(r); -+ showDeprecatedAbiDialogIfNeeded(r); - } - - /** -@@ -295,6 +312,27 @@ class AppWarnings { - } - } - -+ /** -+ * Shows the "deprecated abi" warning for the given application. -+ *

-+ * Note: Must be called on the UI thread. -+ * -+ * @param ar record for the activity that triggered the warning -+ */ -+ @UiThread -+ private void showDeprecatedAbiDialogUiThread(ActivityRecord ar) { -+ if (mDeprecatedAbiDialog != null) { -+ mDeprecatedAbiDialog.dismiss(); -+ mDeprecatedAbiDialog = null; -+ } -+ if (ar != null && !hasPackageFlag( -+ ar.packageName, FLAG_HIDE_DEPRECATED_ABI)) { -+ mDeprecatedAbiDialog = new DeprecatedAbiDialog( -+ AppWarnings.this, mUiContext, ar.info.applicationInfo); -+ mDeprecatedAbiDialog.show(); -+ } -+ } -+ - /** - * Dismisses all warnings for the given package. - *

-@@ -325,6 +363,13 @@ class AppWarnings { - mDeprecatedTargetSdkVersionDialog.dismiss(); - mDeprecatedTargetSdkVersionDialog = null; - } -+ -+ // Hides the "deprecated abi" dialog if necessary. -+ if (mDeprecatedAbiDialog != null && (name == null || name.equals( -+ mDeprecatedAbiDialog.getPackageName()))) { -+ mDeprecatedAbiDialog.dismiss(); -+ mDeprecatedAbiDialog = null; -+ } - } - - /** -@@ -378,6 +423,7 @@ class AppWarnings { - private static final int MSG_SHOW_UNSUPPORTED_COMPILE_SDK_DIALOG = 3; - private static final int MSG_HIDE_DIALOGS_FOR_PACKAGE = 4; - private static final int MSG_SHOW_DEPRECATED_TARGET_SDK_DIALOG = 5; -+ private static final int MSG_SHOW_DEPRECATED_ABI_DIALOG = 6; - - public UiHandler(Looper looper) { - super(looper, null, true); -@@ -405,6 +451,10 @@ class AppWarnings { - final ActivityRecord ar = (ActivityRecord) msg.obj; - showDeprecatedTargetSdkDialogUiThread(ar); - } break; -+ case MSG_SHOW_DEPRECATED_ABI_DIALOG: { -+ final ActivityRecord ar = (ActivityRecord) msg.obj; -+ showDeprecatedAbiDialogUiThread(ar); -+ } break; - } - } - -@@ -428,6 +478,11 @@ class AppWarnings { - obtainMessage(MSG_SHOW_DEPRECATED_TARGET_SDK_DIALOG, r).sendToTarget(); - } - -+ public void showDeprecatedAbiDialog(ActivityRecord r) { -+ removeMessages(MSG_SHOW_DEPRECATED_ABI_DIALOG); -+ obtainMessage(MSG_SHOW_DEPRECATED_ABI_DIALOG, r).sendToTarget(); -+ } -+ - public void hideDialogsForPackage(String name) { - obtainMessage(MSG_HIDE_DIALOGS_FOR_PACKAGE, name).sendToTarget(); - } -diff --git a/services/core/java/com/android/server/wm/DeprecatedAbiDialog.java b/services/core/java/com/android/server/wm/DeprecatedAbiDialog.java -new file mode 100644 -index 000000000000..d2e611965dd4 ---- /dev/null -+++ b/services/core/java/com/android/server/wm/DeprecatedAbiDialog.java -@@ -0,0 +1,80 @@ -+/* -+ * Copyright (C) 2022 The Android Open Source Project -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+package com.android.server.wm; -+ -+import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_ATM; -+import static com.android.server.wm.ActivityTaskManagerDebugConfig.TAG_WITH_CLASS_NAME; -+ -+import android.app.AlertDialog; -+import android.content.Context; -+import android.content.pm.ApplicationInfo; -+import android.content.pm.PackageItemInfo; -+import android.content.pm.PackageManager; -+import android.util.Log; -+import android.view.Window; -+import android.view.WindowManager; -+ -+import com.android.internal.R; -+ -+public class DeprecatedAbiDialog { -+ private static final String TAG = TAG_WITH_CLASS_NAME ? "DeprecatedAbiDialog" : TAG_ATM; -+ -+ private final AlertDialog mDialog; -+ private final String mPackageName; -+ -+ public DeprecatedAbiDialog(final AppWarnings manager, Context context, -+ ApplicationInfo appInfo) { -+ mPackageName = appInfo.packageName; -+ -+ final PackageManager pm = context.getPackageManager(); -+ final CharSequence label = appInfo.loadSafeLabel(pm, -+ PackageItemInfo.DEFAULT_MAX_LABEL_SIZE_PX, -+ PackageItemInfo.SAFE_LABEL_FLAG_FIRST_LINE -+ | PackageItemInfo.SAFE_LABEL_FLAG_TRIM); -+ final CharSequence message = context.getString(R.string.deprecated_abi_message); -+ -+ final AlertDialog.Builder builder = new AlertDialog.Builder(context) -+ .setPositiveButton(R.string.ok, (dialog, which) -> -+ manager.setPackageFlag( -+ mPackageName, AppWarnings.FLAG_HIDE_DEPRECATED_ABI, true)) -+ .setMessage(message) -+ .setTitle(label); -+ -+ // Ensure the content view is prepared. -+ mDialog = builder.create(); -+ mDialog.create(); -+ -+ final Window window = mDialog.getWindow(); -+ window.setType(WindowManager.LayoutParams.TYPE_PHONE); -+ -+ // DO NOT MODIFY. Used by CTS to verify the dialog is displayed. -+ window.getAttributes().setTitle("DeprecatedAbiDialog"); -+ } -+ -+ public String getPackageName() { -+ return mPackageName; -+ } -+ -+ public void show() { -+ Log.w(TAG, "Showing ABI deprecation warning for package " + mPackageName); -+ mDialog.show(); -+ } -+ -+ public void dismiss() { -+ mDialog.dismiss(); -+ } -+} --- -2.35.1 - - -From c47cccdd3ff44b6926c8bfc46701cc137c83ea21 Mon Sep 17 00:00:00 2001 -From: flawedworld -Date: Tue, 12 Apr 2022 23:32:31 +0100 -Subject: [PATCH 2/2] Make 32 bit deprecation dialogue more user friendly - ---- - core/res/res/values/strings.xml | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/core/res/res/values/strings.xml b/core/res/res/values/strings.xml -index 476064ca5c5b..e7717d49cf0e 100644 ---- a/core/res/res/values/strings.xml -+++ b/core/res/res/values/strings.xml -@@ -5081,7 +5081,7 @@ - Check for update - - -- This app needs to be updated by its developer to improve compatibility. Try checking for updates, or contact the developer. -+ This is a 32 bit app, which is a likely indicator that this app is outdated and potentially unmaintained. Try checking for updates, or contact the developer. - - - You have new messages --- -2.35.1 - diff --git a/PrebuiltApps b/PrebuiltApps index 247e39cd..2ae71194 160000 --- a/PrebuiltApps +++ b/PrebuiltApps @@ -1 +1 @@ -Subproject commit 247e39cddabf7877cbe61c6d196a80d6e0ed4cc0 +Subproject commit 2ae711949ad51befe9786acca9be93b689b6b98d diff --git a/Scripts/LineageOS-17.1/Patch.sh b/Scripts/LineageOS-17.1/Patch.sh index 2e016438..ee5ad448 100644 --- a/Scripts/LineageOS-17.1/Patch.sh +++ b/Scripts/LineageOS-17.1/Patch.sh @@ -169,8 +169,8 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0017-WiFi_Timeout.patch"; #Time fi; if [ "$DOS_GRAPHENE_CONSTIFY" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0018-constify_JNINativeMethod.patch"; fi; #Constify JNINativeMethod tables (GrapheneOS) if [ "$DOS_GRAPHENE_RANDOM_MAC" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0019-Random_MAC.patch"; fi; #Add option of always randomizing MAC addresses (GrapheneOS) -applyPatch "$DOS_PATCHES/android_frameworks_base/0020-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0006-Do-not-throw-in-setAppOnInterfaceLocked.patch"; #Fix random reboots on broken kernels when an app has data restricted XXX: ugly +applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0007-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. sed -i 's/DEFAULT_MAX_FILES = 1000;/DEFAULT_MAX_FILES = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; #Disable DropBox internal logging service sed -i 's/DEFAULT_MAX_FILES_LOWRAM = 300;/DEFAULT_MAX_FILES_LOWRAM = 0;/' services/core/java/com/android/server/DropBoxManagerService.java; sed -i 's/(notif.needNotify)/(true)/' location/java/com/android/internal/location/GpsNetInitiatedHandler.java; #Notify the user if their location is requested via SUPL diff --git a/Scripts/LineageOS-18.1/Patch.sh b/Scripts/LineageOS-18.1/Patch.sh index 8a89f111..4a086346 100644 --- a/Scripts/LineageOS-18.1/Patch.sh +++ b/Scripts/LineageOS-18.1/Patch.sh @@ -160,8 +160,8 @@ applyPatch "$DOS_PATCHES/android_frameworks_base/0018-Exec_Based_Spawning-12.pat sed -i 's/sys.spawn.exec/persist.security.exec_spawn_new/' core/java/com/android/internal/os/ZygoteConnection.java; fi; if [ "$DOS_GRAPHENE_RANDOM_MAC" = true ]; then applyPatch "$DOS_PATCHES/android_frameworks_base/0019-Random_MAC.patch"; fi; #Add option of always randomizing MAC addresses (GrapheneOS) -applyPatch "$DOS_PATCHES/android_frameworks_base/0020-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0006-Do-not-throw-in-setAppOnInterfaceLocked.patch"; #Fix random reboots on broken kernels when an app has data restricted XXX: ugly +applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0007-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. hardenLocationConf services/core/java/com/android/server/location/gps_debug.conf; #Harden the default GPS config changeDefaultDNS; #Change the default DNS servers sed -i 's/DEFAULT_USE_COMPACTION = false;/DEFAULT_USE_COMPACTION = true;/' services/core/java/com/android/server/am/CachedAppOptimizer.java; #Enable app compaction by default (GrapheneOS) diff --git a/Scripts/LineageOS-19.1/Patch.sh b/Scripts/LineageOS-19.1/Patch.sh index 90e35f78..238d0eab 100644 --- a/Scripts/LineageOS-19.1/Patch.sh +++ b/Scripts/LineageOS-19.1/Patch.sh @@ -153,7 +153,7 @@ fi; applyPatch "$DOS_PATCHES/android_frameworks_base/0020-Location_Indicators-1.patch"; #SystemUI: Use new privacy indicators for location (GrapheneOS) applyPatch "$DOS_PATCHES/android_frameworks_base/0020-Location_Indicators-2.patch"; #Exclude Bluetooth app from Location indicators (GrapheneOS) applyPatch "$DOS_PATCHES/android_frameworks_base/0021-Boot_Animation.patch"; #Use basic boot animation -applyPatch "$DOS_PATCHES/android_frameworks_base/0022-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. +applyPatch "$DOS_PATCHES_COMMON/android_frameworks_base/0007-ABI_Warning.patch"; #Warn when running activity from 32 bit app on ARM64 devices. hardenLocationConf services/core/java/com/android/server/location/gnss/gps_debug.conf; #Harden the default GPS config changeDefaultDNS; #Change the default DNS servers sed -i 's/DEFAULT_USE_COMPACTION = false;/DEFAULT_USE_COMPACTION = true;/' services/core/java/com/android/server/am/CachedAppOptimizer.java; #Enable app compaction by default (GrapheneOS)