Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6da9c322 authored by Hyunyoung Song's avatar Hyunyoung Song
Browse files

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
parent 9d07e3d5
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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) {