Fix NPE issue w/ Contacts sync (#2160417)
* Oversight in late-night submission; simple fix Change-Id: I0c3ebd4b23c1e913d74e153b3692b3ce8e3c0220
This commit is contained in:
parent
2d34c669c1
commit
1eb0af5d80
@ -76,6 +76,9 @@ public class ContactsSyncAdapter extends AbstractSyncAdapter {
|
||||
private static final String[] ID_PROJECTION = new String[] {RawContacts._ID};
|
||||
private static final String[] GROUP_PROJECTION = new String[] {Groups.SOURCE_ID};
|
||||
|
||||
private static final ArrayList<NamedContentValues> EMPTY_ARRAY_NAMEDCONTENTVALUES
|
||||
= new ArrayList<NamedContentValues>();
|
||||
|
||||
private static final String FOUND_DATA_ROW = "com.android.exchange.FOUND_ROW";
|
||||
|
||||
private static final int[] HOME_ADDRESS_TAGS = new int[] {Tags.CONTACTS_HOME_ADDRESS_CITY,
|
||||
@ -1330,10 +1333,11 @@ public class ContactsSyncAdapter extends AbstractSyncAdapter {
|
||||
public void addUntyped(Entity entity, ArrayList<UntypedRow> rows, String mimeType,
|
||||
int type, int maxRows) {
|
||||
// Make a list of all same type rows in the existing entity
|
||||
ArrayList<NamedContentValues> oldValues = new ArrayList<NamedContentValues>();
|
||||
ArrayList<NamedContentValues> entityValues = entity.getSubValues();
|
||||
ArrayList<NamedContentValues> oldValues = EMPTY_ARRAY_NAMEDCONTENTVALUES;
|
||||
ArrayList<NamedContentValues> entityValues = EMPTY_ARRAY_NAMEDCONTENTVALUES;
|
||||
if (entity != null) {
|
||||
oldValues = findUntypedData(entityValues, type, mimeType);
|
||||
entityValues = entity.getSubValues();
|
||||
}
|
||||
|
||||
// These will be rows needing replacement with new values
|
||||
|
Loading…
Reference in New Issue
Block a user