Fix ANR about IllegalStateException #197
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Exception java.lang.IllegalStateException:
at android.database.CursorWindow.nativeGetString
at android.database.CursorWindow.getString (CursorWindow.java:469)
at android.database.AbstractWindowedCursor.getString (AbstractWindowedCursor.java:53)
at android.database.CursorWrapper.getString (CursorWrapper.java:152)
at co.quis.flutter_contacts.FlutterContacts$Companion.select$getString (FlutterContacts.kt:190)
at co.quis.flutter_contacts.FlutterContacts$Companion.select (FlutterContacts.kt:196)
at co.quis.flutter_contacts.FlutterContacts$Companion.select$default (FlutterContacts.kt:55)
at co.quis.flutter_contacts.FlutterContactsPlugin$onMethodCall$2.invokeSuspend (FlutterContactsPlugin.kt:213)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run (LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:684)