Interface RemoteControl

All Known Implementing Classes:
NoOpRemoteControl

public interface RemoteControl
Connects a Robolectric process to a remote control.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    connect(UiAutomation uiAutomation, Looper looper)
    Connects the RemoteControl to the Simulator.
    void
    Disconnects the RemoteControl, shutting down any running jobs within the timeout.
    void
    onCycle(long uptimeNanos)
    Informs the RemoteControl that the Simulator has gone through another cycle.
  • Method Details

    • connect

      void connect(UiAutomation uiAutomation, Looper looper)
      Connects the RemoteControl to the Simulator.
    • onCycle

      void onCycle(long uptimeNanos)
      Informs the RemoteControl that the Simulator has gone through another cycle.

      Since this is called in every cycle, it needs to be *fast*. Use it to signal other threads.

      Parameters:
      uptimeNanos - Current uptime.
    • disconnect

      void disconnect(Duration timeout)
      Disconnects the RemoteControl, shutting down any running jobs within the timeout.