Code example for Instrumentation

Methods: getContext

0
  protected boolean isTouchStateReleased() { 
    return downTime == UNDEFINED_TIME;
  } 
 
  protected int getScaledTouchSlopAdjustment() { 
    int touchSlop = ViewConfiguration.get(instrumentation.getContext())
        .getScaledTouchSlop();
    return touchSlop / 2;
  } 
 
  private void updateActiveCoordinates(Coordinates coordinates) {
    if (coordinates != null) {
      currentActiveCoordinates = coordinates;
    } else if (currentActiveCoordinates == null) {
      throw new IllegalStateException(
          "No current active coordinates and given coordinates is null."); 
    } 
  } 
 
  private void setTouchStateReleased() { 
    downTime = UNDEFINED_TIME;