Add an Automatic Time Zone setting to Date & Time settings.

User can now enable auto-time but disable auto-timezone, especially
if we don't have NITZ time from the cell network (or wifi only)
and only have NTP time that gives us date and time.
This commit is contained in:
Amith Yamasani
2010-09-17 13:34:47 -07:00
parent 653abb13d8
commit 1bb6db5267
4 changed files with 88 additions and 66 deletions

View File

@@ -498,12 +498,22 @@
<string name="date_and_time_settings_title">Date &amp; time</string>
<!-- Main Settings screen setting option summary text for the item to go into the date and time settings. -->
<string name="date_and_time_settings_summary">Set date, time, time zone &amp; formats</string>
<!-- Date & time setting screen setting check box title if the date and time should be determined automatically -->
<string name="date_time_auto">Automatic</string>
<!-- Date & time setting screen setting option summary text when Automatic check box is selected (that is, when date and time should be determined automatically) -->
<string name="date_time_auto_summaryOn">Use network-provided values</string>
<!-- Date & time setting screen setting option summary text when Automatic check box is clear -->
<string name="date_time_auto_summaryOff">Use network-provided values</string>
<!-- Date & time setting screen setting check box title if the date and time should be determined automatically [CHAR LIMIT=25] -->
<string name="date_time_auto">Automatic date &amp; time</string>
<!-- Date & time setting screen setting option summary text when Automatic check box is selected
(that is, when date and time should be determined automatically) [CHAR LIMIT=100] -->
<string name="date_time_auto_summaryOn">Use network-provided time</string>
<!-- Date & time setting screen setting option summary text when Automatic check box is clear
[CHAR LIMIT=100] -->
<string name="date_time_auto_summaryOff">Use network-provided time</string>
<!-- Date & time setting screen setting check box title if the time zone should be determined automatically [CHAR LIMIT=25] -->
<string name="zone_auto">Automatic time zone</string>
<!-- Date & time setting screen setting option summary text when Automatic time zone check box is selected (that is, when date and time should be determined automatically)
[CHAR LIMIT=100] -->
<string name="zone_auto_summaryOn">Use network-provided time zone</string>
<!-- Date & time setting screen setting option summary text when Automatic time zone check box is clear
[CHAR LIMIT=100] -->
<string name="zone_auto_summaryOff">Use network-provided time zone</string>
<!-- Date & time setting screen setting check box title -->
<string name="date_time_24hour">Use 24-hour format</string>
<!-- Date & time setting screen setting option title -->
@@ -525,7 +535,7 @@
<string name="lock_after_timeout">Lock device after timeout</string>
<!-- Security settings screen, setting option summary to change screen timeout -->
<string name="lock_after_timeout_summary">Adjust the delay before the device automatically locks</string>
<!-- Main Settings screen setting option title for the item to take you the security and location screen -->
<string name="security_settings_title">Location &amp; security</string>
<!-- Location & security settings screen title -->
@@ -1927,7 +1937,7 @@ found in the list of installed applications.</string>
<!-- Message that a process's provider is in use. -->
<string name="process_provider_in_use_description">Provider <xliff:g id="comp_name">%1$s</xliff:g>
is in use.</string>
<!-- Language Settings --> <skip />
<!-- Title of setting on main settings screen. This item will take the user to the screen to tweak settings realted to locale and text -->
<string name="language_settings">Language &amp; keyboard</string>
@@ -2077,7 +2087,7 @@ found in the list of installed applications.</string>
<!-- Used to show an amount of time in the form "s seconds" in BatteryHistory -->
<string name="battery_history_seconds"><xliff:g id="seconds">%1$d</xliff:g>s</string>
<!-- XXX remove? Strings used for displaying usage statistics -->
<string name="usage_stats_label">Usage statistics</string>

View File

@@ -4,9 +4,9 @@
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.
@@ -16,31 +16,36 @@
<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"
android:title="@string/date_and_time">
<CheckBoxPreference android:key="auto_time"
<CheckBoxPreference android:key="auto_time"
android:title="@string/date_time_auto"
android:summaryOn="@string/date_time_auto_summaryOn"
android:summaryOff="@string/date_time_auto_summaryOff"
/>
<Preference android:key="date"
android:title="@string/date_time_set_date"
<CheckBoxPreference android:key="auto_zone"
android:title="@string/zone_auto"
android:summaryOn="@string/zone_auto_summaryOn"
android:summaryOff="@string/zone_auto_summaryOff"
/>
<Preference android:key="date"
android:title="@string/date_time_set_date"
android:summary="03/10/2008"
/>
<Preference android:key="time"
android:title="@string/date_time_set_time"
android:summary="12:00am"
/>
<PreferenceScreen
android:fragment="com.android.settings.ZonePicker"
android:key="timezone"
android:title="@string/date_time_set_timezone"
android:summary="GMT-8:00"
/>
<Preference android:key="time"
android:title="@string/date_time_set_time"
android:summary="12:00am"
/>
<CheckBoxPreference android:key="24 hour"
<CheckBoxPreference android:key="24 hour"
android:title="@string/date_time_24hour"
android:summaryOn="@string/date_time_24_hour_sample"
android:summaryOff="@string/date_time_12_hour_sample"/>
<ListPreference
android:key="date_format"
android:title="@string/date_time_date_format"
android:title="@string/date_time_date_format"
android:summary="mm/dd/yyyy"/>
</PreferenceScreen>