Fixing order of contact editors for CJK locales
Bug: 2498855
Change-Id: Idcacb05ad29a5898dc8a5626a90294a145c6eb57
diff --git a/res/values-ja/config.xml b/res/values-ja/config.xml
index bc88b69..c5d3aea 100644
--- a/res/values-ja/config.xml
+++ b/res/values-ja/config.xml
@@ -29,4 +29,7 @@
<!-- If true, the default sort order is primary (i.e. by given name) -->
<bool name="config_default_display_order_primary">true</bool>
+
+ <!-- If true, the order of name fields in the editor is primary (i.e. given name first) -->
+ <bool name="config_editor_field_order_primary">false</bool>
</resources>
diff --git a/res/values-ko/config.xml b/res/values-ko/config.xml
index d132f7f..e52f490 100644
--- a/res/values-ko/config.xml
+++ b/res/values-ko/config.xml
@@ -29,4 +29,7 @@
<!-- If true, the default sort order is primary (i.e. by given name) -->
<bool name="config_default_display_order_primary">false</bool>
+
+ <!-- If true, the order of name fields in the editor is primary (i.e. given name first) -->
+ <bool name="config_editor_field_order_primary">false</bool>
</resources>
diff --git a/res/values-zh-rCN/config.xml b/res/values-zh-rCN/config.xml
index bc88b69..c5d3aea 100644
--- a/res/values-zh-rCN/config.xml
+++ b/res/values-zh-rCN/config.xml
@@ -29,4 +29,7 @@
<!-- If true, the default sort order is primary (i.e. by given name) -->
<bool name="config_default_display_order_primary">true</bool>
+
+ <!-- If true, the order of name fields in the editor is primary (i.e. given name first) -->
+ <bool name="config_editor_field_order_primary">false</bool>
</resources>
diff --git a/res/values-zh-rTW/config.xml b/res/values-zh-rTW/config.xml
index bc88b69..c5d3aea 100644
--- a/res/values-zh-rTW/config.xml
+++ b/res/values-zh-rTW/config.xml
@@ -29,4 +29,7 @@
<!-- If true, the default sort order is primary (i.e. by given name) -->
<bool name="config_default_display_order_primary">true</bool>
+
+ <!-- If true, the order of name fields in the editor is primary (i.e. given name first) -->
+ <bool name="config_editor_field_order_primary">false</bool>
</resources>
diff --git a/res/values/config.xml b/res/values/config.xml
index e22b2ed..f1c6951 100644
--- a/res/values/config.xml
+++ b/res/values/config.xml
@@ -93,4 +93,7 @@
<!-- If true, the default sort order is primary (i.e. by given name) -->
<bool name="config_default_display_order_primary">true</bool>
+
+ <!-- If true, the order of name fields in the editor is primary (i.e. given name first) -->
+ <bool name="config_editor_field_order_primary">true</bool>
</resources>
diff --git a/src/com/android/contacts/model/FallbackSource.java b/src/com/android/contacts/model/FallbackSource.java
index 9f1417b..9cc855c 100644
--- a/src/com/android/contacts/model/FallbackSource.java
+++ b/src/com/android/contacts/model/FallbackSource.java
@@ -111,14 +111,12 @@
if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
boolean displayOrderPrimary =
- context.getResources().getBoolean(R.bool.config_default_display_order_primary);
- boolean displayOrderUserChangeable =
- context.getResources().getBoolean(R.bool.config_display_order_user_changeable);
+ context.getResources().getBoolean(R.bool.config_editor_field_order_primary);
kind.fieldList = Lists.newArrayList();
kind.fieldList.add(new EditField(StructuredName.PREFIX, R.string.name_prefix,
FLAGS_PERSON_NAME).setOptional(true));
- if (!displayOrderPrimary && !displayOrderUserChangeable) {
+ if (!displayOrderPrimary) {
kind.fieldList.add(new EditField(StructuredName.FAMILY_NAME, R.string.name_family,
FLAGS_PERSON_NAME));
kind.fieldList.add(new EditField(StructuredName.MIDDLE_NAME, R.string.name_middle,