diff options
author | Jon Miranda <jonmiranda@google.com> | 2016-10-18 11:47:42 -0700 |
---|---|---|
committer | Jon Miranda <jonmiranda@google.com> | 2016-10-18 14:47:31 -0700 |
commit | 9485e5f293b0976f5f907804e43dfe19d58f165f (patch) | |
tree | 1d9a26460e19eba1583961a6910b7ad58afbf508 /src/com/android/launcher3/widget/WidgetsContainerView.java | |
parent | d2959b9ee7deb06b40152e2ce85b5c045fff58e7 (diff) | |
download | android_packages_apps_Trebuchet-9485e5f293b0976f5f907804e43dfe19d58f165f.tar.gz android_packages_apps_Trebuchet-9485e5f293b0976f5f907804e43dfe19d58f165f.tar.bz2 android_packages_apps_Trebuchet-9485e5f293b0976f5f907804e43dfe19d58f165f.zip |
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
Diffstat (limited to 'src/com/android/launcher3/widget/WidgetsContainerView.java')
-rw-r--r-- | src/com/android/launcher3/widget/WidgetsContainerView.java | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/src/com/android/launcher3/widget/WidgetsContainerView.java b/src/com/android/launcher3/widget/WidgetsContainerView.java index ecc853d90..56702cc25 100644 --- a/src/com/android/launcher3/widget/WidgetsContainerView.java +++ b/src/com/android/launcher3/widget/WidgetsContainerView.java @@ -28,7 +28,6 @@ import android.view.ViewGroup; import android.widget.Toast; import com.android.launcher3.BaseContainerView; -import com.android.launcher3.CellLayout; import com.android.launcher3.DeleteDropTarget; import com.android.launcher3.DragSource; import com.android.launcher3.DropTarget.DragObject; @@ -42,7 +41,6 @@ import com.android.launcher3.PendingAddItemInfo; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.WidgetPreviewLoader; -import com.android.launcher3.Workspace; import com.android.launcher3.dragndrop.DragController; import com.android.launcher3.graphics.LauncherIcons; import com.android.launcher3.model.WidgetsModel; @@ -291,23 +289,7 @@ public class WidgetsContainerView extends BaseContainerView } mLauncher.unlockScreenOrientation(false); - // Display an error message if the drag failed due to there not being enough space on the - // target layout we were dropping on. if (!success) { - boolean showOutOfSpaceMessage = false; - if (target instanceof Workspace) { - int currentScreen = mLauncher.getCurrentWorkspaceScreen(); - Workspace workspace = (Workspace) target; - CellLayout layout = (CellLayout) workspace.getChildAt(currentScreen); - ItemInfo itemInfo = d.dragInfo; - if (layout != null) { - showOutOfSpaceMessage = - !layout.findCellForSpan(null, itemInfo.spanX, itemInfo.spanY); - } - } - if (showOutOfSpaceMessage) { - mLauncher.showOutOfSpaceMessage(false); - } d.deferDragViewCleanupPostAnimation = false; } } |