diff options
author | Hyunyoung Song <hyunyoungs@google.com> | 2017-06-23 14:57:38 -0700 |
---|---|---|
committer | Hyunyoung Song <hyunyoungs@google.com> | 2017-06-26 11:25:01 -0700 |
commit | 1322f9cb9a8715d463094e13079af7e6e689429a (patch) | |
tree | 2e9a1809d3f3be291de492e46c98387c2b331b19 /src/com/android/launcher3/Workspace.java | |
parent | 48f1135a6dbdee99ff1e981682e99d8755944062 (diff) | |
download | android_packages_apps_Trebuchet-1322f9cb9a8715d463094e13079af7e6e689429a.tar.gz android_packages_apps_Trebuchet-1322f9cb9a8715d463094e13079af7e6e689429a.tar.bz2 android_packages_apps_Trebuchet-1322f9cb9a8715d463094e13079af7e6e689429a.zip |
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
Diffstat (limited to 'src/com/android/launcher3/Workspace.java')
-rw-r--r-- | src/com/android/launcher3/Workspace.java | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/com/android/launcher3/Workspace.java b/src/com/android/launcher3/Workspace.java index 0fabeebbf..767e33278 100644 --- a/src/com/android/launcher3/Workspace.java +++ b/src/com/android/launcher3/Workspace.java @@ -51,7 +51,6 @@ import android.view.ViewGroup; import android.view.accessibility.AccessibilityManager; import android.view.animation.DecelerateInterpolator; import android.view.animation.Interpolator; -import android.widget.TextView; import android.widget.Toast; import com.android.launcher3.Launcher.CustomContentCallbacks; import com.android.launcher3.Launcher.LauncherOverlay; @@ -2083,19 +2082,6 @@ public class Workspace extends PagedView } } - /** - * Returns the drawable for the given text view. - */ - public static Drawable getTextViewIcon(TextView tv) { - final Drawable[] drawables = tv.getCompoundDrawables(); - for (int i = 0; i < drawables.length; i++) { - if (drawables[i] != null) { - return drawables[i]; - } - } - return null; - } - public void startDrag(CellLayout.CellInfo cellInfo, DragOptions options) { View child = cellInfo.cell; @@ -3865,7 +3851,7 @@ public class Workspace extends PagedView updates.contains(info)) { ShortcutInfo si = (ShortcutInfo) info; BubbleTextView shortcut = (BubbleTextView) v; - Drawable oldIcon = getTextViewIcon(shortcut); + Drawable oldIcon = shortcut.getIcon(); boolean oldPromiseState = (oldIcon instanceof PreloadIconDrawable) && ((PreloadIconDrawable) oldIcon).hasNotCompleted(); shortcut.applyFromShortcutInfo(si, si.isPromise() != oldPromiseState); |