@Override
    public void detach() {
      dispatchDetach(mView);
      sAttachments.remove(mView);
    }
Simulates the view as being attached.
core/src/main/java/com/facebook/testing/screenshot/WindowAttachment.java