Merge "Convert some security setting logic to PreferenceController"