Skip to content

Commit

Permalink
update cancelLocationUpdates
Browse files Browse the repository at this point in the history
Fix linting
  • Loading branch information
jennantilla committed Dec 14, 2023
1 parent 6e23387 commit d690988
Showing 1 changed file with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,18 +227,10 @@ internal class GmsLocationController(
}

internal object FusedLocationApiWrapper {
// fun cancelLocationUpdates(
// googleApiClient: GoogleApiClient,
// locationListener: LocationListener,
// ) {
// try {
// LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, locationListener)
// } catch (e: IllegalStateException) {
// Logging.warn("Caught IllegalStateException in cancelLocationUpdates", e)
// }
// }

fun cancelLocationUpdates(googleApiClient: GoogleApiClient, locationListener: LocationListener) {
fun cancelLocationUpdates(
googleApiClient: GoogleApiClient,
locationListener: LocationListener,
) {
if (googleApiClient.isConnected) {
LocationServices.FusedLocationApi.removeLocationUpdates(googleApiClient, locationListener)
} else {
Expand Down

0 comments on commit d690988

Please sign in to comment.