commit | d87178460cbe0573d1e51315cebc04eb3410fa1f | [log] [tgz] |
---|---|---|
author | fbaron <fbaron@google.com> | Tue Sep 19 10:16:24 2023 -0700 |
committer | Federico Baron <fbaron@google.com> | Thu Sep 21 05:53:45 2023 +0000 |
tree | 39a72b91a36666b1c070bc9f8efc03ce9dff50d9 | |
parent | f17b59bb19a96f7bff11ff6b0ffda2242ef41f94 [diff] |
Shortcut crash fix Title was empty which caused launcher to crash. If title is empty the shortcut is invalid so we want to remove it. Fix: 300213039 Flag: no flag Test: no test Change-Id: Ifa12877b9ac1d8bc266b74a95b6975b7f1bcf31e
diff --git a/src/com/android/launcher3/provider/LauncherDbUtils.java b/src/com/android/launcher3/provider/LauncherDbUtils.java index 1f908eb..575551b 100644 --- a/src/com/android/launcher3/provider/LauncherDbUtils.java +++ b/src/com/android/launcher3/provider/LauncherDbUtils.java
@@ -120,6 +120,10 @@ deletedShortcuts.add(lc.id); continue; } + if (TextUtils.isEmpty(lc.getTitle())) { + deletedShortcuts.add(lc.id); + continue; + } // Make sure the target intent can be launched without any permissions. Otherwise remove // the shortcut