From 5fc031775354fa312545c12df92bf6e45a453806 Mon Sep 17 00:00:00 2001 From: Miranda Kephart Date: Thu, 27 Feb 2020 14:34:47 -0500 Subject: [PATCH] Fix bug where screenshot jumped to the left s/height/width/ when setting the X position :) Bug: 150389556 Test: manual Change-Id: I48b4b3e2b3eb0f1db6165ca5d68d889362858153 --- .../src/com/android/systemui/screenshot/GlobalScreenshot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java index 3afd5dc313821..7c770f43fb575 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java @@ -551,7 +551,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset super.onAnimationEnd(animation); mScreenshotView.setScaleX(cornerScale); mScreenshotView.setScaleY(cornerScale); - mScreenshotView.setX(finalPos.x - height * cornerScale / 2f); + mScreenshotView.setX(finalPos.x - width * cornerScale / 2f); mScreenshotView.setY(finalPos.y - height * cornerScale / 2f); Rect bounds = new Rect(); mScreenshotView.getBoundsOnScreen(bounds);