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
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java b/packages/SystemUI/src/com/android/systemui/screenshot/GlobalScreenshot.java
index 8544430..ef6b041 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 @@
         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);