Skip to content

Commit b8404be

Browse files
trautamakiluk1337
authored andcommitted
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
1 parent 74544b9 commit b8404be

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,9 @@ void handleImageAsScreenshot(Bitmap screenshot, Rect screenshotScreenBounds,
404404

405405
void hideScreenshotSelector() {
406406
setLockedScreenOrientation(false);
407-
mWindowManager.removeView(mScreenshotLayout);
407+
if (mScreenshotLayout.getWindowToken() != null) {
408+
mWindowManager.removeView(mScreenshotLayout);
409+
}
408410
mScreenshotSelectorView.stopSelection();
409411
mScreenshotSelectorView.setVisibility(View.GONE);
410412
mCaptureButton.setVisibility(View.GONE);
@@ -1174,6 +1176,7 @@ private void clearScreenshot() {
11741176
mActionsContainer.setTranslationY(0);
11751177
mActionsContainerBackground.setTranslationY(0);
11761178
mScreenshotPreview.setTranslationY(0);
1179+
hideScreenshotSelector();
11771180
}
11781181

11791182
private void setAnimatedViewSize(int width, int height) {

0 commit comments

Comments
 (0)