Show error toast messages when there is no room for the item when icon is not to be added to folder.
* when user tries to add item to full hot seat from workspace.
* when user tries to add item to full home screen from workspace.
* refactored so that Workspace handles displaying error messages.
Bug: 15574422
Change-Id: Ibc98c7f45bc0c646dc4636660fba62be9db22ac0
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 678cbcf..c894ea4 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -1466,7 +1466,7 @@
}
if (!foundCellSpan) {
- showOutOfSpaceMessage(isHotseatLayout(layout));
+ mWorkspace.onNoCellFound(layout);
return;
}
@@ -1612,11 +1612,6 @@
}
}
- public void showOutOfSpaceMessage(boolean isHotseatLayout) {
- int strId = (isHotseatLayout ? R.string.hotseat_out_of_space : R.string.out_of_space);
- Toast.makeText(this, getString(strId), Toast.LENGTH_SHORT).show();
- }
-
public DragLayer getDragLayer() {
return mDragLayer;
}