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

Commit 00c3184f authored by Jorim Jaggi's avatar Jorim Jaggi Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE in Workspace.onDropCompleted" into jb-ub-now-kermit

parents 65b6a603 eedb00a6
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -245,4 +245,8 @@ public class LauncherAppState implements DeviceProfile.DeviceProfileCallbacks {
        return getInstance().mBuildInfo.isDogfoodBuild() &&
                Launcher.isPropertyEnabled(Launcher.DISABLE_ALL_APPS_PROPERTY);
    }

    public static boolean isDogfoodBuild() {
        return getInstance().mBuildInfo.isDogfoodBuild();
    }
}
+7 −1
Original line number Diff line number Diff line
@@ -4051,8 +4051,14 @@ public class Workspace extends SmoothPagedView
            } else {
                cellLayout = getScreenWithId(mDragInfo.screenId);
            }
            if (cellLayout == null && LauncherAppState.isDogfoodBuild()) {
                throw new RuntimeException("Invalid state: cellLayout == null in "
                        + "Workspace#onDropCompleted. Please file a bug. ");
            }
            if (cellLayout != null) {
                cellLayout.onDropChild(mDragInfo.cell);
            }
        }
        if ((d.cancelled || (beingCalledAfterUninstall && !mUninstallSuccessful))
                && mDragInfo.cell != null) {
            mDragInfo.cell.setVisibility(VISIBLE);