Handle nullable CellLayout when removing app icon from folder

If CellLayout is null, instead of early return that will lead app icon not clickable, we should fallback to use Launcher as activity

Fix: 290973455
Test: attached to video
Change-Id: I10b03f3f41dd672116133af83ae8a5b066824d71
This commit is contained in:
Fengjiang Li committed 2023-07-13 10:30:19 -07:00
1 parent fc681dbe09
commit 080f9326ab
2 files changed
+4 -6

No files matched your search

@@ -94,9 +94,6 @@ public class LauncherDelegate {
// folder
CellLayout cellLayout = mLauncher.getCellLayout(info.container,
mLauncher.getCellPosMapper().mapModelToPresenter(info).screenId);
if (cellLayout == null) {
return;
}
finalItem = info.contents.remove(0);
newIcon = mLauncher.createShortcut(cellLayout, finalItem);
mLauncher.getModelWriter().addOrMoveItemInDatabase(finalItem,