code: public static void configureDefaultDisplay(Configuration configuration, DisplayMetrics displayMetrics) {
      ShadowDisplayManagerGlobal shadowDisplayManagerGlobal = getShadowDisplayManagerGlobal();
      if (DisplayManagerGlobal.getInstance().getDisplayIds().length != 0) {
        throw new IllegalStateException("this method should only be called by Robolectric");
      }
  
      shadowDisplayManagerGlobal.addDisplay(createDisplayInfo(configuration, displayMetrics));
    }
docs: internal only