diff options
| author | 2022-02-23 09:04:10 -0500 | |
|---|---|---|
| committer | 2022-03-03 16:32:55 +0000 | |
| commit | bd85671adbe3fb2aa6c30a1ead0614c58242eff8 (patch) | |
| tree | c695f6ddab93c7d6c6fdfb7cda8f3d729375010e | |
| parent | 94fdf4049dc4ac89a5f2e689ee3be95ce0b25bbb (diff) | |
Fix screenshot not showing up on subsequent screenshots
The static screenshot view wasn't getting set back to alpha=1 on
reset, so it was effectively invisible. This change resets it and
returns to animating out the background protection.
Bug: 219790596
Fix: 219790596
Test: manual; observed taking screenshots in quick succession (while
the screenshot was animating out) to see that the alpha wasn't reset,
and was after the change
Change-Id: I3afc4e97fd1cd28a1cf9988be0c519590dca7b30
(cherry picked from commit 163d76a7eaa141c2468e32c604a92ea69da75c14)
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java index 1241e1de0ca4..6d729b92e7b8 100644 --- a/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java +++ b/packages/SystemUI/src/com/android/systemui/screenshot/ScreenshotView.java @@ -403,12 +403,20 @@ public class ScreenshotView extends FrameLayout implements } @Override - public void onSwipeDismissInitiated(Animator animator) { + public void onSwipeDismissInitiated(Animator anim) { if (DEBUG_DISMISS) { Log.d(ScreenshotView.TAG, "dismiss triggered via swipe gesture"); } mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_SWIPE_DISMISSED, 0, mPackageName); + anim.addListener(new AnimatorListenerAdapter() { + @Override + public void onAnimationStart(Animator animation) { + super.onAnimationStart(animation); + mBackgroundProtection.animate() + .alpha(0).setDuration(anim.getDuration()).start(); + } + }); } @Override @@ -999,6 +1007,7 @@ public class ScreenshotView extends FrameLayout implements mSmartChips.clear(); mQuickShareChip = null; setAlpha(1); + mScreenshotStatic.setAlpha(1); mScreenshotSelectorView.stop(); } |