/packages/apps/Settings/tests/robotests/src/com/android/settings/datetime/ |
D | AutoTimeZonePreferenceControllerTest.java | 65 private TimeManager mTimeManager; field in AutoTimeZonePreferenceControllerTest 76 when(mContext.getSystemService(TimeManager.class)).thenReturn(mTimeManager); in setUp() 86 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in isFromSUW_notAvailable() 97 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in notFromSUW_isAvailable() 108 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in autoTimeZoneNotSupported_notAvailable() 117 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in isFromSUW_notEnable() 128 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in isFromSUW_isEnable() 139 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in autoTimeZoneNotSupported_notEnable() 149 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in isEnabled_autoEnabledIsFalse_shouldReadFromTimeManagerConfig() 159 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in isEnabled_autoEnabledIsTrue_shouldReadFromTimeManagerConfig() [all …]
|
D | AutoTimePreferenceControllerTest.java | 55 private TimeManager mTimeManager; field in AutoTimePreferenceControllerTest 62 when(mContext.getSystemService(TimeManager.class)).thenReturn(mTimeManager); in setUp() 72 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in autoTimeNotSupported_notAvailable() 81 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in autoTimeNotSupported_notEnable() 91 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in isEnabled_autoEnabledIsFalse_shouldReadFromTimeManagerConfig() 101 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in isEnabled_autoEnabledIsTrue_shouldReadFromTimeManagerConfig() 110 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in updatePreferenceChange_prefIsChecked_shouldUpdatePreferenceAndNotifyCallback() 111 when(mTimeManager.updateTimeConfiguration(Mockito.any())).thenReturn(true); in updatePreferenceChange_prefIsChecked_shouldUpdatePreferenceAndNotifyCallback() 120 verify(mTimeManager).updateTimeConfiguration(timeConfiguration); in updatePreferenceChange_prefIsChecked_shouldUpdatePreferenceAndNotifyCallback() 125 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn( in updatePreferenceChange_prefIsChecked_shouldUpdatePreferenceAndNotifyCallback() [all …]
|
D | LocationProviderStatusPreferenceControllerTest.java | 65 private TimeManager mTimeManager; field in LocationProviderStatusPreferenceControllerTest 72 when(mContext.getSystemService(TimeManager.class)).thenReturn(mTimeManager); in setUp() 89 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testProviderStatus_primaryCertain() 97 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testProviderStatus_primaryCertain() 105 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testProviderStatus_primaryCertain() 116 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testProviderStatus_primaryCertain() 124 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testProviderStatus_primaryCertain() 132 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testProviderStatus_primaryCertain() 140 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testProviderStatus_primaryCertain() 154 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testProviderStatus_primaryUncertain() [all …]
|
D | LocationTimeZoneDetectionPreferenceControllerTest.java | 66 private TimeManager mTimeManager; field in LocationTimeZoneDetectionPreferenceControllerTest 76 when(mContext.getSystemService(TimeManager.class)).thenReturn(mTimeManager); in setUp() 86 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in setChecked_withTrue_shouldUpdateSetting_whenLocationIsEnabled() 95 verify(mTimeManager).updateTimeZoneConfiguration(expectedConfiguration); in setChecked_withTrue_shouldUpdateSetting_whenLocationIsEnabled() 108 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in setChecked_withTrue_shouldDoNothing_whenLocationIsDisabled() 114 verify(mTimeManager, never()).updateTimeZoneConfiguration(any()); in setChecked_withTrue_shouldDoNothing_whenLocationIsDisabled() 122 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in setChecked_withFalse_shouldUpdateSetting() 131 verify(mTimeManager).updateTimeZoneConfiguration(expectedConfiguration); in setChecked_withFalse_shouldUpdateSetting() 139 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testLocationTimeZoneDetection_supported_shouldBeShown() 149 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in testLocationTimeZoneDetection_unsupported_shouldNotBeShown() [all …]
|
D | TimePreferenceControllerTest.java | 46 private TimeManager mTimeManager; field in TimePreferenceControllerTest 55 when(mContext.getSystemService(TimeManager.class)).thenReturn(mTimeManager); in setUp() 69 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in updateState_dateEntryDisabled_shouldDisablePref() 83 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in updateState_dateEntryEnabled_shouldEnablePref()
|
D | TimeZonePreferenceControllerTest.java | 55 private TimeManager mTimeManager; field in TimeZonePreferenceControllerTest 65 doReturn(mTimeManager).when(mContext).getSystemService(TimeManager.class); in setUp() 80 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in updateState_suggestManualNotAllowed_shouldDisablePref() 94 when(mTimeManager.getTimeZoneCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in updateState_suggestManualAllowed_shouldEnablePref()
|
D | DatePreferenceControllerTest.java | 63 private TimeManager mTimeManager; field in DatePreferenceControllerTest 75 when(mContext.getSystemService(TimeManager.class)).thenReturn(mTimeManager); in setUp() 94 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in updateState_autoTimeEnabled_shouldDisablePref() 107 when(mTimeManager.getTimeCapabilitiesAndConfig()).thenReturn(capabilitiesAndConfig); in updateState_autoTimeDisabled_shouldEnablePref()
|
/packages/apps/Settings/src/com/android/settings/datetime/ |
D | AutoTimeZonePreferenceController.java | 38 private final TimeManager mTimeManager; field in AutoTimeZonePreferenceController 42 mTimeManager = context.getSystemService(TimeManager.class); in AutoTimeZonePreferenceController() 102 boolean result = mTimeManager.updateTimeZoneConfiguration(configuration); in setChecked() 118 mTimeManager.getTimeZoneCapabilitiesAndConfig().getDetectorStatus())) { in getSummary() 133 return mTimeManager.getTimeZoneCapabilitiesAndConfig(); in getTimeZoneCapabilitiesAndConfig()
|
D | LocationTimeZoneDetectionPreferenceController.java | 51 private final TimeManager mTimeManager; field in LocationTimeZoneDetectionPreferenceController 58 mTimeManager = context.getSystemService(TimeManager.class); in LocationTimeZoneDetectionPreferenceController() 88 return mTimeManager.updateTimeZoneConfiguration(configuration); in setChecked() 103 mTimeManager.addTimeZoneDetectorListener(mainExecutor, this); in onStart() 110 mTimeManager.removeTimeZoneDetectorListener(this); in onStop() 211 mTimeZoneCapabilitiesAndConfig = mTimeManager.getTimeZoneCapabilitiesAndConfig(); in getTimeZoneCapabilitiesAndConfig()
|
D | AutoTimePreferenceController.java | 37 private final TimeManager mTimeManager; field in AutoTimePreferenceController 41 mTimeManager = context.getSystemService(TimeManager.class); in AutoTimePreferenceController() 84 boolean result = mTimeManager.updateTimeConfiguration(configuration); in setChecked() 103 return mTimeManager.getTimeCapabilitiesAndConfig(); in getTimeCapabilitiesAndConfig()
|
D | LocationProviderStatusPreferenceController.java | 49 private final TimeManager mTimeManager; field in LocationProviderStatusPreferenceController 55 mTimeManager = context.getSystemService(TimeManager.class); in LocationProviderStatusPreferenceController() 58 mTimeManager.addTimeZoneDetectorListener(mainExecutor, this); in LocationProviderStatusPreferenceController() 96 mTimeManager.getTimeZoneCapabilitiesAndConfig().getDetectorStatus() in getLtzpStatusToReport() 137 mTimeManager.getTimeZoneCapabilitiesAndConfig(); in getSummary()
|
D | TimeZonePreferenceController.java | 36 private final TimeManager mTimeManager; field in TimeZonePreferenceController 40 mTimeManager = context.getSystemService(TimeManager.class); in TimeZonePreferenceController() 74 mTimeManager.getTimeZoneCapabilitiesAndConfig().getCapabilities(); in shouldEnableManualTimeZoneSelection()
|
D | TimePreferenceController.java | 51 private TimeManager mTimeManager; field in TimePreferenceController 55 mTimeManager = context.getSystemService(TimeManager.class); in TimePreferenceController() 144 mTimeManager.getTimeCapabilitiesAndConfig().getCapabilities(); in isEnabled()
|
D | DatePreferenceController.java | 53 private final TimeManager mTimeManager; field in DatePreferenceController 57 mTimeManager = context.getSystemService(TimeManager.class); in DatePreferenceController() 156 mTimeManager.getTimeCapabilitiesAndConfig().getCapabilities(); in isEnabled()
|
/packages/services/Car/service/src/com/android/car/hal/ |
D | TimeHalService.java | 55 private final TimeManager mTimeManager; field in TimeHalService 98 mTimeManager = requireNonNull(context.getSystemService(TimeManager.class)); in TimeHalService() 231 mTimeManager.suggestExternalTime(mLastExternalTimeSuggestion); in suggestExternalTimeLocked()
|