From 11575b4b23431b3a5fe6e1973044a54fcc19bcd0 Mon Sep 17 00:00:00 2001 From: Matt Casey Date: Wed, 8 Mar 2023 18:58:49 +0000 Subject: [PATCH] Remove extra mCropView.setExtraPadding The extra padding is set (correctly) two lines above, then the wrong value was put in. Repro steps: - Take a long screenshot where the height of the content is less than the height of the screen (I used split screen to make this easier) - Observe whether the crop UI properly aligns to the image (see bug). Fix originally from Sony: https://android-review.git.corp.google.com/c/platform/frameworks/base/+/2401040 Bug: 266728115 Test: Manual steps described above. Change-Id: I87c800dbb9fbfd7d15b220dea925aa7b3d4744c8 --- .../com/android/systemui/screenshot/LongScreenshotActivity.java | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java index ca8e10176e7f6..02a60ad60fa19 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/LongScreenshotActivity.java @@ -481,7 +481,6 @@ public class LongScreenshotActivity extends Activity { mCropView.setExtraPadding(extraPadding + mPreview.getPaddingTop(), extraPadding + mPreview.getPaddingBottom()); imageTop += (previewHeight - imageHeight) / 2; - mCropView.setExtraPadding(extraPadding, extraPadding); mCropView.setImageWidth(previewWidth); scale = previewWidth / (float) mPreview.getDrawable().getIntrinsicWidth(); } else {