diff options
Diffstat (limited to 'core/java/android/provider/Contacts.java')
-rw-r--r-- | core/java/android/provider/Contacts.java | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/core/java/android/provider/Contacts.java b/core/java/android/provider/Contacts.java index 84fe184..0829cfb 100644 --- a/core/java/android/provider/Contacts.java +++ b/core/java/android/provider/Contacts.java @@ -30,6 +30,7 @@ import android.net.Uri; import android.text.TextUtils; import android.util.Log; import android.widget.ImageView; +import android.accounts.Account; import java.io.ByteArrayInputStream; import java.io.InputStream; @@ -75,6 +76,12 @@ public class Contacts { public static final String _SYNC_ACCOUNT = "_sync_account"; /** + * The _SYNC_ACCOUNT_TYPE to which this setting corresponds. This may be null. + * <P>Type: TEXT</P> + */ + public static final String _SYNC_ACCOUNT_TYPE = "_sync_account_type"; + + /** * The key of this setting. * <P>Type: TEXT</P> */ @@ -134,6 +141,7 @@ public class Contacts { selectString = (account == null) ? "_sync_account is null AND key=?" : "_sync_account=? AND key=?"; +// : "_sync_account=? AND _sync_account_type=? AND key=?"; selectArgs = (account == null) ? new String[]{key} : new String[]{account, key}; @@ -158,7 +166,8 @@ public class Contacts { // the account name is, so we're using a global setting for SYNC_EVERYTHING. // Some day when we add multiple accounts to the UI this should honor the account // that was asked for. - //values.put(_SYNC_ACCOUNT, account); + //values.put(_SYNC_ACCOUNT, account.mName); + //values.put(_SYNC_ACCOUNT_TYPE, account.mType); values.put(KEY, key); values.put(VALUE, value); cr.update(Settings.CONTENT_URI, values, null, null); @@ -846,6 +855,12 @@ public class Contacts { public static final String GROUP_SYNC_ACCOUNT = "group_sync_account"; /** + * The account type of the group. + * <P>Type: TEXT</P> + */ + public static final String GROUP_SYNC_ACCOUNT_TYPE = "group_sync_account_type"; + + /** * The row id of the person. * <P>Type: TEXT</P> */ @@ -1022,13 +1037,7 @@ public class Contacts { } } else { if (!TextUtils.isEmpty(label)) { - if (label.toString().equals(MOBILE_EMAIL_TYPE_NAME)) { - display = - context.getString( - com.android.internal.R.string.mobileEmailTypeName); - } else { - display = label; - } + display = label; } } break; @@ -1229,7 +1238,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"; |