1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2008 The Android Open Source Project
3
4     Licensed under the Apache License, Version 2.0 (the "License");
5     you may not use this file except in compliance with the License.
6     You may obtain a copy of the License at
7
8          http://www.apache.org/licenses/LICENSE-2.0
9
10     Unless required by applicable law or agreed to in writing, software
11     distributed under the License is distributed on an "AS IS" BASIS,
12     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13     See the License for the specific language governing permissions and
14     limitations under the License.
15-->
16
17<PreferenceScreen
18    xmlns:android="http://schemas.android.com/apk/res/android"
19    xmlns:settings="http://schemas.android.com/apk/res-auto"
20    android:title="@string/date_and_time"
21    settings:keywords="@string/keywords_date_and_time">
22
23    <com.android.settingslib.RestrictedSwitchPreference
24        android:key="auto_time"
25        android:title="@string/date_time_auto"
26        settings:useAdditionalSummary="true"
27        settings:userRestriction="no_config_date_time"
28        settings:controller="com.android.settings.datetime.AutoTimePreferenceController" />
29
30    <com.android.settingslib.RestrictedPreference
31        android:key="date"
32        android:title="@string/date_time_set_date_title"
33        android:summary="@string/summary_placeholder"
34        settings:userRestriction="no_config_date_time"
35        settings:controller="com.android.settings.datetime.DatePreferenceController" />
36
37    <com.android.settingslib.RestrictedPreference
38        android:key="time"
39        android:title="@string/date_time_set_time_title"
40        android:summary="@string/summary_placeholder"
41        settings:userRestriction="no_config_date_time"
42        settings:controller="com.android.settings.datetime.TimePreferenceController" />
43
44    <PreferenceCategory
45        android:key="timezone_preference_category"
46        android:title="@string/date_time_set_timezone_title">
47
48        <com.android.settingslib.RestrictedSwitchPreference
49            android:key="auto_zone"
50            android:title="@string/zone_auto_title"
51            settings:userRestriction="no_config_date_time"
52            settings:controller="com.android.settings.datetime.AutoTimeZonePreferenceController" />
53
54        <com.android.settingslib.widget.BannerMessagePreference
55            android:key="location_time_zone_detection_status"
56            android:title="@string/location_time_zone_detection_status_title"
57            settings:controller="com.android.settings.datetime.LocationProviderStatusPreferenceController"/>
58
59        <!-- This preference gets removed if location-based time zone detection is not supported -->
60        <SwitchPreferenceCompat
61            android:key="location_time_zone_detection"
62            android:title="@string/location_time_zone_detection_toggle_title"
63            settings:controller="com.android.settings.datetime.LocationTimeZoneDetectionPreferenceController"/>
64
65        <com.android.settingslib.RestrictedPreference
66            android:key="timezone"
67            android:title="@string/date_time_set_timezone_title"
68            android:summary="@string/summary_placeholder"
69            android:fragment="com.android.settings.datetime.timezone.TimeZoneSettings"
70            settings:userRestriction="no_config_date_time"
71            settings:keywords="@string/keywords_time_zone"
72            settings:controller="com.android.settings.datetime.TimeZonePreferenceController" />
73
74    </PreferenceCategory>
75
76    <!-- An optional preference category for feedback. Only displayed up if enabled via flags and config. -->
77    <PreferenceCategory
78            android:key="time_feedback_preference_category"
79            android:title="@string/time_feedback_category_title"
80            settings:keywords="@string/keywords_time_feedback_category"
81            settings:controller="com.android.settings.datetime.TimeFeedbackPreferenceCategoryController">
82
83        <Preference
84                android:key="time_feedback"
85                android:title="@string/time_feedback_title"
86                settings:keywords="@string/keywords_time_feedback"
87                settings:controller="com.android.settings.datetime.TimeFeedbackPreferenceController" />
88
89    </PreferenceCategory>
90
91    <PreferenceCategory
92        android:key="time_format_preference_category"
93        android:title="@string/time_format_category_title"
94        settings:keywords="@string/keywords_time_format">
95        <SwitchPreferenceCompat
96            android:key="auto_24hour"
97            android:title="@string/date_time_24hour_auto"
98            settings:controller="com.android.settings.datetime.AutoTimeFormatPreferenceController" />
99
100        <SwitchPreferenceCompat
101            android:key="24 hour"
102            android:title="@string/date_time_24hour"
103            settings:controller="com.android.settings.datetime.TimeFormatPreferenceController" />
104    </PreferenceCategory>
105
106</PreferenceScreen>
107