Loading core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import android.view.accessibility.IAccessibilityInteractionConnectionCallback; import android.view.accessibility.AccessibilityWindowInfo; import java.util.List; import android.window.ScreenCapture; import android.window.ScreenCaptureInternal; /** * Interface given to an AccessibilitySerivce to talk to the AccessibilityManagerService. Loading Loading @@ -167,7 +167,7 @@ interface IAccessibilityServiceConnection { @RequiresNoPermission void takeScreenshotOfWindow(int accessibilityWindowId, int interactionId, in ScreenCapture.ScreenCaptureListener listener, in ScreenCaptureInternal.ScreenCaptureListener listener, IAccessibilityInteractionConnectionCallback callback); @RequiresNoPermission Loading core/java/android/app/IUiAutomationConnection.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ import android.view.SurfaceControl; import android.view.WindowContentFrameStats; import android.view.WindowAnimationFrameStats; import android.os.ParcelFileDescriptor; import android.window.ScreenCapture.ScreenCaptureListener; import android.window.ScreenCapture.LayerCaptureArgs; import android.window.ScreenCaptureInternal.ScreenCaptureListener; import android.window.ScreenCaptureInternal.LayerCaptureArgs; import java.util.List; Loading core/java/android/app/UiAutomation.java +10 −9 Original line number Diff line number Diff line Loading @@ -73,8 +73,8 @@ import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityWindowInfo; import android.view.accessibility.IAccessibilityInteractionConnection; import android.view.inputmethod.EditorInfo; import android.window.ScreenCapture; import android.window.ScreenCapture.ScreenshotHardwareBuffer; import android.window.ScreenCaptureInternal; import android.window.ScreenCaptureInternal.ScreenshotHardwareBuffer; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -1290,8 +1290,8 @@ public final class UiAutomation { display.getRealSize(displaySize); // Take the screenshot ScreenCapture.SynchronousScreenCaptureListener syncScreenCapture = ScreenCapture.createSyncCaptureListener(); ScreenCaptureInternal.SynchronousScreenCaptureListener syncScreenCapture = ScreenCaptureInternal.createSyncCaptureListener(); try { if (!mUiAutomationConnection.takeScreenshot( new Rect(0, 0, displaySize.x, displaySize.y), syncScreenCapture, mDisplayId)) { Loading Loading @@ -1350,8 +1350,8 @@ public final class UiAutomation { display.getRealSize(displaySize); // Take the screenshot ScreenCapture.SynchronousScreenCaptureListener syncScreenCapture = ScreenCapture.createSyncCaptureListener(); ScreenCaptureInternal.SynchronousScreenCaptureListener syncScreenCapture = ScreenCaptureInternal.createSyncCaptureListener(); try { if (!mUiAutomationConnection.takeScreenshot( new Rect(0, 0, displaySize.x, displaySize.y), syncScreenCapture, displayId)) { Loading Loading @@ -1419,8 +1419,8 @@ public final class UiAutomation { // Apply a sync transaction to ensure SurfaceFlinger is flushed before capturing a // screenshot. new SurfaceControl.Transaction().apply(true); ScreenCapture.SynchronousScreenCaptureListener syncScreenCapture = ScreenCapture.createSyncCaptureListener(); ScreenCaptureInternal.SynchronousScreenCaptureListener syncScreenCapture = ScreenCaptureInternal.createSyncCaptureListener(); try { if (!mUiAutomationConnection.takeSurfaceControlScreenshot(sc, syncScreenCapture)) { Log.e(LOG_TAG, "Failed to take screenshot for window=" + window); Loading @@ -1430,7 +1430,8 @@ public final class UiAutomation { Log.e(LOG_TAG, "Error while taking screenshot!", re); return null; } ScreenCapture.ScreenshotHardwareBuffer captureBuffer = syncScreenCapture.getBuffer(); ScreenCaptureInternal.ScreenshotHardwareBuffer captureBuffer = syncScreenCapture.getBuffer(); if (captureBuffer == null) { Log.e(LOG_TAG, "Failed to take screenshot for window=" + window); return null; Loading core/java/android/app/UiAutomationConnection.java +12 −11 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ import android.view.WindowAnimationFrameStats; import android.view.WindowContentFrameStats; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.IAccessibilityManager; import android.window.ScreenCapture; import android.window.ScreenCapture.CaptureArgs; import android.window.ScreenCaptureInternal; import android.window.ScreenCaptureInternal.CaptureArgs; import libcore.io.IoUtils; Loading Loading @@ -226,8 +226,8 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { } @Override public boolean takeScreenshot(Rect crop, ScreenCapture.ScreenCaptureListener listener, int displayId) { public boolean takeScreenshot( Rect crop, ScreenCaptureInternal.ScreenCaptureListener listener, int displayId) { synchronized (mLock) { throwIfCalledByNotTrustedUidLocked(); throwIfShutdownLocked(); Loading @@ -251,8 +251,9 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { @Nullable @Override public boolean takeSurfaceControlScreenshot(@NonNull SurfaceControl surfaceControl, ScreenCapture.ScreenCaptureListener listener) { public boolean takeSurfaceControlScreenshot( @NonNull SurfaceControl surfaceControl, ScreenCaptureInternal.ScreenCaptureListener listener) { synchronized (mLock) { throwIfCalledByNotTrustedUidLocked(); throwIfShutdownLocked(); Loading @@ -261,11 +262,11 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { final long identity = Binder.clearCallingIdentity(); try { ScreenCapture.LayerCaptureArgs args = new ScreenCapture.LayerCaptureArgs.Builder(surfaceControl) ScreenCaptureInternal.LayerCaptureArgs args = new ScreenCaptureInternal.LayerCaptureArgs.Builder(surfaceControl) .setChildrenOnly(false) .build(); int status = ScreenCapture.captureLayers(args, listener); int status = ScreenCaptureInternal.captureLayers(args, listener); if (status != 0) { return false; Loading core/java/android/hardware/display/DisplayManagerInternal.java +8 −8 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import android.view.SurfaceControl; import android.view.SurfaceControl.RefreshRateRange; import android.view.SurfaceControl.Transaction; import android.window.DisplayWindowPolicyController; import android.window.ScreenCapture; import android.window.ScreenCaptureInternal; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -116,23 +116,23 @@ public abstract class DisplayManagerInternal { public abstract void unregisterDisplayGroupListener(DisplayGroupListener listener); /** * Screenshot for internal system-only use such as rotation, etc. This method includes * secure layers and the result should never be exposed to non-system applications. * This method does not apply any rotation and provides the output in natural orientation. * Screenshot for internal system-only use such as rotation, etc. This method includes secure * layers and the result should never be exposed to non-system applications. This method does * not apply any rotation and provides the output in natural orientation. * * @param displayId The display id to take the screenshot of. * @return The buffer or null if we have failed. */ public abstract ScreenCapture.ScreenshotHardwareBuffer systemScreenshot(int displayId); public abstract ScreenCaptureInternal.ScreenshotHardwareBuffer systemScreenshot(int displayId); /** * General screenshot functionality that excludes secure layers and applies appropriate * rotation that the device is currently in. * General screenshot functionality that excludes secure layers and applies appropriate rotation * that the device is currently in. * * @param displayId The display id to take the screenshot of. * @return The buffer or null if we have failed. */ public abstract ScreenCapture.ScreenshotHardwareBuffer userScreenshot(int displayId); public abstract ScreenCaptureInternal.ScreenshotHardwareBuffer userScreenshot(int displayId); /** * Returns information about the specified logical display. Loading Loading
core/java/android/accessibilityservice/IAccessibilityServiceConnection.aidl +3 −3 Original line number Diff line number Diff line Loading @@ -34,7 +34,7 @@ import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction; import android.view.accessibility.IAccessibilityInteractionConnectionCallback; import android.view.accessibility.AccessibilityWindowInfo; import java.util.List; import android.window.ScreenCapture; import android.window.ScreenCaptureInternal; /** * Interface given to an AccessibilitySerivce to talk to the AccessibilityManagerService. Loading Loading @@ -167,7 +167,7 @@ interface IAccessibilityServiceConnection { @RequiresNoPermission void takeScreenshotOfWindow(int accessibilityWindowId, int interactionId, in ScreenCapture.ScreenCaptureListener listener, in ScreenCaptureInternal.ScreenCaptureListener listener, IAccessibilityInteractionConnectionCallback callback); @RequiresNoPermission Loading
core/java/android/app/IUiAutomationConnection.aidl +2 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ import android.view.SurfaceControl; import android.view.WindowContentFrameStats; import android.view.WindowAnimationFrameStats; import android.os.ParcelFileDescriptor; import android.window.ScreenCapture.ScreenCaptureListener; import android.window.ScreenCapture.LayerCaptureArgs; import android.window.ScreenCaptureInternal.ScreenCaptureListener; import android.window.ScreenCaptureInternal.LayerCaptureArgs; import java.util.List; Loading
core/java/android/app/UiAutomation.java +10 −9 Original line number Diff line number Diff line Loading @@ -73,8 +73,8 @@ import android.view.accessibility.AccessibilityNodeInfo; import android.view.accessibility.AccessibilityWindowInfo; import android.view.accessibility.IAccessibilityInteractionConnection; import android.view.inputmethod.EditorInfo; import android.window.ScreenCapture; import android.window.ScreenCapture.ScreenshotHardwareBuffer; import android.window.ScreenCaptureInternal; import android.window.ScreenCaptureInternal.ScreenshotHardwareBuffer; import com.android.internal.annotations.GuardedBy; import com.android.internal.annotations.VisibleForTesting; Loading Loading @@ -1290,8 +1290,8 @@ public final class UiAutomation { display.getRealSize(displaySize); // Take the screenshot ScreenCapture.SynchronousScreenCaptureListener syncScreenCapture = ScreenCapture.createSyncCaptureListener(); ScreenCaptureInternal.SynchronousScreenCaptureListener syncScreenCapture = ScreenCaptureInternal.createSyncCaptureListener(); try { if (!mUiAutomationConnection.takeScreenshot( new Rect(0, 0, displaySize.x, displaySize.y), syncScreenCapture, mDisplayId)) { Loading Loading @@ -1350,8 +1350,8 @@ public final class UiAutomation { display.getRealSize(displaySize); // Take the screenshot ScreenCapture.SynchronousScreenCaptureListener syncScreenCapture = ScreenCapture.createSyncCaptureListener(); ScreenCaptureInternal.SynchronousScreenCaptureListener syncScreenCapture = ScreenCaptureInternal.createSyncCaptureListener(); try { if (!mUiAutomationConnection.takeScreenshot( new Rect(0, 0, displaySize.x, displaySize.y), syncScreenCapture, displayId)) { Loading Loading @@ -1419,8 +1419,8 @@ public final class UiAutomation { // Apply a sync transaction to ensure SurfaceFlinger is flushed before capturing a // screenshot. new SurfaceControl.Transaction().apply(true); ScreenCapture.SynchronousScreenCaptureListener syncScreenCapture = ScreenCapture.createSyncCaptureListener(); ScreenCaptureInternal.SynchronousScreenCaptureListener syncScreenCapture = ScreenCaptureInternal.createSyncCaptureListener(); try { if (!mUiAutomationConnection.takeSurfaceControlScreenshot(sc, syncScreenCapture)) { Log.e(LOG_TAG, "Failed to take screenshot for window=" + window); Loading @@ -1430,7 +1430,8 @@ public final class UiAutomation { Log.e(LOG_TAG, "Error while taking screenshot!", re); return null; } ScreenCapture.ScreenshotHardwareBuffer captureBuffer = syncScreenCapture.getBuffer(); ScreenCaptureInternal.ScreenshotHardwareBuffer captureBuffer = syncScreenCapture.getBuffer(); if (captureBuffer == null) { Log.e(LOG_TAG, "Failed to take screenshot for window=" + window); return null; Loading
core/java/android/app/UiAutomationConnection.java +12 −11 Original line number Diff line number Diff line Loading @@ -47,8 +47,8 @@ import android.view.WindowAnimationFrameStats; import android.view.WindowContentFrameStats; import android.view.accessibility.AccessibilityEvent; import android.view.accessibility.IAccessibilityManager; import android.window.ScreenCapture; import android.window.ScreenCapture.CaptureArgs; import android.window.ScreenCaptureInternal; import android.window.ScreenCaptureInternal.CaptureArgs; import libcore.io.IoUtils; Loading Loading @@ -226,8 +226,8 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { } @Override public boolean takeScreenshot(Rect crop, ScreenCapture.ScreenCaptureListener listener, int displayId) { public boolean takeScreenshot( Rect crop, ScreenCaptureInternal.ScreenCaptureListener listener, int displayId) { synchronized (mLock) { throwIfCalledByNotTrustedUidLocked(); throwIfShutdownLocked(); Loading @@ -251,8 +251,9 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { @Nullable @Override public boolean takeSurfaceControlScreenshot(@NonNull SurfaceControl surfaceControl, ScreenCapture.ScreenCaptureListener listener) { public boolean takeSurfaceControlScreenshot( @NonNull SurfaceControl surfaceControl, ScreenCaptureInternal.ScreenCaptureListener listener) { synchronized (mLock) { throwIfCalledByNotTrustedUidLocked(); throwIfShutdownLocked(); Loading @@ -261,11 +262,11 @@ public final class UiAutomationConnection extends IUiAutomationConnection.Stub { final long identity = Binder.clearCallingIdentity(); try { ScreenCapture.LayerCaptureArgs args = new ScreenCapture.LayerCaptureArgs.Builder(surfaceControl) ScreenCaptureInternal.LayerCaptureArgs args = new ScreenCaptureInternal.LayerCaptureArgs.Builder(surfaceControl) .setChildrenOnly(false) .build(); int status = ScreenCapture.captureLayers(args, listener); int status = ScreenCaptureInternal.captureLayers(args, listener); if (status != 0) { return false; Loading
core/java/android/hardware/display/DisplayManagerInternal.java +8 −8 Original line number Diff line number Diff line Loading @@ -33,7 +33,7 @@ import android.view.SurfaceControl; import android.view.SurfaceControl.RefreshRateRange; import android.view.SurfaceControl.Transaction; import android.window.DisplayWindowPolicyController; import android.window.ScreenCapture; import android.window.ScreenCaptureInternal; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; Loading Loading @@ -116,23 +116,23 @@ public abstract class DisplayManagerInternal { public abstract void unregisterDisplayGroupListener(DisplayGroupListener listener); /** * Screenshot for internal system-only use such as rotation, etc. This method includes * secure layers and the result should never be exposed to non-system applications. * This method does not apply any rotation and provides the output in natural orientation. * Screenshot for internal system-only use such as rotation, etc. This method includes secure * layers and the result should never be exposed to non-system applications. This method does * not apply any rotation and provides the output in natural orientation. * * @param displayId The display id to take the screenshot of. * @return The buffer or null if we have failed. */ public abstract ScreenCapture.ScreenshotHardwareBuffer systemScreenshot(int displayId); public abstract ScreenCaptureInternal.ScreenshotHardwareBuffer systemScreenshot(int displayId); /** * General screenshot functionality that excludes secure layers and applies appropriate * rotation that the device is currently in. * General screenshot functionality that excludes secure layers and applies appropriate rotation * that the device is currently in. * * @param displayId The display id to take the screenshot of. * @return The buffer or null if we have failed. */ public abstract ScreenCapture.ScreenshotHardwareBuffer userScreenshot(int displayId); public abstract ScreenCaptureInternal.ScreenshotHardwareBuffer userScreenshot(int displayId); /** * Returns information about the specified logical display. Loading