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

Commit 9564a662 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Show message when no apps/permissions are allowed/denied."

parents c5891061 dcd7ff48
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -395,6 +395,18 @@
    <!-- Permission justification string when not all justfications are defined [CHAR LIMIT=none] -->
    <string name="permission_justification_undefined">The app developer did not specify how the app uses your data.</string>

    <!-- Label when app has been granted no permissions [CHAR LIMIT=none] -->
    <string name="no_permissions_allowed">No permissions allowed</string>

    <!-- Label when app has been denied no permissions [CHAR LIMIT=none] -->
    <string name="no_permissions_denied">No permissions denied</string>

    <!-- Label when no apps have been granted a given permission [CHAR LIMIT=none] -->
    <string name="no_apps_allowed">No apps allowed</string>

    <!-- Label when no apps have been denied a given permission [CHAR LIMIT=none] -->
    <string name="no_apps_denied">No apps denied</string>

    <!-- Title for page of managing default apps. [CHAR LIMIT=30] -->
    <string name="default_apps">Default apps</string>

+11 −0
Original line number Diff line number Diff line
@@ -270,6 +270,17 @@ public final class AppPermissionsFragment extends SettingsWithHeader {
            category.addPreference(extraPerms);
        }

        if (allowed.getPreferenceCount() == 0) {
            Preference empty = new Preference(context);
            empty.setTitle(getString(R.string.no_permissions_allowed));
            allowed.addPreference(empty);
        }
        if (denied.getPreferenceCount() == 0) {
            Preference empty = new Preference(context);
            empty.setTitle(getString(R.string.no_permissions_denied));
            denied.addPreference(empty);
        }

        setLoading(false /* loading */, true /* animate */);
    }

+11 −0
Original line number Diff line number Diff line
@@ -317,6 +317,17 @@ public final class PermissionAppsFragment extends PermissionsFrameFragment imple
                    grantedCount, mExtraScreen.getPreferenceCount()));
        }

        if (allowed.getPreferenceCount() == 0) {
            Preference empty = new Preference(context);
            empty.setTitle(getString(R.string.no_apps_allowed));
            allowed.addPreference(empty);
        }
        if (denied.getPreferenceCount() == 0) {
            Preference empty = new Preference(context);
            empty.setTitle(getString(R.string.no_apps_denied));
            denied.addPreference(empty);
        }

        setLoading(false /* loading */, true /* animate */);

        if (mOnPermissionsLoadedListener != null) {