From 8165766b677046c62cb4b93e9974876b85434443 Mon Sep 17 00:00:00 2001 From: Miki Dahab Date: Wed, 9 Oct 2013 15:41:51 -0300 Subject: 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 --- src/com/cyanogenmod/trebuchet/Workspace.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/com/cyanogenmod/trebuchet/Workspace.java') 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; -- cgit v1.2.3