mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-04 09:56:49 +00:00
Fix null pointer exception in WidgetsModel
Due to not clearing the PackageItemInfos list when uninstall happened, uninstalled PackageItemInfo lingered around when there wasn't associated Widgets to it. Hence causing null pointer exception. b/20216900 Change-Id: I5601cf618079044d24ffc3ee835c1468fa2e9371
This commit is contained in:
@@ -71,8 +71,10 @@ public class WidgetsModel {
|
||||
// Temporary list for {@link PackageItemInfos} to avoid having to go through
|
||||
// {@link mPackageItemInfos} to locate the key to be used for {@link #mWidgetsList}
|
||||
HashMap<String, PackageItemInfo> tmpPackageItemInfos = new HashMap<>();
|
||||
|
||||
// clear the lists.
|
||||
mWidgetsList.clear();
|
||||
mPackageItemInfos.clear();
|
||||
|
||||
// add and update.
|
||||
for (Object o: widgetsShortcuts) {
|
||||
|
||||
Reference in New Issue
Block a user