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

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

Merge "Settings: Can't unpin screen."

parents 41f5a6e5 ad022307
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

package com.android.settings;


import android.app.Activity;
import android.app.AlertDialog;
import android.app.AppOpsManager;
@@ -434,6 +433,15 @@ public class SecuritySettings extends SettingsPreferenceFragment
        PreferenceGroup advancedCategory =
                (PreferenceGroup)root.findPreference(KEY_ADVANCED_SECURITY);
        if (advancedCategory != null) {

            boolean hasNavBar = getActivity().getResources().getBoolean(
                    com.android.internal.R.bool.config_showNavigationBar);
            Preference screenPinning =
                    advancedCategory.findPreference(KEY_SCREEN_PINNING);
            if (!hasNavBar) {
                advancedCategory.removePreference(screenPinning);
            }

            Preference manageAgents = advancedCategory.findPreference(KEY_MANAGE_TRUST_AGENTS);
            if (manageAgents != null && !mLockPatternUtils.isSecure()) {
                manageAgents.setEnabled(false);