Merge "Fixing RTL issues with Clings. (Bug 11008488)" into jb-ub-now-indigo-rose
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java
index da6f2f7..4023daf 100644
--- a/src/com/android/launcher3/DeleteDropTarget.java
+++ b/src/com/android/launcher3/DeleteDropTarget.java
@@ -173,7 +173,8 @@
@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 @@
isVisible = false;
}
- if (isUninstall) {
+ if (useUninstallLabel) {
setCompoundDrawablesRelativeWithIntrinsicBounds(mUninstallDrawable, null, null, null);
} else {
setCompoundDrawablesRelativeWithIntrinsicBounds(mRemoveDrawable, null, null, null);
@@ -193,7 +194,7 @@
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);
}
}
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java
index bbe0946..66d4410 100644
--- a/src/com/android/launcher3/Workspace.java
+++ b/src/com/android/launcher3/Workspace.java
@@ -53,6 +53,7 @@
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
+import android.view.View.OnClickListener;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityManager;
import android.view.accessibility.AccessibilityNodeInfo;
@@ -1524,7 +1525,10 @@
if (getPageIndicator() != null) {
// In case accessibility state has changed, we need to perform this on every
// attach to window
- getPageIndicator().setOnClickListener(getPageIndicatorClickListener());
+ OnClickListener listener = getPageIndicatorClickListener();
+ if (listener != null) {
+ getPageIndicator().setOnClickListener(listener);
+ }
}
AccessibilityManager am = (AccessibilityManager)
getContext().getSystemService(Context.ACCESSIBILITY_SERVICE);