private static void dispatchDetach(View view) {
    invoke(view, "dispatchDetachedFromWindow");
  }
Similar to dispatchAttach, except dispatchest the corresponding detach.
core/src/main/java/com/facebook/testing/screenshot/WindowAttachment.java