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

Commit d7608c84 authored by Matías Hernández's avatar Matías Hernández Committed by Automerger Merge Worker
Browse files

DO NOT MERGE Don't hide approved NLSes in Settings am: 173cc267

parents 8befc274 173cc267
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -94,12 +94,6 @@ public class NotificationAccessSettings extends EmptyTextSettings {
                .setNoun(CONFIG.noun)
                .setSetting(CONFIG.setting)
                .setTag(CONFIG.tag)
                .setValidator(info -> {
                    if (info.getComponentName().flattenToString().length() > MAX_CN_LENGTH) {
                        return false;
                    }
                    return true;
                })
                .build();
        mServiceListing.addCallback(this::updateList);
        setPreferenceScreen(getPreferenceManager().createPreferenceScreen(mContext));
@@ -140,6 +134,11 @@ public class NotificationAccessSettings extends EmptyTextSettings {
        services.sort(new PackageItemInfo.DisplayNameComparator(mPm));
        for (ServiceInfo service : services) {
            final ComponentName cn = new ComponentName(service.packageName, service.name);
            boolean isAllowed = mNm.isNotificationListenerAccessGranted(cn);
            if (!isAllowed && cn.flattenToString().length() > MAX_CN_LENGTH) {
                continue;
            }

            CharSequence title = null;
            try {
                title = mPm.getApplicationInfoAsUser(
@@ -154,7 +153,7 @@ public class NotificationAccessSettings extends EmptyTextSettings {
            pref.setIcon(mIconDrawableFactory.getBadgedIcon(service, service.applicationInfo,
                    UserHandle.getUserId(service.applicationInfo.uid)));
            pref.setKey(cn.flattenToString());
            pref.setSummary(mNm.isNotificationListenerAccessGranted(cn)
            pref.setSummary(isAllowed
                    ? R.string.app_permission_summary_allowed
                    : R.string.app_permission_summary_not_allowed);
            if (managedProfileId != UserHandle.USER_NULL