Class ShadowCall

java.lang.Object
org.robolectric.shadows.ShadowCall

@Implements(Call.class) public class ShadowCall extends Object
Robolectric test for Call.
  • Constructor Details

    • ShadowCall

      public ShadowCall()
  • Method Details

    • sendRttRequest

      @Implementation(minSdk=28) protected void sendRttRequest()
    • hasSentRttRequest

      public boolean hasSentRttRequest()
      Determines whether sendRttRequest() was called.
      Returns:
      true if sendRttRequest() was called, false otherwise.
    • clearHasSentRttRequest

      public void clearHasSentRttRequest()
      "Forgets" that sendRttRequest() was called.
    • respondToRttRequest

      @Implementation(minSdk=28) protected void respondToRttRequest(int id, boolean accept)
    • hasRespondedToRttRequest

      public boolean hasRespondedToRttRequest()
      Determines whether respondToRttRequest() was called.
      Returns:
      True if respondToRttRequest() was called, false otherwise.
    • setState

      public void setState(int state)
      Sets the state of the Call.
      Parameters:
      state - the new state of the call (e.g., Call.STATE_RINGING).
    • setDetails

      public void setDetails(Call.Details details)
      Sets the Call.Details of the Call.
      Parameters:
      details - the details to attach to this call.
    • triggerStateChanged

      public void triggerStateChanged(int state)
      Simulates a call state change by notifying all registered Call.Callback instances.
      Parameters:
      state - the new call state to pass to the callbacks.
    • triggerDetailsChanged

      public void triggerDetailsChanged(Call.Details details)
      Simulates a call details change by notifying all registered Call.Callback instances.
      Parameters:
      details - the new call details to pass to the callbacks.
    • triggerCallDestroyed

      public void triggerCallDestroyed()
      Simulates the destruction of the call by notifying all registered Call.Callback instances.
    • setInCallAdapter

      public void setInCallAdapter(Object adapter)
      Sets the InCallAdapter of the Call.
      Parameters:
      adapter - the adapter to attach to this call.
    • getId

      public String getId()