Fix crash when fetching current location

pull/1760/head
Alex Baker 2 years ago
parent 0b97b96d4b
commit c1afbfbaa8

@ -235,8 +235,8 @@ dependencies {
exclude("com.google.android.gms", "play-services-ads-identifier")
}
googleplayImplementation("com.google.firebase:firebase-config-ktx:${Versions.remote_config}")
googleplayImplementation("com.google.android.gms:play-services-location:19.0.0")
googleplayImplementation("com.google.android.gms:play-services-maps:18.0.1")
googleplayImplementation("com.google.android.gms:play-services-location:19.0.1")
googleplayImplementation("com.google.android.gms:play-services-maps:18.0.2")
googleplayImplementation("com.android.billingclient:billing-ktx:3.0.3")
androidTestImplementation("com.google.dagger:hilt-android-testing:${Versions.hilt}")

@ -27,7 +27,8 @@ class LocationServiceGooglePlay @Inject constructor(
.lastLocation
.addOnSuccessListener {
cont.resumeWith(
it.let { Result.success(MapPosition(it.latitude, it.longitude)) }
it?.let { Result.success(MapPosition(it.latitude, it.longitude)) }
?: Result.failure(NullPointerException())
)
}
.addOnFailureListener { cont.resumeWith(Result.failure(it)) }

@ -225,20 +225,20 @@
+| +--- com.google.firebase:firebase-installations:17.0.0 (*)
+| +--- com.google.firebase:firebase-installations-interop:17.0.0 (*)
+| \--- org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.3.72 -> 1.5.31 (*)
++--- com.google.android.gms:play-services-location:19.0.0
+| +--- com.google.android.gms:play-services-base:18.0.0
++--- com.google.android.gms:play-services-location:19.0.1
+| +--- com.google.android.gms:play-services-base:18.0.1
+| | +--- androidx.collection:collection:1.0.0 -> 1.1.0 (*)
+| | +--- androidx.core:core:1.2.0 -> 1.7.0 (*)
+| | +--- androidx.fragment:fragment:1.0.0 -> 1.4.0 (*)
+| | +--- com.google.android.gms:play-services-basement:18.0.0 (*)
+| | \--- com.google.android.gms:play-services-tasks:18.0.0 -> 18.0.1 (*)
+| | \--- com.google.android.gms:play-services-tasks:18.0.1 (*)
+| +--- com.google.android.gms:play-services-basement:18.0.0 (*)
+| +--- com.google.android.gms:play-services-places-placereport:17.0.0
+| | \--- com.google.android.gms:play-services-basement:17.0.0 -> 18.0.0 (*)
+| \--- com.google.android.gms:play-services-tasks:18.0.0 -> 18.0.1 (*)
++--- com.google.android.gms:play-services-maps:18.0.1
+| \--- com.google.android.gms:play-services-tasks:18.0.1 (*)
++--- com.google.android.gms:play-services-maps:18.0.2
+| +--- androidx.fragment:fragment:1.0.0 -> 1.4.0 (*)
+| +--- com.google.android.gms:play-services-base:18.0.0 (*)
+| +--- com.google.android.gms:play-services-base:18.0.1 (*)
+| \--- com.google.android.gms:play-services-basement:18.0.0 (*)
++--- com.android.billingclient:billing-ktx:3.0.3
+| +--- com.android.billingclient:billing:3.0.3

Loading…
Cancel
Save