From 18f10be772933fc3f94214c3e8570cb0359b8c9f Mon Sep 17 00:00:00 2001 From: Piotr Czarnecki Date: Tue, 3 Sep 2024 13:14:32 +0200 Subject: [PATCH] Fix FossifyOrg/Phone#28 (Missing contacts) (#55) * Update ContactsHelper.kt Fix https://github.com/FossifyOrg/Phone/issues/28 (Missing contacts) According to doc ContentResolver.getIsSyncable returns value >0 if it is syncable, 0 if not, and <0 if the state isn't known yet. * Update ContactsHelper.kt Fix MR issue --- .../main/kotlin/org/fossify/commons/helpers/ContactsHelper.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commons/src/main/kotlin/org/fossify/commons/helpers/ContactsHelper.kt b/commons/src/main/kotlin/org/fossify/commons/helpers/ContactsHelper.kt index c2ce8f790..b2fc1599d 100644 --- a/commons/src/main/kotlin/org/fossify/commons/helpers/ContactsHelper.kt +++ b/commons/src/main/kotlin/org/fossify/commons/helpers/ContactsHelper.kt @@ -820,7 +820,7 @@ class ContactsHelper(val context: Context) { val accounts = AccountManager.get(context).accounts accounts.forEach { - if (ContentResolver.getIsSyncable(it, AUTHORITY) == 1) { + if (ContentResolver.getIsSyncable(it, AUTHORITY) > 0) { var publicName = it.name if (it.type == TELEGRAM_PACKAGE) { publicName = context.getString(R.string.telegram)