Skip to content

Commit

Permalink
Don't use apply in automator
Browse files Browse the repository at this point in the history
  • Loading branch information
pdenert committed Mar 5, 2025
1 parent 9cd60c2 commit ca4fd31
Showing 1 changed file with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -743,14 +743,13 @@ class Automator private constructor() {
)

locationManager.setTestProviderEnabled(mockLocationProvider, true)
val mockLocation = Location(mockLocationProvider).apply {
latitude = latitude
longitude = longitude
altitude = 0.0
accuracy = 1.0f
time = System.currentTimeMillis()
elapsedRealtimeNanos = System.nanoTime()
}
val mockLocation = Location(mockLocationProvider)
mockLocation.latitude = latitude
mockLocation.longitude = longitude
mockLocation.altitude = 0.0
mockLocation.accuracy = 1.0f
mockLocation.time = System.currentTimeMillis()
mockLocation.elapsedRealtimeNanos = System.nanoTime()
locationManager.setTestProviderLocation(mockLocationProvider, mockLocation)
}

Expand Down

0 comments on commit ca4fd31

Please sign in to comment.