shadows/framework/src/main/java/org/robolectric/shadows/ShadowWindowManagerImpl.java
public static void configureDefaultDisplayForJBOnly(
      Configuration configuration, DisplayMetrics displayMetrics) {
    Class<?> arg2Type = ReflectionHelpers.loadClass(ShadowWindowManagerImpl.class.getClassLoader(),
        "android.view.CompatibilityInfoHolder");

    defaultDisplayJB = ReflectionHelpers.callConstructor(Display.class,
        ClassParameter.from(int.class, 0),
        ClassParameter.from(arg2Type, null));
    ShadowDisplay shadowDisplay = Shadow.extract(defaultDisplayJB);
    shadowDisplay.configureForJBOnly(configuration, displayMetrics);
  }
public static void configureDefaultDisplayForJBOnly(
      Configuration configuration, DisplayMetrics displayMetrics) {
    Class<?> arg2Type = ReflectionHelpers.loadClass(ShadowWindowManagerImpl.class.getClassLoader(),
        "android.view.CompatibilityInfoHolder");

    defaultDisplayJB = ReflectionHelpers.callConstructor(Display.class,
        ClassParameter.from(int.class, 0),
        ClassParameter.from(arg2Type, null));
    ShadowDisplay shadowDisplay = Shadow.extract(defaultDisplayJB);
    shadowDisplay.configureForJBOnly(configuration, displayMetrics);
  }
internal only