From 1322f9cb9a8715d463094e13079af7e6e689429a Mon Sep 17 00:00:00 2001 From: Hyunyoung Song Date: Fri, 23 Jun 2017 14:57:38 -0700 Subject: Fixing drag outline not getting drawn when the shortcuts popup is shown. Shortucts popup uses predrag listener to manage the transient state of the icon. Fixing the order of PredragListener, such that predragEnd gets called before dragStart. This allows the transient state to be cleared before any other state changes are done by onDragStart. Bug: 62544416 Change-Id: I77c9a1aa17a15fe6f9f342af7a7fe3092a9d026b --- src/com/android/launcher3/Launcher.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/com/android/launcher3/Launcher.java') diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java index 66aab4328..12870a1fb 100644 --- a/src/com/android/launcher3/Launcher.java +++ b/src/com/android/launcher3/Launcher.java @@ -79,7 +79,6 @@ import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.AccessibilityManager; import android.view.animation.OvershootInterpolator; import android.view.inputmethod.InputMethodManager; -import android.widget.TextView; import android.widget.Toast; import com.android.launcher3.DropTarget.DragObject; @@ -2626,9 +2625,9 @@ public class Launcher extends BaseActivity if (Utilities.ATLEAST_MARSHMALLOW) { int left = 0, top = 0; int width = v.getMeasuredWidth(), height = v.getMeasuredHeight(); - if (v instanceof TextView) { + if (v instanceof BubbleTextView) { // Launch from center of icon, not entire view - Drawable icon = Workspace.getTextViewIcon((TextView) v); + Drawable icon = ((BubbleTextView) v).getIcon(); if (icon != null) { Rect bounds = icon.getBounds(); left = (width - bounds.width()) / 2; -- cgit v1.2.3