/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/modes/ |
D | ZenModeExitAtAlarmPreferenceControllerTest.java | 62 ZenModeConfig.ScheduleInfo scheduleInfo = new ZenModeConfig.ScheduleInfo(); in testUpdateState() local 63 scheduleInfo.days = new int[] { Calendar.MONDAY }; in testUpdateState() 64 scheduleInfo.startHour = 1; in testUpdateState() 65 scheduleInfo.endHour = 2; in testUpdateState() 66 scheduleInfo.exitAtAlarm = false; in testUpdateState() 70 ZenModeConfig.toScheduleConditionId(scheduleInfo)).build(), in testUpdateState() 78 scheduleInfo.exitAtAlarm = true; in testUpdateState() 79 mode.getRule().setConditionId(ZenModeConfig.toScheduleConditionId(scheduleInfo)); in testUpdateState() 91 ZenModeConfig.ScheduleInfo scheduleInfo = new ZenModeConfig.ScheduleInfo(); in testOnPreferenceChange() local 92 scheduleInfo.days = new int[] { Calendar.MONDAY }; in testOnPreferenceChange() [all …]
|
D | ZenModeSetSchedulePreferenceControllerTest.java | 87 ZenModeConfig.ScheduleInfo scheduleInfo = new ZenModeConfig.ScheduleInfo(); in updateScheduleRule_updatesConditionAndTriggerDescription() local 88 scheduleInfo.days = new int[] { Calendar.MONDAY }; in updateScheduleRule_updatesConditionAndTriggerDescription() 89 scheduleInfo.startHour = 1; in updateScheduleRule_updatesConditionAndTriggerDescription() 90 scheduleInfo.endHour = 2; in updateScheduleRule_updatesConditionAndTriggerDescription() 91 ZenMode out = mPrefController.updateScheduleMode(scheduleInfo).apply(mode); in updateScheduleRule_updatesConditionAndTriggerDescription() 94 .isEqualTo(ZenModeConfig.toScheduleConditionId(scheduleInfo)); in updateScheduleRule_updatesConditionAndTriggerDescription()
|
D | ZenModeSetTriggerLinkPreferenceControllerTest.java | 176 ZenModeConfig.ScheduleInfo scheduleInfo = new ZenModeConfig.ScheduleInfo(); in testRuleLink_schedule() local 177 scheduleInfo.days = new int[] { Calendar.MONDAY, Calendar.TUESDAY, Calendar.THURSDAY }; in testRuleLink_schedule() 178 scheduleInfo.startHour = 1; in testRuleLink_schedule() 179 scheduleInfo.endHour = 15; in testRuleLink_schedule() 181 ZenModeConfig.toScheduleConditionId(scheduleInfo)) in testRuleLink_schedule()
|
/packages/services/Car/tests/CarLibUnitTest/src/android/car/remoteaccess/ |
D | CarRemoteAccessManagerUnitTest.java | 342 ScheduleInfo scheduleInfo = builder.setCount(TEST_TASK_COUNT).setPeriodic(TEST_PERIODIC) in testScheduleInfoBuilder() local 345 expectWithMessage("scheduleId from ScheduleInfo").that(scheduleInfo.getScheduleId()) in testScheduleInfoBuilder() 347 expectWithMessage("taskType from ScheduleInfo").that(scheduleInfo.getTaskType()) in testScheduleInfoBuilder() 349 expectWithMessage("taskData from ScheduleInfo").that(scheduleInfo.getTaskData()) in testScheduleInfoBuilder() 352 .that(scheduleInfo.getStartTimeInEpochSeconds()).isEqualTo(TEST_START_TIME); in testScheduleInfoBuilder() 353 expectWithMessage("count from ScheduleInfo").that(scheduleInfo.getCount()) in testScheduleInfoBuilder() 355 expectWithMessage("periodic from ScheduleInfo").that(scheduleInfo.getPeriodic()) in testScheduleInfoBuilder() 363 ScheduleInfo scheduleInfo = builder.setCount(TEST_TASK_COUNT).setPeriodic(TEST_PERIODIC) in testScheduleInfoBuilder_enterGarageMode() local 366 expectWithMessage("scheduleId from ScheduleInfo").that(scheduleInfo.getScheduleId()) in testScheduleInfoBuilder_enterGarageMode() 368 expectWithMessage("taskType from ScheduleInfo").that(scheduleInfo.getTaskType()) in testScheduleInfoBuilder_enterGarageMode() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/remoteaccess/hal/ |
D | RemoteAccessHalWrapperUnitTest.java | 235 ScheduleInfo scheduleInfo = mock(ScheduleInfo.class); in testScheduleTask() local 237 mHalWrapper.scheduleTask(scheduleInfo); in testScheduleTask() 239 verify(mRemoteAccessHal).scheduleTask(scheduleInfo); in testScheduleTask() 246 ScheduleInfo scheduleInfo = mock(ScheduleInfo.class); in testScheduleTask_remoteException() local 248 assertThrows(RemoteException.class, () -> mHalWrapper.scheduleTask(scheduleInfo)); in testScheduleTask_remoteException() 255 ScheduleInfo scheduleInfo = mock(ScheduleInfo.class); in testScheduleTask_serviceSpecificException() local 257 assertThrows(ServiceSpecificException.class, () -> mHalWrapper.scheduleTask(scheduleInfo)); in testScheduleTask_serviceSpecificException() 346 List<ScheduleInfo> scheduleInfo = new ArrayList<>(); in testGetAllPendingScheduledTasks() local 347 scheduleInfo.add(mockScheduleInfo); in testGetAllPendingScheduledTasks() 349 doReturn(scheduleInfo).when(mRemoteAccessHal).getAllPendingScheduledTasks(TEST_CLIENT_ID); in testGetAllPendingScheduledTasks() [all …]
|
/packages/apps/Settings/tests/robotests/src/com/android/settings/notification/zen/ |
D | ZenModeScheduleRuleSettingsTest.java | 116 ZenModeConfig.ScheduleInfo scheduleInfo = new ZenModeConfig.ScheduleInfo(); in updateScheduleRule_updatesConditionAndTriggerDescription() local 117 scheduleInfo.days = new int[] { Calendar.MONDAY }; in updateScheduleRule_updatesConditionAndTriggerDescription() 118 scheduleInfo.startHour = 1; in updateScheduleRule_updatesConditionAndTriggerDescription() 119 scheduleInfo.endHour = 2; in updateScheduleRule_updatesConditionAndTriggerDescription() 120 mFragment.updateScheduleRule(scheduleInfo); in updateScheduleRule_updatesConditionAndTriggerDescription() 126 .isEqualTo(ZenModeConfig.toScheduleConditionId(scheduleInfo)); in updateScheduleRule_updatesConditionAndTriggerDescription()
|
/packages/services/Car/car-lib/src/android/car/remoteaccess/ |
D | CarRemoteAccessManager.java | 951 public void scheduleTask(@NonNull ScheduleInfo scheduleInfo) in scheduleTask() argument 953 Preconditions.checkArgument(scheduleInfo != null, "scheduleInfo cannot be null"); in scheduleTask() 954 TaskScheduleInfo taskScheduleInfo = toTaskScheduleInfo(scheduleInfo); in scheduleTask() 1073 private static TaskScheduleInfo toTaskScheduleInfo(ScheduleInfo scheduleInfo) { in toTaskScheduleInfo() argument 1075 taskScheduleInfo.taskType = scheduleInfo.getTaskType(); in toTaskScheduleInfo() 1076 taskScheduleInfo.scheduleId = scheduleInfo.getScheduleId(); in toTaskScheduleInfo() 1077 taskScheduleInfo.taskData = scheduleInfo.getTaskData(); in toTaskScheduleInfo() 1078 taskScheduleInfo.count = scheduleInfo.getCount(); in toTaskScheduleInfo() 1079 taskScheduleInfo.startTimeInEpochSeconds = scheduleInfo.getStartTimeInEpochSeconds(); in toTaskScheduleInfo() 1080 taskScheduleInfo.periodicInSeconds = scheduleInfo.getPeriodic().getSeconds(); in toTaskScheduleInfo()
|
D | ICarRemoteAccessService.aidl | 77 void scheduleTask(in TaskScheduleInfo scheduleInfo); in scheduleTask() argument
|
/packages/services/Car/service/src/com/android/car/remoteaccess/hal/ |
D | RemoteAccessHalWrapper.java | 191 public void scheduleTask(ScheduleInfo scheduleInfo) in scheduleTask() argument 195 remoteAccessHal.scheduleTask(scheduleInfo); in scheduleTask() 197 Slogf.w(TAG, e, "Failed to call scheduleTask with scheduleInfo: %s", scheduleInfo); in scheduleTask()
|
/packages/services/Car/service/src/com/android/car/remoteaccess/ |
D | CarRemoteAccessService.java | 856 public void scheduleTask(TaskScheduleInfo scheduleInfo) { in scheduleTask() argument 858 Preconditions.checkArgument(scheduleInfo != null, "scheduleInfo must not be null"); in scheduleTask() 859 Preconditions.checkArgument(scheduleInfo.scheduleId != null, "scheduleId must not be null"); in scheduleTask() 860 Preconditions.checkArgument(scheduleInfo.taskData != null, "task data must not be null"); in scheduleTask() 861 Preconditions.checkArgument(scheduleInfo.count >= 0, "count must >= 0"); in scheduleTask() 862 Preconditions.checkArgument(scheduleInfo.startTimeInEpochSeconds > 0, in scheduleTask() 864 Preconditions.checkArgument(scheduleInfo.periodicInSeconds >= 0, in scheduleTask() 869 switch (scheduleInfo.taskType) { in scheduleTask() 878 + scheduleInfo.taskType); in scheduleTask() 880 halScheduleInfo.scheduleId = scheduleInfo.scheduleId; in scheduleTask() [all …]
|
/packages/services/Car/tests/carservice_unit_test/src/com/android/car/remoteaccess/ |
D | CarRemoteAccessServiceUnitTest.java | 1622 ScheduleInfo scheduleInfo = new ScheduleInfo(); in testGetAllPendingScheduledTasks() local 1623 scheduleInfo.scheduleId = TEST_SCHEDULE_ID; in testGetAllPendingScheduledTasks() 1624 scheduleInfo.taskType = TaskType.CUSTOM; in testGetAllPendingScheduledTasks() 1625 scheduleInfo.taskData = TEST_TASK_DATA; in testGetAllPendingScheduledTasks() 1626 scheduleInfo.count = TEST_TASK_COUNT; in testGetAllPendingScheduledTasks() 1627 scheduleInfo.startTimeInEpochSeconds = TEST_START_TIME; in testGetAllPendingScheduledTasks() 1628 scheduleInfo.periodicInSeconds = TEST_PERIODIC; in testGetAllPendingScheduledTasks() 1630 .thenReturn(List.of(scheduleInfo)); in testGetAllPendingScheduledTasks() 1642 ScheduleInfo scheduleInfo = new ScheduleInfo(); in testGetAllPendingScheduledTasks_convertUnknownTaskType() local 1643 scheduleInfo.scheduleId = TEST_SCHEDULE_ID; in testGetAllPendingScheduledTasks_convertUnknownTaskType() [all …]
|