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

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

Merge changes Ic95d219b,I58d82cbc

* changes:
  Don't add any trust agents if the controller is not available.
  Introduce boolean flags to show/hide items in Security & location.
parents e1bb0c2f cf6d8410
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -120,6 +120,24 @@
    <!-- Whether vibrate_input_devices should be shown or not. -->
    <bool name="config_show_vibrate_input_devices">true</bool>

    <!-- Whether manage_device_admin should be shown or not. -->
    <bool name="config_show_manage_device_admin">true</bool>

    <!-- Whether unlock_set_or_change should be shown or not. -->
    <bool name="config_show_unlock_set_or_change">true</bool>

    <!-- Whether screen_pinning_settings should be shown or not. -->
    <bool name="config_show_screen_pinning_settings">true</bool>

    <!-- Whether manage_trust_agents should be shown or not. -->
    <bool name="config_show_manage_trust_agents">true</bool>

    <!-- Whether show_password should be shown or not. -->
    <bool name="config_show_show_password">true</bool>

    <!-- Whether trust_agent_click_intent should be shown or not. -->
    <bool name="config_show_trust_agent_click_intent">true</bool>

    <!-- Whether wallpaper attribution should be shown or not. -->
    <bool name="config_show_wallpaper_attribution">true</bool>

+1 −1
Original line number Diff line number Diff line
@@ -45,7 +45,7 @@ public class ManageDeviceAdminPreferenceController extends AbstractPreferenceCon

    @Override
    public boolean isAvailable() {
        return true;
        return mContext.getResources().getBoolean(R.bool.config_show_manage_device_admin);
    }

    @Override
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ public class ChangeScreenLockPreferenceController extends AbstractPreferenceCont

    @Override
    public boolean isAvailable() {
        return true;
        return mContext.getResources().getBoolean(R.bool.config_show_unlock_set_or_change);
    }

    @Override
+2 −1
Original line number Diff line number Diff line
@@ -33,7 +33,8 @@ public class ScreenPinningPreferenceController extends BasePreferenceController

    @Override
    public int getAvailabilityStatus() {
        return AVAILABLE;
        return mContext.getResources().getBoolean(R.bool.config_show_screen_pinning_settings)
                ? AVAILABLE : DISABLED_UNSUPPORTED;
    }

    @Override
+4 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.provider.Settings;
import com.android.internal.widget.LockPatternUtils;
import com.android.settings.core.TogglePreferenceController;
import com.android.settings.overlay.FeatureFactory;
import com.android.settings.R;

public class ShowPasswordPreferenceController extends TogglePreferenceController {

@@ -53,7 +54,9 @@ public class ShowPasswordPreferenceController extends TogglePreferenceController

    @Override
    public int getAvailabilityStatus() {
        return AVAILABLE;
        return mContext.getResources().getBoolean(R.bool.config_show_show_password)
                ? AVAILABLE : DISABLED_UNSUPPORTED;
    }

}
Loading