Also consider contacts with account 'com.android.contacts' for backup
In our tests with CalyxOS, all local contacts had a null account, but for some reason on LineageOS, those contacts have 'com.android.contacts'. So we now consider this as well.
This commit is contained in:
parent
d5b32d1410
commit
28f9447317
1 changed files with 1 additions and 1 deletions
|
@ -45,7 +45,7 @@ class VCardExporter {
|
|||
private Collection<String> getLookupKeys() {
|
||||
String[] projection = new String[]{LOOKUP_KEY};
|
||||
// We can not add IS_PRIMARY here as this gets lost on restored contacts
|
||||
String selection = ACCOUNT_TYPE + " is null";
|
||||
String selection = ACCOUNT_TYPE + " is null OR " + ACCOUNT_TYPE + "='com.android.contacts'";
|
||||
Cursor cursor = contentResolver.query(CONTENT_URI, projection, selection, null, null);
|
||||
if (cursor == null) {
|
||||
Log.e(TAG, "Cursor for LOOKUP_KEY is null");
|
||||
|
|
Loading…
Add table
Reference in a new issue