[automerge] [Do Not Merge] Ignore malformed shortcuts 2p: 36338a3152
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/20013777 Bug: 246540168 Change-Id: I1bc63003886149cfc6740a286bc68a63b00b55d5
This commit is contained in:
@@ -1967,10 +1967,15 @@ class ShortcutPackage extends ShortcutPackageItem {
|
|||||||
|
|
||||||
continue;
|
continue;
|
||||||
case TAG_SHORTCUT:
|
case TAG_SHORTCUT:
|
||||||
|
try {
|
||||||
final ShortcutInfo si = parseShortcut(parser, packageName,
|
final ShortcutInfo si = parseShortcut(parser, packageName,
|
||||||
shortcutUser.getUserId(), fromBackup);
|
shortcutUser.getUserId(), fromBackup);
|
||||||
// Don't use addShortcut(), we don't need to save the icon.
|
// Don't use addShortcut(), we don't need to save the icon.
|
||||||
ret.mShortcuts.put(si.getId(), si);
|
ret.mShortcuts.put(si.getId(), si);
|
||||||
|
} catch (Exception e) {
|
||||||
|
// b/246540168 malformed shortcuts should be ignored
|
||||||
|
Slog.e(TAG, "Failed parsing shortcut.", e);
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
case TAG_SHARE_TARGET:
|
case TAG_SHARE_TARGET:
|
||||||
ret.mShareTargets.add(ShareTargetInfo.loadFromXml(parser));
|
ret.mShareTargets.add(ShareTargetInfo.loadFromXml(parser));
|
||||||
|
|||||||
Reference in New Issue
Block a user