code: public void setYdpi(float ydpi) {
      if (isJB()) {
        this.ydpi = ydpi;
      } else {
        ShadowDisplayManager.changeDisplay(realObject.getDisplayId(),
            di -> di.physicalYDpi = ydpi);
      }
    }
docs: Changes the vertical DPI for this display.
  
  Any registered {@link android.hardware.display.DisplayManager.DisplayListener}s will be
  notified of the change.