Fix 3201870: Move OwnerInfo settings to Location&Security.

This moves OwnerInfo into Location&Security and adds the
necessary logic to only show it in modes that make sense-
Lock (when not disabled) and Unlock (pattern, pin, password).

Change-Id: I3549dc4d956406aea3d63cd06d37bcea27a5b555
diff --git a/res/xml/security_settings_chooser.xml b/res/xml/security_settings_chooser.xml
index 095c69f..7b5d9c9 100644
--- a/res/xml/security_settings_chooser.xml
+++ b/res/xml/security_settings_chooser.xml
@@ -26,6 +26,12 @@
             android:summary="@string/unlock_set_unlock_launch_picker_summary"
             android:persistent="false"/>
 
+        <PreferenceScreen
+            android:fragment="com.android.settings.OwnerInfoSettings"
+            android:key="owner_info_settings"
+            android:title="@string/owner_info_settings_title"
+            android:summary="@string/owner_info_settings_summary"/>
+
     </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/res/xml/security_settings_lockscreen.xml b/res/xml/security_settings_lockscreen.xml
new file mode 100644
index 0000000..f66151d
--- /dev/null
+++ b/res/xml/security_settings_lockscreen.xml
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2010 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">
+
+    <PreferenceCategory
+        android:key="security_category"
+        android:title="@string/lock_settings_title">
+
+        <PreferenceScreen
+            android:key="unlock_set_or_change"
+            android:title="@string/unlock_set_unlock_launch_picker_enable_title"
+            android:summary="@string/unlock_set_unlock_launch_picker_enable_summary"
+            android:persistent="false"/>
+
+    </PreferenceCategory>
+
+</PreferenceScreen>
diff --git a/res/xml/security_settings_password.xml b/res/xml/security_settings_password.xml
index 6411091..369f9ce 100644
--- a/res/xml/security_settings_password.xml
+++ b/res/xml/security_settings_password.xml
@@ -25,9 +25,9 @@
             android:title="@string/lock_after_timeout"
             android:summary="@string/lock_after_timeout_summary"
             android:entries="@array/lock_after_timeout_entries"
-            android:entryValues="@array/lock_after_timeout_values" 
+            android:entryValues="@array/lock_after_timeout_values"
             android:persistent="false"/>
-            
+
         <PreferenceScreen
             android:key="unlock_set_or_change"
             android:title="@string/unlock_set_unlock_launch_picker_change_title"
@@ -38,6 +38,12 @@
             android:key="unlock_tactile_feedback"
             android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
 
+        <PreferenceScreen
+            android:fragment="com.android.settings.OwnerInfoSettings"
+            android:key="owner_info_settings"
+            android:title="@string/owner_info_settings_title"
+            android:summary="@string/owner_info_settings_summary"/>
+
     </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/res/xml/security_settings_pattern.xml b/res/xml/security_settings_pattern.xml
index 200c260..4ff9214 100644
--- a/res/xml/security_settings_pattern.xml
+++ b/res/xml/security_settings_pattern.xml
@@ -25,9 +25,9 @@
             android:title="@string/lock_after_timeout"
             android:summary="@string/lock_after_timeout_summary"
             android:entries="@array/lock_after_timeout_entries"
-            android:entryValues="@array/lock_after_timeout_values" 
+            android:entryValues="@array/lock_after_timeout_values"
             android:persistent="false"/>
-            
+
         <PreferenceScreen
             android:key="unlock_set_or_change"
             android:title="@string/unlock_set_unlock_launch_picker_change_title"
@@ -42,6 +42,12 @@
             android:key="unlock_tactile_feedback"
             android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
 
+        <PreferenceScreen
+            android:fragment="com.android.settings.OwnerInfoSettings"
+            android:key="owner_info_settings"
+            android:title="@string/owner_info_settings_title"
+            android:summary="@string/owner_info_settings_summary"/>
+
     </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/res/xml/security_settings_pin.xml b/res/xml/security_settings_pin.xml
index 31fa110..369f9ce 100644
--- a/res/xml/security_settings_pin.xml
+++ b/res/xml/security_settings_pin.xml
@@ -25,9 +25,9 @@
             android:title="@string/lock_after_timeout"
             android:summary="@string/lock_after_timeout_summary"
             android:entries="@array/lock_after_timeout_entries"
-            android:entryValues="@array/lock_after_timeout_values" 
+            android:entryValues="@array/lock_after_timeout_values"
             android:persistent="false"/>
-                
+
         <PreferenceScreen
             android:key="unlock_set_or_change"
             android:title="@string/unlock_set_unlock_launch_picker_change_title"
@@ -38,6 +38,12 @@
             android:key="unlock_tactile_feedback"
             android:title="@string/lockpattern_settings_enable_tactile_feedback_title"/>
 
+        <PreferenceScreen
+            android:fragment="com.android.settings.OwnerInfoSettings"
+            android:key="owner_info_settings"
+            android:title="@string/owner_info_settings_title"
+            android:summary="@string/owner_info_settings_summary"/>
+
     </PreferenceCategory>
 
 </PreferenceScreen>
diff --git a/res/xml/settings_headers.xml b/res/xml/settings_headers.xml
index 5c99c5f..e4b668b 100644
--- a/res/xml/settings_headers.xml
+++ b/res/xml/settings_headers.xml
@@ -151,14 +151,6 @@
         android:icon="@drawable/ic_settings_date_time"
         android:title="@string/date_and_time_settings_title" />
 
-    <!-- Owner info -->
-
-    <header
-        android:id="@+id/owner_info_settings"
-        android:fragment="com.android.settings.OwnerInfoSettings"
-        android:icon="@drawable/ic_settings_about"
-        android:title="@string/owner_info_settings_title" />
-
     <!-- About Device -->
 
     <header