We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 36912b5 commit 89e7e06Copy full SHA for 89e7e06
juicy-noise-android/app/src/main/java/com/danand/juicynoise/MainActivity.kt
@@ -755,11 +755,11 @@ fun runReadingLocation(
755
756
@SuppressLint("MissingPermission")
757
suspend fun readLocation(locationClient: FusedLocationProviderClient): Location = suspendCoroutine { continuation ->
758
- locationClient.lastLocation.addOnCompleteListener {
759
- if (it.exception == null) {
760
- continuation.resume(it.result!!)
+ locationClient.lastLocation.addOnCompleteListener { task ->
+ if (task.exception == null) {
+ continuation.resume(task.result!!)
761
} else {
762
- throw it.exception!!
+ throw task.exception!!
763
}
764
765
0 commit comments