summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-04-30 21:50:47 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-04-30 21:50:47 +0000
commit2fc528b833a34accf1e73be4434f34e683247697 (patch)
tree9f3212a200a8d5556c62c1e9ee49f94d40b5b20e
parent34659d2153b3b6c2feb0ad59bd7d55af1c5506fb (diff)
parent361ccf34900f0a987a85abdc62578c4a4f4e73df (diff)
downloadandroid_packages_apps_Trebuchet-2fc528b833a34accf1e73be4434f34e683247697.tar.gz
android_packages_apps_Trebuchet-2fc528b833a34accf1e73be4434f34e683247697.tar.bz2
android_packages_apps_Trebuchet-2fc528b833a34accf1e73be4434f34e683247697.zip
Merge "Fix RTL bug when swiping up to home." into ub-launcher3-qt-dev
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
index 3d2659d54..61d329b25 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
@@ -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.