Compare commits
1 Commits
57504573f4
...
609a9cb534
Author | SHA1 | Date | |
---|---|---|---|
609a9cb534 |
@@ -19,7 +19,7 @@ class NumericUtils (val context: Context) {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
val measurementSystem = LocaleData.getMeasurementSystem(ULocale.getDefault())
|
||||
return (measurementSystem == LocaleData. MeasurementSystem.SI)
|
||||
} else {
|
||||
} else {
|
||||
val locale = context.resources.configuration.locale
|
||||
return when (locale.country) {
|
||||
// https://en.wikipedia.org/wiki/United_States_customary_units
|
||||
@@ -29,7 +29,7 @@ class NumericUtils (val context: Context) {
|
||||
"GB", "MM", "LR" -> false // IMPERIAL
|
||||
else -> true // UnitSystem.METRIC
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
init {
|
||||
|
Reference in New Issue
Block a user