ConsentSettingsUi () { ConsentSettingsUi ui = new ConsentSettingsUi(true) { @Override public void apply(@NotNull List<Consent> consents) { super.apply(consents); AppUIUtil.saveConsents(consents); } }; // When building searchable options, ensure we return a non-empty UI if (ApplicationManager.getApplication().isHeadlessEnvironment()) { ui.reset(myConsents); } return ui; }