am 0e980e4f: am e01af631: Hiding delete for AppsCustomize widgets. (Bug 10884035)
* commit '0e980e4fe9e951a321750ba6695a31a126912ce3':
Hiding delete for AppsCustomize widgets. (Bug 10884035)
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java
index 56f595c..da6f2f7 100644
--- a/src/com/android/launcher3/DeleteDropTarget.java
+++ b/src/com/android/launcher3/DeleteDropTarget.java
@@ -175,16 +175,10 @@
boolean isVisible = true;
boolean isUninstall = false;
- // If we are dragging a widget from AppsCustomize, hide the delete target
- if (isAllAppsWidget(source, info)) {
- isVisible = false;
- }
-
// 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
- if (willAcceptDrop(info)) {
- isVisible = true;
- } else {
+ // delete the app (it was downloaded), and rename the string to "uninstall" in such a case.
+ // Hide the delete target if it is a widget from AppsCustomize.
+ if (!willAcceptDrop(info) || isAllAppsWidget(source, info)) {
isVisible = false;
}