Merge "Fix logic to get icon from any view that is a child of DeepShortcutView." into ub-launcher3-master
diff --git a/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
index ecfd707..5a090d9 100644
--- a/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
+++ b/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
@@ -543,10 +543,9 @@
 
         // Position the floating view exactly on top of the original
         Rect rect = new Rect();
-        final boolean isDeepShortcutTextView = v instanceof DeepShortcutTextView
-                && v.getParent() != null && v.getParent() instanceof DeepShortcutView;
-        if (isDeepShortcutTextView) {
-            // Deep shortcut views have their icon drawn in a sibling view.
+        final boolean fromDeepShortcutView = v.getParent() instanceof DeepShortcutView;
+        if (fromDeepShortcutView) {
+            // Deep shortcut views have their icon drawn in a separate view.
             DeepShortcutView view = (DeepShortcutView) v.getParent();
             mDragLayer.getDescendantRectRelativeToSelf(view.getIconView(), rect);
         } else {
@@ -556,7 +555,7 @@
         int viewLocationTop = rect.top;
 
         float startScale = 1f;
-        if (isBubbleTextView && !isDeepShortcutTextView) {
+        if (isBubbleTextView && !fromDeepShortcutView) {
             BubbleTextView btv = (BubbleTextView) v;
             btv.getIconBounds(rect);
             Drawable dr = btv.getIcon();
@@ -644,10 +643,8 @@
      */
     private ValueAnimator getWindowAnimators(View v, RemoteAnimationTargetCompat[] targets) {
         Rect bounds = new Rect();
-        boolean isDeepShortcutTextView = v instanceof DeepShortcutTextView
-                && v.getParent() != null && v.getParent() instanceof DeepShortcutView;
-        if (isDeepShortcutTextView) {
-            // Deep shortcut views have their icon drawn in a sibling view.
+        if (v.getParent() instanceof DeepShortcutView) {
+            // Deep shortcut views have their icon drawn in a separate view.
             DeepShortcutView view = (DeepShortcutView) v.getParent();
             mDragLayer.getDescendantRectRelativeToSelf(view.getIconView(), bounds);
         } else if (v instanceof BubbleTextView) {