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

Commit 361ccf34 authored by Jon Miranda's avatar Jon Miranda
Browse files

Fix RTL bug when swiping up to home.

When you switch to RTL when an app is open, we try to use the BubbleTextView
that is no longer attached on the animation back to home. This causes the
item location to return the wrong values (since now the view doesn't have
valid padding/width we can use). In this case, we'll use the fallback
animation.

Bug: 131242470
Change-Id: I0ce27ee10bd6402cc6b2065813b034fc04592622
parent 943ce93b
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -117,9 +117,11 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe
            workspaceView = null;
        }
        final Rect iconLocation = new Rect();
        final FloatingIconView floatingView = workspaceView == null ? null
                : FloatingIconView.getFloatingIconView(activity, workspaceView,
                true /* hideOriginal */, iconLocation, false /* isOpening */, null /* recycle */);
        boolean canUseWorkspaceView = workspaceView != null && workspaceView.isAttachedToWindow();
        final FloatingIconView floatingView = canUseWorkspaceView
                ? FloatingIconView.getFloatingIconView(activity, workspaceView,
                true /* hideOriginal */, iconLocation, false /* isOpening */, null /* recycle */)
                : null;

        return new HomeAnimationFactory() {
            @Nullable
@@ -135,7 +137,7 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe
                final float targetCenterX = dp.availableWidthPx / 2f;
                final float targetCenterY = dp.availableHeightPx - dp.hotseatBarSizePx;

                if (workspaceView != null) {
                if (canUseWorkspaceView) {
                    return new RectF(iconLocation);
                } else {
                    // Fallback to animate to center of screen.