// TODO: Find better raw contact delta
// Just select an arbitrary writable contact.
private void pickRawContactDelta() {
        if (Log.isLoggable(TAG, Log.VERBOSE)) {
            Log.v(TAG, "parse: " + mRawContactDeltas.size() + " rawContactDelta(s)");
        }
        for (int j = 0; j < mRawContactDeltas.size(); j++) {
            final RawContactDelta rawContactDelta = mRawContactDeltas.get(j);
            if (Log.isLoggable(TAG, Log.VERBOSE)) {
                Log.v(TAG, "parse: " + j + " rawContactDelta" + rawContactDelta);
            }
            if (rawContactDelta == null || !rawContactDelta.isVisible()) continue;
            final AccountType accountType = rawContactDelta.getAccountType(mAccountTypeManager);
            if (accountType == null) continue;
            if (mRawContactIdToDisplayAlone > 0) {
                // Look for the raw contact if specified.
                if (rawContactDelta.getRawContactId().equals(mRawContactIdToDisplayAlone)) {
                    mCurrentRawContactDelta = rawContactDelta;
                    return;
                }
            } else if (mPrimaryAccount != null
                    && mPrimaryAccount.equals(rawContactDelta.getAccountWithDataSet())) {
                // Otherwise try to find the one that matches the default.
                mCurrentRawContactDelta = rawContactDelta;
                return;
            } else if (accountType.areContactsWritable()){
                // TODO: Find better raw contact delta
                // Just select an arbitrary writable contact.
                mCurrentRawContactDelta = rawContactDelta;
            }
        }
    }
return;
} else if (accountType.areContactsWritable()){
// TODO: Find better raw contact delta
// Just select an arbitrary writable contact.
mCurrentRawContactDelta = rawContactDelta;
}
if (rawContactDelta.getRawContactId().equals(mRawContactIdToDisplayAlone)) {
mCurrentRawContactDelta = rawContactDelta;
return;
}
} else if (mPrimaryAccount != null
&& mPrimaryAccount.equals(rawContactDelta.getAccountWithDataSet())) {
// Otherwise try to find the one that matches the default.
mCurrentRawContactDelta = rawContactDelta;
return;
} else if (accountType.areContactsWritable()){
// TODO: Find better raw contact delta
// Just select an arbitrary writable contact.
mCurrentRawContactDelta = rawContactDelta;
}
}
}
for (int j = 0; j < mRawContactDeltas.size(); j++) {
final RawContactDelta rawContactDelta = mRawContactDeltas.get(j);
if (Log.isLoggable(TAG, Log.VERBOSE)) {
Log.v(TAG, "parse: " + j + " rawContactDelta" + rawContactDelta);
}
if (rawContactDelta == null || !rawContactDelta.isVisible()) continue;
final AccountType accountType = rawContactDelta.getAccountType(mAccountTypeManager);
if (accountType == null) continue;
if (mRawContactIdToDisplayAlone > 0) {
// Look for the raw contact if specified.
if (rawContactDelta.getRawContactId().equals(mRawContactIdToDisplayAlone)) {
mCurrentRawContactDelta = rawContactDelta;
return;
}
} else if (mPrimaryAccount != null
&& mPrimaryAccount.equals(rawContactDelta.getAccountWithDataSet())) {
// Otherwise try to find the one that matches the default.
mCurrentRawContactDelta = rawContactDelta;
return;
} else if (accountType.areContactsWritable()){
// TODO: Find better raw contact delta
// Just select an arbitrary writable contact.
mCurrentRawContactDelta = rawContactDelta;
}
}
}