private void queueUpSyncs(final Cursor contactsCursor){
  ContactSyncEntry syncEntry=null;
  while (contactsCursor.moveToNext()) {
    if (syncEntry == null) {
      syncEntry=new ContactSyncEntry(UPLOAD_BATCH_SIZE);
    }
    final String number=contactsCursor.getString(contactsCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));
    final String name=contactsCursor.getString(contactsCursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));
    if (!TextUtils.isEmpty(number)) {
      syncEntry.addNumber(numberToNational(number));
      syncEntry.addName(name);
      if (syncEntry.isFull()) {
        Logger.d(TAG,"Adding sync entry to queue");
        mSyncQueue.add(syncEntry);
        syncEntry=null;
      }
    }
  }
}

private void queueUpSyncs ( final Cursor contactsCursor ) { ContactSyncEntry syncEntry = null ; while ( contactsCursor . moveToNext ( ) ) { if ( syncEntry == null ) { syncEntry = new ContactSyncEntry ( UPLOAD_BATCH_SIZE ) ; } final String number = contactsCursor . getString ( contactsCursor . getColumnIndex ( ContactsContract . CommonDataKinds . Phone . NUMBER ) ) ; final String name = contactsCursor . getString ( contactsCursor . getColumnIndex ( ContactsContract . CommonDataKinds . Phone . DISPLAY_NAME ) ) ; if ( ! TextUtils . isEmpty ( number ) ) { syncEntry . addNumber ( numberToNational ( number ) ) ; syncEntry . addName ( name ) ; if ( syncEntry . isFull ( ) ) { Logger . d ( TAG , "Adding sync entry to queue" ) ; mSyncQueue . add ( syncEntry ) ; syncEntry = null ; } } } }
method that hashes contacts and syncs them to server
