Merge "Fix screenshot back key recognition" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
6dc9f563f8
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user