Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6b34edcc authored by Jonathan Miranda's avatar Jonathan Miranda Committed by Android (Google) Code Review
Browse files

Merge "Fix logic to get icon from any view that is a child of...

Merge "Fix logic to get icon from any view that is a child of DeepShortcutView." into ub-launcher3-master
parents d263421c d3c91fa0
Loading
Loading
Loading
Loading
+6 −9
Original line number Diff line number Diff line
@@ -543,10 +543,9 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag

        // 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 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
        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 @@ public class LauncherAppTransitionManagerImpl extends LauncherAppTransitionManag
     */
    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) {