Home
last modified time | relevance | path

Searched refs:getDistanceUnit (Results 1 – 8 of 8) sorted by relevance

/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/
DSpeedFormatter.kt121 val speedWithUnit = convertToDistancePerHour(unitPreferences.getDistanceUnit(), speed) in formatSpeedValue()
126 return when (unitPreferences.getDistanceUnit()) { in getUnitRes()
133 return when (unitPreferences.getDistanceUnit()) { in getA11yUnitRes()
181 unitPreferences.getDistanceUnit(), speed.inMetersPerSecond) in formatSpeedValueToMinPerDistance()
193 return when (unitPreferences.getDistanceUnit()) { in getUnitResInMinPerDistance()
200 return when (unitPreferences.getDistanceUnit()) { in getA11yUnitResInMinPerDistance()
212 if (unitPreferences.getDistanceUnit() == MILES && in formatSpeedValueToMinPerOneHundredDistance()
230 return when (unitPreferences.getDistanceUnit()) { in getUnitResInMinPerOneHundredDistance()
240 return when (unitPreferences.getDistanceUnit()) { in getA11yUnitResInMinPerOneHundredDistance()
/packages/apps/Car/Launcher/app/tests/src/com/android/car/carlauncher/calmmode/
DNavigationStateDataTest.java62 when(mNavigationStateDataImperial.getDistanceUnit()).thenReturn(DISTANCE_UNIT_IMPERIAL); in setUp()
66 when(mNavigationStateDataMetric.getDistanceUnit()).thenReturn(DISTANCE_UNIT_METRIC); in setUp()
84 assertEquals(MeasureUnit.MILE, navStateData.getDistanceUnit()); in testBuilder_validArgs_objectCreated()
104 when(mNavigationStateDataImperial.getDistanceUnit()).thenReturn(null); in testBuildTripStatusString_nullDistanceUnit_returnsNull()
DNavigationStateViewModelTest.java153 assertEquals(MeasureUnit.MILE, navStateData.getDistanceUnit()); in onNavigationState_destinationImperial_navStateIsImperial()
170 assertEquals(MeasureUnit.KILOMETER, navStateData.getDistanceUnit()); in onNavigationState_destinationMetric_navStateIsMetric()
186 assertEquals(MeasureUnit.FOOT, navStateData.getDistanceUnit()); in onNavigationState_destinationFeet_navStateIsFeet()
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/formatters/shared/
DLengthFormatter.kt37 when (unitPreferences.getDistanceUnit()) { in formatValue()
53 when (unitPreferences.getDistanceUnit()) { in formatA11yValue()
68 unitPreferences.getDistanceUnit(), length.inMeters) in formatSample()
/packages/apps/Car/Launcher/app/src/com/android/car/carlauncher/calmmode/
DNavigationStateData.java74 || navigationState.getDistanceUnit() == null) { in buildTripStatusString()
96 .unit(navigationState.getDistanceUnit()) in buildTripStatusString()
111 public MeasureUnit getDistanceUnit() { in getDistanceUnit() method in NavigationStateData
/packages/modules/HealthFitness/apk/src/com/android/healthconnect/controller/dataentries/units/
DUnitPreferences.kt52 fun getDistanceUnit(): DistanceUnit { in getDistanceUnit() method in com.android.healthconnect.controller.dataentries.units.UnitPreferences
DUnitsFragment.kt93 unitsPreferences.getDistanceUnit().toString()) { newUnit -> in <lambda>()
/packages/modules/HealthFitness/apk/tests/src/com/android/healthconnect/controller/tests/dataentries/units/
DUnitsFragmentTest.kt177 assertThat(unitPreferences.getDistanceUnit()).isEqualTo(DistanceUnit.MILES) in unitsScreen_modifiesDistance_updatesValue()