Hide capture more option for non full-screen image
The "Capture more" feature is not needed for screenshots of type
"TAKE_SCREENSHOT_PROVIDED_IMAGE" because the screenshot is taken
for a specific application (i.e., where there is no scroll view).
Hence, disabling the "Capture more" option to prevent a crash.
Flag: NONE bug fix
Test: Manual, see Bug
Bug: 356648830
Change-Id: I60aad5ec8929f990fae62c682c661b6eb2279859
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java
index c87b1f5..8891c16 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotController.java
@@ -429,7 +429,9 @@
setWindowFocusable(true);
mViewProxy.requestFocus();
- enqueueScrollCaptureRequest(requestId, screenshot.getUserHandle());
+ if (screenshot.getType() != WindowManager.TAKE_SCREENSHOT_PROVIDED_IMAGE) {
+ enqueueScrollCaptureRequest(requestId, screenshot.getUserHandle());
+ }
attachWindow();