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 ObjectShadow ofDisplayEventReceiver. TheChoreographeris a subclass ofDisplayEventReceiver, and receives vsync events from the display indicating the frequency that frames should be generated.The
ShadowDisplayEventReceivercan run in either a paused mode or a non-paused mode, seeShadowChoreographer.isPaused()andShadowChoreographer.setPaused(boolean). By default it runs unpaused, and each time a frame callback is scheduled with theChoreographerthe clock is advanced to the next frame, configured byShadowChoreographer.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 theShadowLooper.
-
-
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
All Methods Static Methods Instance Methods Concrete Methods 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 voidnativeScheduleVsync(int receiverPtr)protected static voidnativeScheduleVsync(long receiverPtr)protected voidonVsync()
-
-
-
Field Detail
-
realReceiver
@RealObject protected DisplayEventReceiver realReceiver
-
-
Method Detail
-
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
@Implementation(maxSdk=19) protected static int nativeInit(Object receiver, Object msgQueue)
-
nativeInit
@Implementation(minSdk=30) protected static long nativeInit(WeakReference<DisplayEventReceiver> receiver, MessageQueue msgQueue, int vsyncSource, int configChanged)
-
nativeDispose
@Implementation(minSdk=20) protected static void nativeDispose(long receiverPtr)
-
nativeDispose
@Implementation(maxSdk=19) protected static void nativeDispose(int receiverPtr)
-
nativeScheduleVsync
@Implementation(minSdk=20) protected static void nativeScheduleVsync(long receiverPtr)
-
nativeScheduleVsync
@Implementation(maxSdk=19) protected static void nativeScheduleVsync(int receiverPtr)
-
dispose
@Implementation(minSdk=17, maxSdk=30) protected void dispose(boolean finalized)
-
onVsync
protected void onVsync()
-
getLatestVsyncEventData
@Implementation(minSdk=33) protected Object getLatestVsyncEventData()
-
-