Fix issue 1164: Incorrect organization type label in contacts
http://code.google.com/p/android/issues/detail?id=1164 The organization definition in string-array resource is different from android.provider.Contacts.OrganizationColumns
This commit is contained in:
@@ -1170,7 +1170,7 @@ public class Contacts {
|
||||
*/
|
||||
public interface OrganizationColumns {
|
||||
/**
|
||||
* The type of the the phone number.
|
||||
* The type of the organizations.
|
||||
* <P>Type: INTEGER (one of the constants below)</P>
|
||||
*/
|
||||
public static final String TYPE = "type";
|
||||
@@ -1229,7 +1229,7 @@ public class Contacts {
|
||||
try {
|
||||
display = labels[type - 1];
|
||||
} catch (ArrayIndexOutOfBoundsException e) {
|
||||
display = labels[People.Phones.TYPE_HOME - 1];
|
||||
display = labels[Organizations.TYPE_WORK - 1];
|
||||
}
|
||||
} else {
|
||||
if (!TextUtils.isEmpty(label)) {
|
||||
|
||||
@@ -731,7 +731,6 @@
|
||||
<!-- Organization types from android.provider.Contacts -->
|
||||
<string-array name="organizationTypes">
|
||||
<!-- The order of these is important, don't reorder without changing Contacts.java -->
|
||||
<item>Home</item>
|
||||
<item>Work</item>
|
||||
<item>Other</item>
|
||||
<item>Custom\u2026</item>
|
||||
|
||||
Reference in New Issue
Block a user