diff options
author | Miki Dahab <moikop@live.com> | 2013-10-09 15:41:51 -0300 |
---|---|---|
committer | Gerrit Code Review <gerrit@cyanogenmod.org> | 2013-11-27 00:48:13 +0000 |
commit | 8165766b677046c62cb4b93e9974876b85434443 (patch) | |
tree | 5e4b3d56b75509c78cd669d7b27fd44d94f9c09c /src/com/cyanogenmod | |
parent | f7621a4f9ec7216ea8ad135ac136edabf7cebb3d (diff) | |
download | android_packages_apps_Trebuchet-8165766b677046c62cb4b93e9974876b85434443.tar.gz android_packages_apps_Trebuchet-8165766b677046c62cb4b93e9974876b85434443.tar.bz2 android_packages_apps_Trebuchet-8165766b677046c62cb4b93e9974876b85434443.zip |
Trebuchet: Allow uninstall/app info shortcut with locked homescreen
Allow users to access the drag-and-drop uninstall and app info shortcuts
even when the homescreen is locked.
Change-Id: I67721e0d653b59ae7c8af8bac5ede754cb0615f8
Diffstat (limited to 'src/com/cyanogenmod')
-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; |