From eaf062ab3c21c07b87640dc09e966c04c4ca40a2 Mon Sep 17 00:00:00 2001 From: Mark Renouf Date: Fri, 23 Oct 2020 14:07:33 -0400 Subject: Remove isWindowToken check from requestScrollCapture The 'behindClient' argument is optional, it is used to filter window selection to those below the give window (the UI of the screenshots tool itself). Change-Id: I33696c79dfbbf7d06410384745ce75ccce837594 --- services/core/java/com/android/server/wm/WindowManagerService.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java index 0585679f7fbb..045bc4e15e74 100644 --- a/services/core/java/com/android/server/wm/WindowManagerService.java +++ b/services/core/java/com/android/server/wm/WindowManagerService.java @@ -6925,9 +6925,6 @@ public class WindowManagerService extends IWindowManager.Stub if (!checkCallingPermission(READ_FRAME_BUFFER, "requestScrollCapture()")) { throw new SecurityException("Requires READ_FRAME_BUFFER permission"); } - if (behindClient != null && !isWindowToken(behindClient)) { - throw new IllegalArgumentException("behindClient must be a window token"); - } final long token = Binder.clearCallingIdentity(); try { synchronized (mGlobalLock) { -- cgit v1.2.3-59-g8ed1b