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

Commit be994e29 authored by Michael W's avatar Michael W
Browse files

AppOps: Add info if app doesn't request any blockable permissions

* Instead of only showing a blank page, actually show an info
* This makes the screen look like it's actually blank on
  purpose

Change-Id: Ibae3ada4ecf8559c3000028f80ff5cf054410699
parent b6852336
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -226,6 +226,7 @@
    <string name="app_ops_allowed_count">Allowed <xliff:g id="count" example="2 times">%s</xliff:g></string>
    <string name="app_ops_ignored_count">Denied <xliff:g id="count" example="2 times">%s</xliff:g></string>
    <string name="app_ops_both_count">Allowed <xliff:g id="count">%1$s</xliff:g>, denied <xliff:g id="count">%2$s</xliff:g></string>
    <string name="app_ops_no_blockable_permissions">No permissions available to block</string>

    <!-- App ops menu options -->
    <string name="app_ops_show_user_apps">Show user apps</string>
+9 −0
Original line number Diff line number Diff line
@@ -268,6 +268,15 @@ public class AppOpsDetails extends SettingsPreferenceFragment {
            }
        }

        if (mPreferenceScreen.getPreferenceCount() == 0) {
            Preference emptyPref = new Preference(getActivity());
            emptyPref.setTitle(R.string.app_ops_no_blockable_permissions);
            emptyPref.setSelectable(false);
            emptyPref.setEnabled(false);

            mPreferenceScreen.addPreference(emptyPref);
        }

        return true;
    }