Add page Settings->Security & lock screen->Lock screen preferences.
- add the new preference screen that contains configuration for lock
screen notification, add user when locked, and owner info.
- refactor SecuritySettings to use the new owner info controller.
Fix: 36163515
Test: make RunSettingsRoboTests
Change-Id: I3bada8f652f89ed0af7aebc03f0bf2f637296b4d
diff --git a/res/xml/security_lockscreen_settings.xml b/res/xml/security_lockscreen_settings.xml
new file mode 100644
index 0000000..e151b2b
--- /dev/null
+++ b/res/xml/security_lockscreen_settings.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2017 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<PreferenceScreen
+ xmlns:android="http://schemas.android.com/apk/res/android"
+ android:title="@string/lockscreen_settings_title">
+
+ <com.android.settings.notification.RestrictedDropDownPreference
+ android:key="lock_screen_notifications"
+ android:title="@string/lock_screen_notifications_title"
+ android:summary="%s"/>
+
+ <com.android.settingslib.RestrictedSwitchPreference
+ android:key="add_users_when_locked"
+ android:title="@string/user_add_on_lockscreen_menu"/>
+
+ <com.android.settingslib.RestrictedPreference
+ android:key="owner_info_settings"
+ android:title="@string/owner_info_settings_title"
+ android:summary="@string/owner_info_settings_summary"/>
+
+</PreferenceScreen>
diff --git a/res/xml/security_settings_chooser.xml b/res/xml/security_settings_chooser.xml
index 6438771..dc6e727 100644
--- a/res/xml/security_settings_chooser.xml
+++ b/res/xml/security_settings_chooser.xml
@@ -29,6 +29,11 @@
settings:keywords="@string/keywords_lockscreen"
android:persistent="false"/>
+ <Preference android:key="lockscreen_preferences"
+ android:title="@string/lockscreen_settings_title"
+ android:summary="@string/lockscreen_settings_summary"
+ android:fragment="com.android.settings.security.LockscreenDashboardFragment"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_password.xml b/res/xml/security_settings_password.xml
index 57f19eb..e3a5dfd 100644
--- a/res/xml/security_settings_password.xml
+++ b/res/xml/security_settings_password.xml
@@ -28,6 +28,11 @@
android:summary="@string/unlock_set_unlock_mode_password"
settings:keywords="@string/keywords_lockscreen" />
+ <Preference android:key="lockscreen_preferences"
+ android:title="@string/lockscreen_settings_title"
+ android:summary="@string/lockscreen_settings_summary"
+ android:fragment="com.android.settings.security.LockscreenDashboardFragment"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_pattern.xml b/res/xml/security_settings_pattern.xml
index ad57e82..295e896 100644
--- a/res/xml/security_settings_pattern.xml
+++ b/res/xml/security_settings_pattern.xml
@@ -28,6 +28,11 @@
android:summary="@string/unlock_set_unlock_mode_pattern"
settings:keywords="@string/keywords_lockscreen" />
+ <Preference android:key="lockscreen_preferences"
+ android:title="@string/lockscreen_settings_title"
+ android:summary="@string/lockscreen_settings_summary"
+ android:fragment="com.android.settings.security.LockscreenDashboardFragment"/>
+
</PreferenceCategory>
</PreferenceScreen>
diff --git a/res/xml/security_settings_pin.xml b/res/xml/security_settings_pin.xml
index 31a57a2..5613177 100644
--- a/res/xml/security_settings_pin.xml
+++ b/res/xml/security_settings_pin.xml
@@ -28,6 +28,11 @@
android:summary="@string/unlock_set_unlock_mode_pin"
settings:keywords="@string/keywords_lockscreen" />
+ <Preference android:key="lockscreen_preferences"
+ android:title="@string/lockscreen_settings_title"
+ android:summary="@string/lockscreen_settings_summary"
+ android:fragment="com.android.settings.security.LockscreenDashboardFragment"/>
+
</PreferenceCategory>
</PreferenceScreen>