summaryrefslogtreecommitdiffstats
path: root/quickstep/src
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2019-06-20 13:02:10 -0700
committerWinson Chung <winsonc@google.com>2019-06-20 20:06:24 +0000
commit73769f0a88c44ffa4f3212a612e5018085591ceb (patch)
treef5b087d040ed841bfded6106c062fce339944dea /quickstep/src
parent04414bba47eb4f223e37724028e274b9099ddc73 (diff)
downloadandroid_packages_apps_Trebuchet-73769f0a88c44ffa4f3212a612e5018085591ceb.tar.gz
android_packages_apps_Trebuchet-73769f0a88c44ffa4f3212a612e5018085591ceb.tar.bz2
android_packages_apps_Trebuchet-73769f0a88c44ffa4f3212a612e5018085591ceb.zip
Fixing rounding error when computing bottom clip
- In TaskThumbnailView.updateThumbnailMatrix() we compare the rounded scaled bitmap height with the height of the task/thumbnail view. Since the position is also non-integer, the rounding of the sum is not equivalent to the rounding of the individual components, which causes the check to fail. Bug: 135150767 Test: Quickswitch on sargo Change-Id: I849b4732569e5b8699f00f5ff210f41fb505f1e7
Diffstat (limited to 'quickstep/src')
-rw-r--r--quickstep/src/com/android/quickstep/util/LayoutUtils.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/quickstep/src/com/android/quickstep/util/LayoutUtils.java b/quickstep/src/com/android/quickstep/util/LayoutUtils.java
index c8aed8191..050bdff09 100644
--- a/quickstep/src/com/android/quickstep/util/LayoutUtils.java
+++ b/quickstep/src/com/android/quickstep/util/LayoutUtils.java
@@ -110,7 +110,7 @@ public class LayoutUtils {
float y = insets.top + Math.max(topIconMargin,
(launcherVisibleHeight - extraVerticalSpace - outHeight) / 2);
outRect.set(Math.round(x), Math.round(y),
- Math.round(x + outWidth), Math.round(y + outHeight));
+ Math.round(x) + Math.round(outWidth), Math.round(y) + Math.round(outHeight));
}
public static int getShelfTrackingDistance(Context context, DeviceProfile dp) {