code: static void changeDisplay(int displayId, Consumer<DisplayConfig> consumer) {
      DisplayInfo displayInfo = DisplayManagerGlobal.getInstance().getDisplayInfo(displayId);
      if (displayInfo != null) {
        DisplayConfig displayConfig = new DisplayConfig(displayInfo);
        consumer.accept(displayConfig);
        displayConfig.copyTo(displayInfo);
        fixNominalDimens(displayInfo);
      }
  
      getShadowDisplayManagerGlobal().changeDisplay(displayId, displayInfo);
    }
docs: Changes properties of a simulated display. The original properties will be passed to the
  `consumer`, which may modify them in place. The display will be updated with the new
  properties.
  
  @param displayId the display id to change
  @param consumer a function which modifies the display properties