Loading core/java/android/app/IUiAutomationConnection.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ interface IUiAutomationConnection { void injectInputEventToInputFilter(in InputEvent event); void syncInputTransactions(boolean waitForAnimations); boolean setRotation(int rotation); boolean takeScreenshot(in Rect crop, in ScreenCaptureListener listener); boolean takeScreenshot(in Rect crop, in ScreenCaptureListener listener, int displayId); boolean takeSurfaceControlScreenshot(in SurfaceControl surfaceControl, in ScreenCaptureListener listener); boolean clearWindowContentFrameStats(int windowId); WindowContentFrameStats getWindowContentFrameStats(int windowId); Loading core/java/android/app/UiAutomation.java +1 −1 Original line number Diff line number Diff line Loading @@ -1274,7 +1274,7 @@ public final class UiAutomation { ScreenCapture.createSyncCaptureListener(); try { if (!mUiAutomationConnection.takeScreenshot( new Rect(0, 0, displaySize.x, displaySize.y), syncScreenCapture)) { new Rect(0, 0, displaySize.x, displaySize.y), syncScreenCapture, mDisplayId)) { return null; } } catch (RemoteException re) { Loading core/java/android/app/UiAutomationConnection.java +3 −4 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.app; import static android.view.Display.DEFAULT_DISPLAY; import android.accessibilityservice.AccessibilityServiceInfo; import android.accessibilityservice.IAccessibilityServiceClient; import android.annotation.NonNull; Loading Loading @@ -228,7 +226,8 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { } @Override public boolean takeScreenshot(Rect crop, ScreenCapture.ScreenCaptureListener listener) { public boolean takeScreenshot(Rect crop, ScreenCapture.ScreenCaptureListener listener, int displayId) { synchronized (mLock) { throwIfCalledByNotTrustedUidLocked(); throwIfShutdownLocked(); Loading @@ -240,7 +239,7 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { final CaptureArgs captureArgs = new CaptureArgs.Builder<>() .setSourceCrop(crop) .build(); mWindowManager.captureDisplay(DEFAULT_DISPLAY, captureArgs, listener); mWindowManager.captureDisplay(displayId, captureArgs, listener); } catch (RemoteException re) { re.rethrowAsRuntimeException(); } finally { Loading Loading
core/java/android/app/IUiAutomationConnection.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ interface IUiAutomationConnection { void injectInputEventToInputFilter(in InputEvent event); void syncInputTransactions(boolean waitForAnimations); boolean setRotation(int rotation); boolean takeScreenshot(in Rect crop, in ScreenCaptureListener listener); boolean takeScreenshot(in Rect crop, in ScreenCaptureListener listener, int displayId); boolean takeSurfaceControlScreenshot(in SurfaceControl surfaceControl, in ScreenCaptureListener listener); boolean clearWindowContentFrameStats(int windowId); WindowContentFrameStats getWindowContentFrameStats(int windowId); Loading
core/java/android/app/UiAutomation.java +1 −1 Original line number Diff line number Diff line Loading @@ -1274,7 +1274,7 @@ public final class UiAutomation { ScreenCapture.createSyncCaptureListener(); try { if (!mUiAutomationConnection.takeScreenshot( new Rect(0, 0, displaySize.x, displaySize.y), syncScreenCapture)) { new Rect(0, 0, displaySize.x, displaySize.y), syncScreenCapture, mDisplayId)) { return null; } } catch (RemoteException re) { Loading
core/java/android/app/UiAutomationConnection.java +3 −4 Original line number Diff line number Diff line Loading @@ -16,8 +16,6 @@ package android.app; import static android.view.Display.DEFAULT_DISPLAY; import android.accessibilityservice.AccessibilityServiceInfo; import android.accessibilityservice.IAccessibilityServiceClient; import android.annotation.NonNull; Loading Loading @@ -228,7 +226,8 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { } @Override public boolean takeScreenshot(Rect crop, ScreenCapture.ScreenCaptureListener listener) { public boolean takeScreenshot(Rect crop, ScreenCapture.ScreenCaptureListener listener, int displayId) { synchronized (mLock) { throwIfCalledByNotTrustedUidLocked(); throwIfShutdownLocked(); Loading @@ -240,7 +239,7 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { final CaptureArgs captureArgs = new CaptureArgs.Builder<>() .setSourceCrop(crop) .build(); mWindowManager.captureDisplay(DEFAULT_DISPLAY, captureArgs, listener); mWindowManager.captureDisplay(displayId, captureArgs, listener); } catch (RemoteException re) { re.rethrowAsRuntimeException(); } finally { Loading