From afc967daafe59a33fa8dc3f399f59aa961a4e0c6 Mon Sep 17 00:00:00 2001 From: Mark Renouf Date: Tue, 16 Feb 2021 17:17:17 -0500 Subject: Fix runaway scroll capture Empty result was not being considered an "edge", preventing the loop from ever exiting. Bug: 180390325 Test: manual Change-Id: Ia87c7a5cedc0acda671b9fdef924140c9be01f77 --- .../src/com/android/systemui/screenshot/ScrollCaptureController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScrollCaptureController.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScrollCaptureController.java index d97f644c5d23..ad5e637b189e 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ScrollCaptureController.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScrollCaptureController.java @@ -253,7 +253,7 @@ public class ScrollCaptureController implements OnComputeInternalInsetsListener && result.captured.height() < result.requested.height(); boolean finish = false; - if (partialResult) { + if (partialResult || emptyResult) { // Potentially reached a vertical boundary. Extend in the other direction. switch (mDirection) { case DOWN: -- cgit v1.2.3-59-g8ed1b