Merge "Explicitly exclude IME from Task Snapshots" into rvc-dev am: 7e06b011a0
Change-Id: If5b5311d4e6a7941319b7e69fa9bb33b0255838f
This commit is contained in:
@@ -1960,7 +1960,7 @@ public final class SurfaceControl implements Parcelable {
|
||||
* @hide
|
||||
*/
|
||||
public static ScreenshotGraphicBuffer captureLayersExcluding(SurfaceControl layer,
|
||||
Rect sourceCrop, float frameScale, SurfaceControl[] exclude) {
|
||||
Rect sourceCrop, float frameScale, int format, SurfaceControl[] exclude) {
|
||||
final IBinder displayToken = SurfaceControl.getInternalDisplayToken();
|
||||
long[] nativeExcludeObjects = new long[exclude.length];
|
||||
for (int i = 0; i < exclude.length; i++) {
|
||||
|
||||
@@ -352,9 +352,19 @@ class TaskSnapshotController {
|
||||
}
|
||||
task.getBounds(mTmpRect);
|
||||
mTmpRect.offsetTo(0, 0);
|
||||
|
||||
SurfaceControl[] excludeLayers;
|
||||
final WindowState imeWindow = task.getDisplayContent().mInputMethodWindow;
|
||||
if (imeWindow != null) {
|
||||
excludeLayers = new SurfaceControl[1];
|
||||
excludeLayers[0] = imeWindow.getSurfaceControl();
|
||||
} else {
|
||||
excludeLayers = new SurfaceControl[0];
|
||||
}
|
||||
final SurfaceControl.ScreenshotGraphicBuffer screenshotBuffer =
|
||||
SurfaceControl.captureLayers(
|
||||
task.getSurfaceControl(), mTmpRect, scaleFraction, pixelFormat);
|
||||
SurfaceControl.captureLayersExcluding(
|
||||
task.getSurfaceControl(), mTmpRect, scaleFraction,
|
||||
pixelFormat, excludeLayers);
|
||||
if (outTaskSize != null) {
|
||||
outTaskSize.x = mTmpRect.width();
|
||||
outTaskSize.y = mTmpRect.height();
|
||||
|
||||
Reference in New Issue
Block a user