Package org.robolectric.shadows
Class ShadowDisplayEventReceiver
java.lang.Object
org.robolectric.shadows.ShadowDisplayEventReceiver
@Implements(className="android.view.DisplayEventReceiver", isInAndroidSdk=false, looseSignatures=true) public class ShadowDisplayEventReceiver extends Object
Shadow of
DisplayEventReceiver. The Choreographer is a subclass of DisplayEventReceiver, and receives vsync events from the display indicating the frequency that
frames should be generated.
The ShadowDisplayEventReceiver can run in either a paused mode or a non-paused mode,
see ShadowChoreographer.isPaused() and ShadowChoreographer.setPaused(boolean). By
default it runs unpaused, and each time a frame callback is scheduled with the Choreographer the clock is advanced to the next frame, configured by ShadowChoreographer.setFrameDelay(Duration). In paused mode the clock is not auto advanced and
the next frame will only trigger when the clock is advance manually or via the ShadowLooper.
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static interfaceShadowDisplayEventReceiver.DisplayEventReceiverReflectorReflector interface forDisplayEventReceiver's internals. -
Field Summary
Fields Modifier and Type Field Description protected DisplayEventReceiverrealReceiver -
Constructor Summary
Constructors Constructor Description ShadowDisplayEventReceiver() -
Method Summary
Modifier and Type Method Description protected voiddispose(boolean finalized)protected ObjectgetLatestVsyncEventData()protected static voidnativeDispose(int receiverPtr)protected static voidnativeDispose(long receiverPtr)protected static longnativeInit(DisplayEventReceiver receiver, MessageQueue msgQueue)protected static intnativeInit(Object receiver, Object msgQueue)protected static longnativeInit(WeakReference<DisplayEventReceiver> receiver, MessageQueue msgQueue)protected static longnativeInit(WeakReference<DisplayEventReceiver> receiver, MessageQueue msgQueue, int vsyncSource)protected static longnativeInit(WeakReference<DisplayEventReceiver> receiver, MessageQueue msgQueue, int vsyncSource, int configChanged)protected static longnativeInit(WeakReference<DisplayEventReceiver> receiver, WeakReference<Object> vsyncEventData, MessageQueue msgQueue, int vsyncSource, int eventRegistration, long layerHandle)protected static voidnativeScheduleVsync(int receiverPtr)protected static voidnativeScheduleVsync(long receiverPtr)protected voidonVsync()
-
Field Details
-
Constructor Details
-
ShadowDisplayEventReceiver
public ShadowDisplayEventReceiver()
-
-
Method Details
-
nativeInit
@Implementation(minSdk=26, maxSdk=29) protected static long nativeInit(WeakReference<DisplayEventReceiver> receiver, MessageQueue msgQueue, int vsyncSource) -
nativeInit
@Implementation(minSdk=23, maxSdk=25) protected static long nativeInit(WeakReference<DisplayEventReceiver> receiver, MessageQueue msgQueue) -
nativeInit
@Implementation(minSdk=20, maxSdk=22) protected static long nativeInit(DisplayEventReceiver receiver, MessageQueue msgQueue) -
nativeInit
-
nativeInit
@Implementation(minSdk=30, maxSdk=33) protected static long nativeInit(WeakReference<DisplayEventReceiver> receiver, MessageQueue msgQueue, int vsyncSource, int configChanged) -
nativeInit
@Implementation(minSdk=10000) protected static long nativeInit(WeakReference<DisplayEventReceiver> receiver, WeakReference<Object> vsyncEventData, MessageQueue msgQueue, int vsyncSource, int eventRegistration, long layerHandle) -
nativeDispose
-
nativeDispose
-
nativeScheduleVsync
-
nativeScheduleVsync
-
dispose
-
onVsync
protected void onVsync() -
getLatestVsyncEventData
-