summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2013-10-10 22:38:54 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2013-10-10 22:38:54 +0000
commit773824cdfe68a27c7df8ef1410a4e875655f4acc (patch)
tree21c308c2d7962eca37f8f5bb01e1fad70396ae7f /src
parentd1e474a92e47171a985738144887e1f2e46c7768 (diff)
parentaddcba65e94a11af24028b792cd1a8e02d563938 (diff)
downloadandroid_packages_apps_Trebuchet-773824cdfe68a27c7df8ef1410a4e875655f4acc.tar.gz
android_packages_apps_Trebuchet-773824cdfe68a27c7df8ef1410a4e875655f4acc.tar.bz2
android_packages_apps_Trebuchet-773824cdfe68a27c7df8ef1410a4e875655f4acc.zip
Merge "Change drop target to "uninstall" when in All Apps" into jb-ub-now-indigo-rose
Diffstat (limited to 'src')
-rw-r--r--src/com/android/launcher3/DeleteDropTarget.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java
index da6f2f79b..4023dafb6 100644
--- a/src/com/android/launcher3/DeleteDropTarget.java
+++ b/src/com/android/launcher3/DeleteDropTarget.java
@@ -173,7 +173,8 @@ public class DeleteDropTarget extends ButtonDropTarget {
@Override
public void onDragStart(DragSource source, Object info, int dragAction) {
boolean isVisible = true;
- boolean isUninstall = false;
+ boolean useUninstallLabel = !AppsCustomizePagedView.DISABLE_ALL_APPS &&
+ isAllAppsApplication(source, info);
// If we are dragging an application from AppsCustomize, only show the control if we can
// delete the app (it was downloaded), and rename the string to "uninstall" in such a case.
@@ -182,7 +183,7 @@ public class DeleteDropTarget extends ButtonDropTarget {
isVisible = false;
}
- if (isUninstall) {
+ if (useUninstallLabel) {
setCompoundDrawablesRelativeWithIntrinsicBounds(mUninstallDrawable, null, null, null);
} else {
setCompoundDrawablesRelativeWithIntrinsicBounds(mRemoveDrawable, null, null, null);
@@ -193,7 +194,7 @@ public class DeleteDropTarget extends ButtonDropTarget {
resetHoverColor();
((ViewGroup) getParent()).setVisibility(isVisible ? View.VISIBLE : View.GONE);
if (getText().length() > 0) {
- setText(isUninstall ? R.string.delete_target_uninstall_label
+ setText(useUninstallLabel ? R.string.delete_target_uninstall_label
: R.string.delete_target_label);
}
}