From bdf78962f40dfb6152c632c04ce69995c9f560b2 Mon Sep 17 00:00:00 2001 From: Miranda Kephart Date: Mon, 20 Jul 2020 10:56:03 -0400 Subject: [PATCH] Reset the screenshot preview intent on clear Currently, we only reset the intent sent upon tapping the screenshot preview when we get a new intent. This means that if you tap on the preview after the animation is complete, but before the screenshot has saved, you'll be sent to the edit app with the old (previous) screenshot. This change sets the intent to null when the screenshot is cleared, so that tapping on it will do nothing until we can send the user to the right place. Bug: 161434853 Fix: 161434853 Bug: 161532249 Fix: 161532249 Test: manual Change-Id: Id8542985cba73bab6d0c9cb35760d43403cee1d9 --- .../src/com/android/systemui/screenshot/GlobalScreenshot.java | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java index 85444303490dc..ef6b041afd9e9 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java @@ -1033,6 +1033,7 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset mScreenshotPreview.setLayerType(View.LAYER_TYPE_NONE, null); mScreenshotPreview.setContentDescription( mContext.getResources().getString(R.string.screenshot_preview_description)); + mScreenshotPreview.setOnClickListener(null); mScreenshotLayout.setAlpha(1); mDismissButton.setTranslationY(0); mActionsContainer.setTranslationY(0);