Home
last modified time | relevance | path

Searched refs:mCarUnitsManager (Results 1 – 9 of 9) sorted by relevance

/packages/apps/Car/Settings/src/com/android/car/settings/units/
DUnitsBasePreferenceController.java51 mSupportedUnits = mCarUnitsManager.getUnitsSupportedByProperty(
94 private CarUnitsManager mCarUnitsManager; field in UnitsBasePreferenceController
105 mCarUnitsManager = createCarUnitsManager(); in onCreateInternal()
106 mCarUnitsManager.registerCarServiceListener(mOnCarServiceListener); in onCreateInternal()
113 mCarUnitsManager.disconnect(); in onDestroyInternal()
114 mCarUnitsManager.unregisterCarServiceListener(); in onDestroyInternal()
130 mCarUnitsManager.setUnitUsedByProperty(getPropertyId(), unitId); in handlePreferenceChanged()
172 return mCarUnitsManager; in getCarUnitsManager()
181 Unit savedUnit = mCarUnitsManager.getUnitUsedByProperty(getPropertyId()); in getUnitUsedByThisProperty()
/packages/apps/Car/Settings/tests/unit/src/com/android/car/settings/units/
DUnitsBasePreferenceControllerTest.java68 private CarUnitsManager mCarUnitsManager; field in UnitsBasePreferenceControllerTest
75 doNothing().when(mCarUnitsManager).registerCarServiceListener(any()); in setUp()
76 when(mCarUnitsManager.getUnitsSupportedByProperty(TEST_PROPERTY_ID)) in setUp()
91 verify(mCarUnitsManager) in onCreate_registersCarServiceListener()
111 when(mCarUnitsManager.getUnitsSupportedByProperty(TEST_PROPERTY_ID)) in onCarServiceConnected_noAvailableUnits_preferenceIsConditionallyUnavailable()
149 assertThat(mCarUnitsManager.getUnitUsedByProperty(TEST_PROPERTY_ID)) in onPreferenceChanged_runsSetUnitUsedByPropertyWithNewUnit()
180 verify(mCarUnitsManager).disconnect(); in onDestroy_disconnectsCarUnitsManager()
187 verify(mCarUnitsManager).unregisterCarServiceListener(); in onDestroy_unregistersCarServiceListener()
191 when(mCarUnitsManager.getUnitUsedByProperty(TEST_PROPERTY_ID)) in updateDefaultUnit()
225 return mCarUnitsManager; in createCarUnitsManager()
DUnitsTemperaturePreferenceControllerTest.java61 private CarUnitsManager mCarUnitsManager; field in UnitsTemperaturePreferenceControllerTest
72 when(mCarUnitsManager.getUnitsSupportedByProperty(mCaptor.capture())) in setUp()
74 when(mCarUnitsManager.getUnitUsedByProperty(anyInt())).thenReturn(null); in setUp()
102 verify(mCarUnitsManager).setUnitUsedByProperty( in onPreferenceChanged_runsSetUnitUsedByPropertyWithNewUnit()
131 return mCarUnitsManager; in createCarUnitsManager()
DUnitsPressurePreferenceControllerTest.java62 private CarUnitsManager mCarUnitsManager; field in UnitsPressurePreferenceControllerTest
73 when(mCarUnitsManager.getUnitsSupportedByProperty(mCaptor.capture())) in setUp()
75 when(mCarUnitsManager.getUnitUsedByProperty(anyInt())).thenReturn(null); in setUp()
103 verify(mCarUnitsManager).setUnitUsedByProperty( in onPreferenceChanged_runsSetUnitUsedByPropertyWithNewUnit()
132 return mCarUnitsManager; in createCarUnitsManager()
DUnitsDistancePreferenceControllerTest.java61 private CarUnitsManager mCarUnitsManager; field in UnitsDistancePreferenceControllerTest
72 when(mCarUnitsManager.getUnitsSupportedByProperty(mCaptor.capture())) in setUp()
74 when(mCarUnitsManager.getUnitUsedByProperty(anyInt())).thenReturn(null); in setUp()
102 verify(mCarUnitsManager).setUnitUsedByProperty(VehiclePropertyIds.DISTANCE_DISPLAY_UNITS, in onPreferenceChanged_runsSetUnitUsedByPropertyWithNewUnit()
130 return mCarUnitsManager; in createCarUnitsManager()
DUnitsFuelConsumptionPreferenceControllerTest.java62 private CarUnitsManager mCarUnitsManager; field in UnitsFuelConsumptionPreferenceControllerTest
73 when(mCarUnitsManager.getUnitsSupportedByProperty(mCaptor.capture())) in setUp()
75 when(mCarUnitsManager.getUnitUsedByProperty(anyInt())).thenReturn(null); in setUp()
105 verify(mCarUnitsManager).setUnitUsedByProperty( in onPreferenceChanged_runsSetUnitUsedByPropertyWithNewUnit()
135 return mCarUnitsManager; in createCarUnitsManager()
DUnitsVolumePreferenceControllerTest.java61 private CarUnitsManager mCarUnitsManager; field in UnitsVolumePreferenceControllerTest
72 when(mCarUnitsManager.getUnitsSupportedByProperty(mCaptor.capture())) in setUp()
74 when(mCarUnitsManager.getUnitUsedByProperty(anyInt())).thenReturn(null); in setUp()
102 verify(mCarUnitsManager).setUnitUsedByProperty(VehiclePropertyIds.FUEL_VOLUME_DISPLAY_UNITS, in onPreferenceChanged_runsSetUnitUsedByPropertyWithNewUnit()
130 return mCarUnitsManager; in createCarUnitsManager()
DUnitsEnergyConsumptionPreferenceControllerTest.java62 private CarUnitsManager mCarUnitsManager; field in UnitsEnergyConsumptionPreferenceControllerTest
73 when(mCarUnitsManager.getUnitsSupportedByProperty(mCaptor.capture())) in setUp()
75 when(mCarUnitsManager.getUnitUsedByProperty(anyInt())).thenReturn(null); in setUp()
106 verify(mCarUnitsManager).setUnitUsedByProperty( in onPreferenceChanged_runsSetUnitUsedByPropertyWithNewUnit()
135 return mCarUnitsManager; in createCarUnitsManager()
DUnitsSpeedPreferenceControllerTest.java62 private CarUnitsManager mCarUnitsManager; field in UnitsSpeedPreferenceControllerTest
73 when(mCarUnitsManager.getUnitsSupportedByProperty(mCaptor.capture())) in setUp()
75 when(mCarUnitsManager.getUnitUsedByProperty(anyInt())).thenReturn(null); in setUp()
103 verify(mCarUnitsManager).setUnitUsedByProperty( in onPreferenceChanged_runsSetUnitUsedByPropertyWithNewUnit()
132 return mCarUnitsManager; in createCarUnitsManager()