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

Commit 302eff9c authored by Tony Wickham's avatar Tony Wickham
Browse files

Fix wallpaper picker crash if folder is in hotseat

Only use mWorkspaceScreens if info.container == CONTAINER_DESKTOP, otherwise assume it's in mHotseat instead.

Test: have a folder in hotseat, open wallpaper picker and can see the preview and set wallpaper
Fixes: 199179718
Change-Id: I6f1dbd8dc387783bb8b76e2bc469508c079a85f8
parent 79ff586c
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -324,7 +324,9 @@ public class LauncherPreviewRenderer extends ContextWrapper
    }

    private void inflateAndAddFolder(FolderInfo info) {
        CellLayout screen = mWorkspaceScreens.get(info.screenId);
        CellLayout screen = info.container == Favorites.CONTAINER_DESKTOP
                ? mWorkspaceScreens.get(info.screenId)
                : mHotseat;
        FolderIcon folderIcon = FolderIcon.inflateIcon(R.layout.folder_icon, this, screen,
                info);
        addInScreenFromBind(folderIcon, info);