mirror of
https://github.com/Divested-Mobile/DivestOS-Build.git
synced 2024-12-11 00:44:23 -05:00
082bc48c32
https://review.lineageos.org/q/topic:P_asb_2022-05 https://review.lineageos.org/q/topic:P_asb_2022-06 https://review.lineageos.org/q/topic:P_asb_2022-07 https://review.lineageos.org/q/topic:P_asb_2022-08 https://review.lineageos.org/q/topic:P_asb_2022-09 https://review.lineageos.org/q/topic:P_asb_2022-10 https://review.lineageos.org/q/topic:P_asb_2022-11 https://review.lineageos.org/q/topic:P_asb_2022-12 https://review.lineageos.org/q/topic:P_asb_2023-01 https://review.lineageos.org/q/topic:P_asb_2023-02 https://review.lineageos.org/q/topic:P_asb_2023-03 https://review.lineageos.org/q/topic:P_asb_2023-04 https://review.lineageos.org/q/topic:P_asb_2023-05 https://review.lineageos.org/q/topic:P_asb_2023-06 https://review.lineageos.org/q/topic:P_asb_2023-07 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/361250 https://review.lineageos.org/q/topic:P_asb_2023-08 accounted for via manifest change: https://review.lineageos.org/c/LineageOS/android_external_freetype/+/364606 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/365328 https://review.lineageos.org/q/topic:P_asb_2023-09 https://review.lineageos.org/q/topic:P_asb_2023-10 https://review.lineageos.org/q/topic:P_asb_2023-11 accounted for via patches: https://review.lineageos.org/c/LineageOS/android_system_ca-certificates/+/374916 https://review.lineageos.org/q/topic:P_asb_2023-12 https://review.lineageos.org/q/topic:P_asb_2024-01 https://review.lineageos.org/q/topic:P_asb_2024-02 https://review.lineageos.org/q/topic:P_asb_2024-03 https://review.lineageos.org/q/topic:P_asb_2024-04 Signed-off-by: Tavi <tavi@divested.dev>
49 lines
2.3 KiB
Diff
49 lines
2.3 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Pinyao Ting <pinyaoting@google.com>
|
|
Date: Wed, 21 Sep 2022 23:03:11 +0000
|
|
Subject: [PATCH] Ignore malformed shortcuts
|
|
|
|
After an app publishes a shortcut that contains malformed intent, the
|
|
system can be stuck in boot-loop due to uncaught exception caused by
|
|
parsing the malformed intent.
|
|
|
|
This CL ignores that particular malformed entry. Since shortcuts are
|
|
constantly writes back into the xml from system memory, the malformed
|
|
entry will be removed from the xml the next time system persists
|
|
shortcuts from memory to file system.
|
|
|
|
Bug: 246540168
|
|
Change-Id: Ie1e39005a5f9d8038bd703a5bc845779c2f46e94
|
|
Test: manual
|
|
(cherry picked from commit 9b0dd514d29bbf986f1d1a3c6cebc2ef2bcf782e)
|
|
Merged-In: Ie1e39005a5f9d8038bd703a5bc845779c2f46e94
|
|
---
|
|
.../com/android/server/pm/ShortcutPackage.java | 14 +++++++++-----
|
|
1 file changed, 9 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/services/core/java/com/android/server/pm/ShortcutPackage.java b/services/core/java/com/android/server/pm/ShortcutPackage.java
|
|
index 92e261a72617..320cd382c2fc 100644
|
|
--- a/services/core/java/com/android/server/pm/ShortcutPackage.java
|
|
+++ b/services/core/java/com/android/server/pm/ShortcutPackage.java
|
|
@@ -1486,11 +1486,15 @@ class ShortcutPackage extends ShortcutPackageItem {
|
|
|
|
continue;
|
|
case TAG_SHORTCUT:
|
|
- final ShortcutInfo si = parseShortcut(parser, packageName,
|
|
- shortcutUser.getUserId(), fromBackup);
|
|
-
|
|
- // Don't use addShortcut(), we don't need to save the icon.
|
|
- ret.mShortcuts.put(si.getId(), si);
|
|
+ try {
|
|
+ final ShortcutInfo si = parseShortcut(parser, packageName,
|
|
+ shortcutUser.getUserId(), fromBackup);
|
|
+ // Don't use addShortcut(), we don't need to save the icon.
|
|
+ ret.mShortcuts.put(si.getId(), si);
|
|
+ } catch (Exception e) {
|
|
+ // b/246540168 malformed shortcuts should be ignored
|
|
+ Slog.e(TAG, "Failed parsing shortcut.", e);
|
|
+ }
|
|
continue;
|
|
}
|
|
}
|