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

Commit b2061daa authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Remove widgets which have invalid size in DB

Bug: 120638555
Change-Id: I23746af44e4390da7b09869e181919e7eac26e58
parent bf588b0a
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -672,6 +672,11 @@ public class LoaderTask implements Runnable {
                                appWidgetInfo.spanY = c.getInt(spanYIndex);
                                appWidgetInfo.user = c.user;

                                if (appWidgetInfo.spanX <= 0 || appWidgetInfo.spanY <= 0) {
                                    c.markDeleted("Widget has invalid size: "
                                            + appWidgetInfo.spanX + "x" + appWidgetInfo.spanY);
                                    continue;
                                }
                                if (!c.isOnWorkspaceOrHotseat()) {
                                    c.markDeleted("Widget found where container != " +
                                            "CONTAINER_DESKTOP nor CONTAINER_HOTSEAT - ignoring!");