Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3cfa49e8 authored by Beverly's avatar Beverly
Browse files

Use title in ManagedServiceSetting dialogs

- Use the title (not summary) of the preference in its warning dialogs

Test: manual
Bug: 112687996
Change-Id: Ia217e5252cf7a48450da853c0270093ffb57dca7
parent dcfb96ac
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -122,6 +122,7 @@ public abstract class ManagedServiceSettings extends EmptyTextSettings {
                // unlikely, as we are iterating over live services.
                Log.e(TAG, "can't find package name", e);
            }
            final String finalTitle = title.toString();
            final String summary = service.loadLabel(mPm).toString();
            final SwitchPreference pref = new AppSwitchPreference(getPrefContext());
            pref.setPersistent(false);
@@ -142,7 +143,7 @@ public abstract class ManagedServiceSettings extends EmptyTextSettings {
            }
            pref.setOnPreferenceChangeListener((preference, newValue) -> {
                final boolean enable = (boolean) newValue;
                return setEnabled(cn, summary, enable);
                return setEnabled(cn, finalTitle, enable);
            });
            pref.setKey(cn.flattenToString());
            screen.addPreference(pref);