diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/com/cyanogenmod/trebuchet/PagedViewWithDraggableItems.java | 6 | ||||
-rw-r--r-- | src/com/cyanogenmod/trebuchet/Workspace.java | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/com/cyanogenmod/trebuchet/PagedViewWithDraggableItems.java b/src/com/cyanogenmod/trebuchet/PagedViewWithDraggableItems.java index 1674060ff..5062bdb50 100644 --- a/src/com/cyanogenmod/trebuchet/PagedViewWithDraggableItems.java +++ b/src/com/cyanogenmod/trebuchet/PagedViewWithDraggableItems.java @@ -20,7 +20,6 @@ import android.content.Context; import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; -import android.widget.Toast; /* Class that does most of the work of enabling dragging items out of a PagedView by performing a @@ -104,11 +103,6 @@ public abstract class PagedViewWithDraggableItems extends PagedView @Override public boolean onLongClick(View v) { - // Only if workspace is not locked - if (mLauncher.getLockWorkspace()) { - Toast.makeText(mLauncher, mLauncher.getString(R.string.workspace_locked), Toast.LENGTH_SHORT).show(); - return false; - } // Return early if this is not initiated from a touch if (!v.isInTouchMode()) return false; // Return early if we are still animating the pages diff --git a/src/com/cyanogenmod/trebuchet/Workspace.java b/src/com/cyanogenmod/trebuchet/Workspace.java index 0321e2b3f..58f47b06b 100644 --- a/src/com/cyanogenmod/trebuchet/Workspace.java +++ b/src/com/cyanogenmod/trebuchet/Workspace.java @@ -61,6 +61,7 @@ import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; import android.widget.ImageView; import android.widget.TextView; +import android.widget.Toast; import com.cyanogenmod.trebuchet.FolderIcon.FolderRingAnimator; import com.cyanogenmod.trebuchet.LauncherSettings.Favorites; @@ -2691,6 +2692,11 @@ public class Workspace extends PagedView // If it's an external drop (e.g. from All Apps), check if it should be accepted CellLayout dropTargetLayout = mDropToLayout; if (d.dragSource != this) { + // Don't accept if homescreen is locked + if (mLauncher.getLockWorkspace()) { + Toast.makeText(mLauncher, mLauncher.getString(R.string.workspace_locked), Toast.LENGTH_SHORT).show(); + return false; + } // Don't accept the drop if we're not over a screen at time of drop if (dropTargetLayout == null) { return false; |