Allow placing widget in hotseat (#3930)
This commit is contained in:
@@ -991,7 +991,7 @@ public class Launcher extends StatefulActivity<LauncherState>
|
||||
presenterPos.cellX, presenterPos.cellY, newScreenId, CONTAINER_DESKTOP).screenId;
|
||||
}
|
||||
final CellLayout dropLayout = mWorkspace.getScreenWithId(presenterPos.screenId);
|
||||
|
||||
if (dropLayout == null) return;
|
||||
dropLayout.setDropPending(true);
|
||||
final Runnable onComplete = new Runnable() {
|
||||
@Override
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user