Allow placing widget in hotseat (#3930)

This commit is contained in:
John Andrew Camu authored and GitHub committed 2024-01-02 09:23:33 +08:00
1 parent 8576859705
commit abfc4e18b1
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -494,6 +494,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
public Rect estimateItemPosition(CellLayout cl, int hCell, int vCell, int hSpan, int vSpan) {
Rect r = new Rect();
if (cl == null) return r;
cl.cellToRect(hCell, vCell, hSpan, vSpan, r);
return r;
}
@@ -2709,8 +2710,7 @@ public class Workspace<T extends View & PageIndicator> extends PagedView<T>
private boolean shouldUseHotseatAsDropLayout(DragObject dragObject) {
if (mLauncher.getHotseat() == null
|| mLauncher.getHotseat().getShortcutsAndWidgets() == null
|| isDragWidget(dragObject)) {
|| mLauncher.getHotseat().getShortcutsAndWidgets() == null) {
return false;
}
View hotseatShortcuts = mLauncher.getHotseat().getShortcutsAndWidgets();