Added 'Cancel' drop target from all apps and widget picker.
- Reuse DeleteDropTarget since it's the same effect, but with "Cancel"
instead of "Remove" if supportsDeleteDropTarget() returns false.
- Rename related strings (but not their values)
Bug: 24104015
Bug: 24099531
Change-Id: Ia9fbcaa17bb17f7aa31df1f830298da01544c178
diff --git a/src/com/android/launcher3/ButtonDropTarget.java b/src/com/android/launcher3/ButtonDropTarget.java
index a19f00d..4b94a1a 100644
--- a/src/com/android/launcher3/ButtonDropTarget.java
+++ b/src/com/android/launcher3/ButtonDropTarget.java
@@ -65,6 +65,8 @@
protected ColorStateList mOriginalTextColor;
protected Drawable mDrawable;
+ protected DeviceProfile mDeviceProfile;
+
private AnimatorSet mCurrentColorAnim;
@Thunk ColorMatrix mSrcFilter, mDstFilter, mCurrentFilter;
@@ -84,8 +86,8 @@
mOriginalTextColor = getTextColors();
// Remove the text in the Phone UI in landscape
- DeviceProfile grid = ((Launcher) getContext()).getDeviceProfile();
- if (grid.isVerticalBarLayout()) {
+ mDeviceProfile = ((Launcher) getContext()).getDeviceProfile();
+ if (mDeviceProfile.isVerticalBarLayout()) {
setText("");
}
}
@@ -193,7 +195,7 @@
}
@Override
- public final void onDragStart(DragSource source, ItemInfo info, int dragAction) {
+ public void onDragStart(DragSource source, ItemInfo info, int dragAction) {
mActive = supportsDrop(source, info);
mDrawable.setColorFilter(null);
if (mCurrentColorAnim != null) {