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

Commit 817e0fa8 authored by Alex Chau's avatar Alex Chau
Browse files

Fix crash when Workspace item is added to two panel home

Test: Run com.android.launcher3.ui.widgetRequestPinItemTest#testPinShortcut tests
      and com.android.launcher3.ui.TaplTestsLauncher3#testWorkspace
Bug: 199150824
Change-Id: I8550970806eb0b9bfc246d4fb76ffbd0415b7647
parent 71e766dc
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -2227,6 +2227,9 @@ public class Launcher extends StatefulActivity<LauncherState> implements Launche
            ArrayList<ItemInfo> addAnimated) {
            ArrayList<ItemInfo> addAnimated) {
        // Add the new screens
        // Add the new screens
        if (newScreens != null) {
        if (newScreens != null) {
            // newScreens can contain an empty right panel that is already bound, but not known
            // by BgDataModel.
            newScreens.removeAllValues(mWorkspace.mScreenOrder);
            bindAddScreens(newScreens);
            bindAddScreens(newScreens);
        }
        }