OSDN Git Service

Cherry-pick 78bc8a3d70c65973fed80ee5cb628f7aa21e14d0 into
authorMartin Hibdon <mah@android.com>
Wed, 31 Mar 2010 00:50:41 +0000 (17:50 -0700)
committerMartin Hibdon <mah@android.com>
Fri, 2 Apr 2010 21:38:52 +0000 (14:38 -0700)
the Froyo branch.

src/com/android/contacts/model/ExchangeSource.java

index 11ccd44..3f2ab6c 100644 (file)
@@ -66,14 +66,14 @@ public class ExchangeSource extends FallbackSource {
         final DataKind kind = super.inflateStructuredName(context, ContactsSource.LEVEL_MIMETYPES);
 
         if (inflateLevel >= ContactsSource.LEVEL_CONSTRAINTS) {
-            final boolean useJapaneseOrder =
-                Locale.JAPANESE.getLanguage().equals(Locale.getDefault().getLanguage());
+            boolean displayOrderPrimary =
+                    context.getResources().getBoolean(R.bool.config_editor_field_order_primary);
             kind.typeOverallMax = 1;
 
             kind.fieldList = Lists.newArrayList();
             kind.fieldList.add(new EditField(StructuredName.PREFIX, R.string.name_prefix,
                     FLAGS_PERSON_NAME).setOptional(true));
-            if (useJapaneseOrder) {
+            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,