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
This commit is contained in:
Matt Casey
2023-03-08 18:58:49 +00:00
parent a6c05a41ac
commit 11575b4b23

View File

@@ -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 {