Loading src/com/android/contacts/model/EntityModifier.java +8 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,11 @@ import android.provider.ContactsContract.CommonDataKinds.BaseTypes; import android.provider.ContactsContract.CommonDataKinds.Email; import android.provider.ContactsContract.CommonDataKinds.Im; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.Photo; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.CommonDataKinds.StructuredPostal; import android.provider.ContactsContract.Intents.Insert; import android.provider.ContactsContract; import android.text.TextUtils; import android.util.Log; import android.util.SparseIntArray; Loading Loading @@ -378,8 +380,12 @@ public class EntityModifier { continue; } // Test and remove this row if empty if (EntityModifier.isEmpty(entry, kind)) { // Test and remove this row if empty and it isn't a photo from google final boolean isGoogleSource = TextUtils.equals(GoogleSource.ACCOUNT_TYPE, state.getValues().getAsString(RawContacts.ACCOUNT_TYPE)); final boolean isPhoto = TextUtils.equals(Photo.CONTENT_ITEM_TYPE, kind.mimeType); final boolean isGooglePhoto = isPhoto && isGoogleSource; if (EntityModifier.isEmpty(entry, kind) && !isGooglePhoto) { // TODO: remove this verbose logging Log.w(TAG, "Trimming: " + entry.toString()); entry.markDeleted(); Loading Loading
src/com/android/contacts/model/EntityModifier.java +8 −2 Original line number Diff line number Diff line Loading @@ -33,9 +33,11 @@ import android.provider.ContactsContract.CommonDataKinds.BaseTypes; import android.provider.ContactsContract.CommonDataKinds.Email; import android.provider.ContactsContract.CommonDataKinds.Im; import android.provider.ContactsContract.CommonDataKinds.Phone; import android.provider.ContactsContract.CommonDataKinds.Photo; import android.provider.ContactsContract.CommonDataKinds.StructuredName; import android.provider.ContactsContract.CommonDataKinds.StructuredPostal; import android.provider.ContactsContract.Intents.Insert; import android.provider.ContactsContract; import android.text.TextUtils; import android.util.Log; import android.util.SparseIntArray; Loading Loading @@ -378,8 +380,12 @@ public class EntityModifier { continue; } // Test and remove this row if empty if (EntityModifier.isEmpty(entry, kind)) { // Test and remove this row if empty and it isn't a photo from google final boolean isGoogleSource = TextUtils.equals(GoogleSource.ACCOUNT_TYPE, state.getValues().getAsString(RawContacts.ACCOUNT_TYPE)); final boolean isPhoto = TextUtils.equals(Photo.CONTENT_ITEM_TYPE, kind.mimeType); final boolean isGooglePhoto = isPhoto && isGoogleSource; if (EntityModifier.isEmpty(entry, kind) && !isGooglePhoto) { // TODO: remove this verbose logging Log.w(TAG, "Trimming: " + entry.toString()); entry.markDeleted(); Loading