summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorblong <blong@codeaurora.org>2016-10-18 14:21:00 +0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-10-18 19:06:55 -0700
commit21a450b610ec9890fc3ac5e3968982f24bbdd3bd (patch)
treefb2334e54b66081fa5d666a610a75efcfbc4fe09
parentcbdcd5d25b9e2fbeef4e220c917c00c088929b0b (diff)
downloadpackages_apps_ContactsCommon-21a450b610ec9890fc3ac5e3968982f24bbdd3bd.tar.gz
packages_apps_ContactsCommon-21a450b610ec9890fc3ac5e3968982f24bbdd3bd.tar.bz2
packages_apps_ContactsCommon-21a450b610ec9890fc3ac5e3968982f24bbdd3bd.zip
Fix exchange account contact name can't modify problem
- Exchange account has no DISPLAY_NAME field, so don't need transfer data from before to after, it will cause wrong name construct CRs-Fixed: 1079070 Change-Id: Ic8310f1e68f852cb88c8859f19cc38d1e115da6b
-rwxr-xr-x[-rw-r--r--]src/com/android/contacts/common/model/ValuesDelta.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/contacts/common/model/ValuesDelta.java b/src/com/android/contacts/common/model/ValuesDelta.java
index 245e21ce..c400e4fb 100644..100755
--- a/src/com/android/contacts/common/model/ValuesDelta.java
+++ b/src/com/android/contacts/common/model/ValuesDelta.java
@@ -24,9 +24,11 @@ import android.os.Parcelable;
import android.provider.BaseColumns;
import android.provider.ContactsContract;
import android.provider.ContactsContract.Data;
+import android.provider.ContactsContract.RawContacts;
import com.android.contacts.common.compat.CompatUtils;
import com.android.contacts.common.model.BuilderWrapper;
+import com.android.contacts.common.model.account.ExchangeAccountType;
import com.android.contacts.common.testing.NeededForTesting;
import com.google.common.collect.Sets;
@@ -64,11 +66,13 @@ public class ValuesDelta implements Parcelable {
final ValuesDelta entry = new ValuesDelta();
entry.mBefore = before;
entry.mAfter = new ContentValues();
+ String account = before.getAsString(RawContacts.ACCOUNT_TYPE);
// init data1 to mAfter map. when no operation edittext of
// sim phone in the UI, the mAfter init have no data1 value,
// it will cause the builddiff data not right.
- if (before.containsKey(Data.DATA1)) {
+ if (before.containsKey(Data.DATA1) && account != null
+ && !ExchangeAccountType.isExchangeType(account)) {
String contactInfo = before.getAsString(Data.DATA1);
if (null != contactInfo && !"".equals(contactInfo)) {
entry.mAfter.put(Data.DATA1, contactInfo);