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

Commit 6dc9f563 authored by Miranda Kephart's avatar Miranda Kephart Committed by Android (Google) Code Review
Browse files

Merge "Fix screenshot back key recognition" into tm-qpr-dev

parents a2d811ed 0b8ada64
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -553,6 +553,10 @@ public class ScreenshotController {
            Log.d(TAG, "adding OnComputeInternalInsetsListener");
        }
        mScreenshotView.getViewTreeObserver().addOnComputeInternalInsetsListener(mScreenshotView);
        if (DEBUG_WINDOW) {
            Log.d(TAG, "setContentView: " + mScreenshotView);
        }
        setContentView(mScreenshotView);
    }

    /**
@@ -634,6 +638,7 @@ public class ScreenshotController {

        // The window is focusable by default
        setWindowFocusable(true);
        mScreenshotView.requestFocus();

        // Wait until this window is attached to request because it is
        // the reference used to locate the target window (below).
@@ -691,10 +696,7 @@ public class ScreenshotController {
                    mContext.getDrawable(R.drawable.overlay_badge_background), owner));
        }
        mScreenshotView.setScreenshot(mScreenBitmap, screenInsets);
        if (DEBUG_WINDOW) {
            Log.d(TAG, "setContentView: " + mScreenshotView);
        }
        setContentView(mScreenshotView);

        // ignore system bar insets for the purpose of window layout
        mWindow.getDecorView().setOnApplyWindowInsetsListener(
                (v, insets) -> WindowInsets.CONSUMED);