summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTimi Rautamäki <timi.rautamaki@gmail.com>2021-09-12 16:34:37 +0000
committerŁukasz Patron <priv.luk@gmail.com>2021-09-12 20:26:54 +0200
commitb8404be70d59c2ba60436cbc36d76780eb38deaa (patch)
tree46bd5a5a647bd01870907cefeb182403642cdeb9
parent74544b9e39b174025fcb91cc194ca920b12e8683 (diff)
SystemUI: Unblock gestural navigation on clearScreenshot()
If user powers screen off when partial screenshot UI is visible, it will hide the UI but leave gestural navigation disabled. Also the partial screenshot UI would be visible when taking a new (normal) screenshot. Change-Id: Ie8138bb0b771ec0e21ceb48e52872c05c946d3b4
-rw-r--r--packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index 8501547ac561..abd2d42f7533 100644
--- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
+++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
@@ -404,7 +404,9 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
void hideScreenshotSelector() {
setLockedScreenOrientation(false);
- mWindowManager.removeView(mScreenshotLayout);
+ if (mScreenshotLayout.getWindowToken() != null) {
+ mWindowManager.removeView(mScreenshotLayout);
+ }
mScreenshotSelectorView.stopSelection();
mScreenshotSelectorView.setVisibility(View.GONE);
mCaptureButton.setVisibility(View.GONE);
@@ -1174,6 +1176,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset
mActionsContainer.setTranslationY(0);
mActionsContainerBackground.setTranslationY(0);
mScreenshotPreview.setTranslationY(0);
+ hideScreenshotSelector();
}
private void setAnimatedViewSize(int width, int height) {