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

Commit 50c004e0 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Move call to captureDisplay outside of the synchronized block." into...

Merge "Move call to captureDisplay outside of the synchronized block." into tm-dev am: f14e35e4 am: bfcc895f

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



Change-Id: I77b21b32bb459ff5f02f38e209ac848f99a1257b
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 776a4c58 bfcc895f
Loading
Loading
Loading
Loading
+9 −9
Original line number Diff line number Diff line
@@ -2084,6 +2084,7 @@ public final class DisplayManagerService extends SystemService {
    }

    private SurfaceControl.ScreenshotHardwareBuffer systemScreenshotInternal(int displayId) {
        final SurfaceControl.DisplayCaptureArgs captureArgs;
        synchronized (mSyncRoot) {
            final IBinder token = getDisplayToken(displayId);
            if (token == null) {
@@ -2095,15 +2096,14 @@ public final class DisplayManagerService extends SystemService {
            }

            final DisplayInfo displayInfo = logicalDisplay.getDisplayInfoLocked();
            final SurfaceControl.DisplayCaptureArgs captureArgs =
                    new SurfaceControl.DisplayCaptureArgs.Builder(token)
            captureArgs = new SurfaceControl.DisplayCaptureArgs.Builder(token)
                    .setSize(displayInfo.getNaturalWidth(), displayInfo.getNaturalHeight())
                    .setUseIdentityTransform(true)
                    .setCaptureSecureLayers(true)
                    .setAllowProtected(true)
                    .build();
            return SurfaceControl.captureDisplay(captureArgs);
        }
        return SurfaceControl.captureDisplay(captureArgs);
    }

    private SurfaceControl.ScreenshotHardwareBuffer userScreenshotInternal(int displayId) {