mirror of
https://github.com/home-assistant/android
synced 2024-10-01 13:53:53 +00:00
Fix vertical accuracy. (#116)
* Send 0 instead of null for vertical accuracy if we don't have real value. * Remove nullable fields if they aren't nullable.
This commit is contained in:
parent
96f548a914
commit
a0c9974116
|
@ -99,7 +99,7 @@ class LocationBroadcastReceiver : BroadcastReceiver() {
|
|||
it.speed.toInt(),
|
||||
it.altitude.toInt(),
|
||||
it.bearing.toInt(),
|
||||
if (Build.VERSION.SDK_INT >= 26) it.verticalAccuracyMeters.toInt() else null
|
||||
if (Build.VERSION.SDK_INT >= 26) it.verticalAccuracyMeters.toInt() else 0
|
||||
)
|
||||
|
||||
mainScope.launch {
|
||||
|
|
|
@ -8,5 +8,5 @@ data class UpdateLocationRequest(
|
|||
val speed: Int,
|
||||
val altitude: Int,
|
||||
val course: Int,
|
||||
val verticalAccuracy: Int?
|
||||
val verticalAccuracy: Int
|
||||
)
|
||||
|
|
|
@ -8,5 +8,5 @@ data class UpdateLocation(
|
|||
val speed: Int,
|
||||
val altitude: Int,
|
||||
val course: Int,
|
||||
val verticalAccuracy: Int?
|
||||
val verticalAccuracy: Int
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue