End screenshot animation early on layout change
If the phone configuration changes (e.g. we switch orientations) mid-animation into the corner, the destination bounds are no longer correct, so we end up in a weird state. Ending the screenshot animation early on configuration changes fixes this problem. Bug: 190545541 Fix: 190545541 Test: manual (take screenshot in landscape, rotate while animation is happening, observe results) Change-Id: I53c44263f7994ee6c5c4f7a0b1cbb7df36b24afe
This commit is contained in:
@@ -573,6 +573,10 @@ public class ScreenshotController {
|
||||
mScreenshotView.updateDisplayCutoutMargins(
|
||||
mWindowManager.getCurrentWindowMetrics().getWindowInsets()
|
||||
.getDisplayCutout());
|
||||
// screenshot animation calculations won't be valid anymore, so just end
|
||||
if (mScreenshotAnimation != null && mScreenshotAnimation.isRunning()) {
|
||||
mScreenshotAnimation.end();
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user