File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
app/src/main/kotlin/com/simplemobiletools/contacts/helpers Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -637,12 +637,16 @@ class ContactsHelper(val activity: BaseSimpleActivity) {
637637
638638 fun getContactSources (callback : (ArrayList <ContactSource >) -> Unit ) {
639639 Thread {
640- val sources = getDeviceContactSources()
641- sources.add(ContactSource (activity.getString(R .string.phone_storage_hidden), SMT_PRIVATE ))
642- callback(ArrayList (sources))
640+ callback(getContactSourcesSync())
643641 }.start()
644642 }
645643
644+ private fun getContactSourcesSync (): ArrayList <ContactSource > {
645+ val sources = getDeviceContactSources()
646+ sources.add(ContactSource (activity.getString(R .string.phone_storage_hidden), SMT_PRIVATE ))
647+ return ArrayList (sources)
648+ }
649+
646650 private fun getDeviceContactSources (): LinkedHashSet <ContactSource > {
647651 val sources = LinkedHashSet <ContactSource >()
648652 if (! activity.hasContactPermissions()) {
You can’t perform that action at this time.
0 commit comments