summaryrefslogtreecommitdiffstats
path: root/packages/SettingsProvider
diff options
context:
space:
mode:
authorwangjing <wangjing@codeaurora.org>2015-04-15 14:45:13 +0800
committerGerrit Code Review <gerrit@cyanogenmod.org>2016-02-03 11:51:06 -0800
commit22869c183610b9c9e17d7cb820f6e7d70daeb93e (patch)
tree712670d11c000ffa18ef8108f07d77a6b987881e /packages/SettingsProvider
parent247d6d5c486ea33b378dc7ee2aa93a5e9e800bc1 (diff)
downloadframeworks_base-22869c183610b9c9e17d7cb820f6e7d70daeb93e.zip
frameworks_base-22869c183610b9c9e17d7cb820f6e7d70daeb93e.tar.gz
frameworks_base-22869c183610b9c9e17d7cb820f6e7d70daeb93e.tar.bz2
Default time format is hard coded to 24
The items "def_time/date_format" will be hard coded for Default. So should set "def_time/date_format" to be null in order to bring back the AOSP implementation of picking the date format based on the locale for Default OPO-431 Change-Id: Ia5d74662782bcc00a8173fd49604f187a116468e
Diffstat (limited to 'packages/SettingsProvider')
-rw-r--r--packages/SettingsProvider/res/values/customize.xml4
-rw-r--r--packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java12
2 files changed, 10 insertions, 6 deletions
diff --git a/packages/SettingsProvider/res/values/customize.xml b/packages/SettingsProvider/res/values/customize.xml
index b5e6648..9085d2d 100644
--- a/packages/SettingsProvider/res/values/customize.xml
+++ b/packages/SettingsProvider/res/values/customize.xml
@@ -30,10 +30,10 @@ IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
<resources>
<!-- Time format,default vlaue is 24 : 24 format,other value is 12 format -->
- <string name="def_time_format" translatable="false">24</string>
+ <string name="def_time_format" translatable="false"></string>
<!-- Date format,yyyy-MM-dd: 2013/07/30; MM-dd-yyyy:07/30/2013; dd-MM-yyyy:30/07/2013 -->
- <string name="def_date_format" translatable="false">MM-dd-yyyy</string>
+ <string name="def_date_format" translatable="false"></string>
<!--
Default Input Method, its value is from inputmethod's package name and main class name
diff --git a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
index 1b8ef79..ad4a614 100644
--- a/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
+++ b/packages/SettingsProvider/src/com/android/providers/settings/DatabaseHelper.java
@@ -2600,11 +2600,15 @@ class DatabaseHelper extends SQLiteOpenHelper {
*/
//LEGACY CAF CHANGES
- loadStringSetting(stmt, Settings.System.TIME_12_24,
- R.string.def_time_format);
+ if (!TextUtils.isEmpty(mContext.getResources().getString(R.string.def_time_format))) {
+ loadStringSetting(stmt, Settings.System.TIME_12_24,
+ R.string.def_time_format);
+ }
- loadStringSetting(stmt, Settings.System.DATE_FORMAT,
- R.string.def_date_format);
+ if (!TextUtils.isEmpty(mContext.getResources().getString(R.string.def_date_format))) {
+ loadStringSetting(stmt, Settings.System.DATE_FORMAT,
+ R.string.def_date_format);
+ }
} finally {
if (stmt != null) stmt.close();
}