Package org.robolectric.shadows
Class ShadowPixelCopy
java.lang.Object
org.robolectric.shadows.ShadowPixelCopy
@Implements(value=android.view.PixelCopy.class,
minSdk=26,
looseSignatures=true)
public class ShadowPixelCopy
extends Object
Shadow for PixelCopy that uses View.draw to create screenshots. The real PixelCopy performs a
full hardware capture of the screen at the given location, which is impossible in Robolectric.
If listenerThread is backed by a paused looper, make sure to call ShadowLooper.idle() to ensure the screenshot finishes.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected static void
request
(Surface source, Rect srcRect, Bitmap dest, PixelCopy.OnPixelCopyFinishedListener listener, Handler listenerThread) protected static void
request
(SurfaceView source, Bitmap dest, PixelCopy.OnPixelCopyFinishedListener listener, Handler listenerThread) protected static void
request
(SurfaceView source, Rect srcRect, Bitmap dest, PixelCopy.OnPixelCopyFinishedListener listener, Handler listenerThread) protected static void
request
(Window source, Bitmap dest, PixelCopy.OnPixelCopyFinishedListener listener, Handler listenerThread) protected static void
request
(Window source, Rect srcRect, Bitmap dest, PixelCopy.OnPixelCopyFinishedListener listener, Handler listenerThread) protected static void
-
Constructor Details
-
ShadowPixelCopy
public ShadowPixelCopy()
-
-
Method Details
-
request
@Implementation protected static void request(SurfaceView source, @NonNull Bitmap dest, @NonNull PixelCopy.OnPixelCopyFinishedListener listener, @NonNull Handler listenerThread) -
request
@Implementation protected static void request(@NonNull SurfaceView source, @Nullable Rect srcRect, @NonNull Bitmap dest, @NonNull PixelCopy.OnPixelCopyFinishedListener listener, @NonNull Handler listenerThread) -
request
@Implementation protected static void request(@NonNull Window source, @NonNull Bitmap dest, @NonNull PixelCopy.OnPixelCopyFinishedListener listener, @NonNull Handler listenerThread) -
request
@Implementation protected static void request(@NonNull Window source, @Nullable Rect srcRect, @NonNull Bitmap dest, @NonNull PixelCopy.OnPixelCopyFinishedListener listener, @NonNull Handler listenerThread) -
request
@Implementation protected static void request(@NonNull Surface source, @Nullable Rect srcRect, @NonNull Bitmap dest, @NonNull PixelCopy.OnPixelCopyFinishedListener listener, @NonNull Handler listenerThread) -
request
@Implementation(minSdk=34) protected static void request(Object requestObject, Object callbackExecutor, Object listener)
-