Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9d3554d5 authored by Miranda Kephart's avatar Miranda Kephart Committed by Automerger Merge Worker
Browse files

Merge "Add log for dismissal when new screenshot is taken" into rvc-qpr-dev am: 61ac80b3

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12445573

Change-Id: Ifc46807c0f9ca1ce48c88853357d728705edc04c
parents 35b0a4ae 61ac80b3
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -565,7 +565,12 @@ public class GlobalScreenshot implements ViewTreeObserver.OnComputeInternalInset

    private void saveScreenshot(Bitmap screenshot, Consumer<Uri> finisher, Rect screenRect,
            Insets screenInsets, boolean showFlash) {
        if (mScreenshotLayout.isAttachedToWindow()) {
            if (!mDismissAnimation.isRunning()) { // if we didn't already dismiss for another reason
                mUiEventLogger.log(ScreenshotEvent.SCREENSHOT_REENTERED);
            }
            dismissScreenshot("new screenshot requested", true);
        }

        mScreenBitmap = screenshot;

+3 −1
Original line number Diff line number Diff line
@@ -56,7 +56,9 @@ public enum ScreenshotEvent implements UiEventLogger.UiEventEnum {
    @UiEvent(doc = "screenshot interaction timed out")
    SCREENSHOT_INTERACTION_TIMEOUT(310),
    @UiEvent(doc = "screenshot explicitly dismissed")
    SCREENSHOT_EXPLICIT_DISMISSAL(311);
    SCREENSHOT_EXPLICIT_DISMISSAL(311),
    @UiEvent(doc = "screenshot reentered for new screenshot")
    SCREENSHOT_REENTERED(640);

    private final int mId;