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

Commit b53d704f authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Disable CM blacklist feature (5/5)"

parents 85ea2939 d310c0bb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@
    xmlns:android="http://schemas.android.com/apk/res/android">

    <PreferenceCategory
        android:key="app_security"
        android:key="app_security_key"
        android:title="@string/app_security_title">

        <PreferenceScreen
+8 −2
Original line number Diff line number Diff line
@@ -121,7 +121,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
    private static final boolean ONLY_ONE_TRUST_AGENT = true;

    // CyanogenMod Additions
    private static final String KEY_APP_SECURITY_CATEGORY = "app_security";
    private static final String KEY_APP_SECURITY_CATEGORY = "app_security_key";
    private static final String KEY_BLACKLIST = "blacklist";

    private PackageManager mPM;
@@ -457,11 +457,17 @@ public class SecuritySettings extends SettingsPreferenceFragment
        mBlacklist = (PreferenceScreen) root.findPreference(KEY_BLACKLIST);

        // Determine options based on device telephony support
        if (!pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY)) {
        if (!pm.hasSystemFeature(PackageManager.FEATURE_TELEPHONY) ||
                !BlacklistUtils.isBlacklistFeaturePresent(getActivity())) {
            // No telephony, remove dependent options
            PreferenceGroup appCategory = (PreferenceGroup)
                    root.findPreference(KEY_APP_SECURITY_CATEGORY);
            appCategory.removePreference(mBlacklist);
            mBlacklist = null;

            if (appCategory.getPreferenceCount() == 0) {
                root.removePreference(appCategory);
            }
        }

        // The above preferences come and go based on security state, so we need to update