Home
last modified time | relevance | path

Searched refs:ScheduledRecording (Results 1 – 25 of 66) sorted by relevance

123

/packages/apps/TV/src/com/android/tv/dvr/
DDvrScheduleManager.java36 import com.android.tv.dvr.data.ScheduledRecording;
66 private static final Comparator<ScheduledRecording> RESULT_COMPARATOR =
68 ScheduledRecording.PRIORITY_COMPARATOR.reversed(),
69 ScheduledRecording.START_TIME_COMPARATOR,
70 ScheduledRecording.ID_COMPARATOR.reversed());
74 private static final Comparator<ScheduledRecording> CANDIDATE_COMPARATOR =
76 ScheduledRecording.PRIORITY_COMPARATOR,
77 ScheduledRecording.END_TIME_COMPARATOR,
78 ScheduledRecording.ID_COMPARATOR);
84 private final Map<String, List<ScheduledRecording>> mInputScheduleMap = new HashMap<>();
[all …]
DDvrDataManagerImpl.java50 import com.android.tv.dvr.data.ScheduledRecording;
51 import com.android.tv.dvr.data.ScheduledRecording.RecordingState;
98 private final HashMap<Long, ScheduledRecording> mScheduledRecordings = new HashMap<>();
101 private final HashMap<Long, ScheduledRecording> mProgramId2ScheduledRecordings =
105 private final HashMap<Long, ScheduledRecording> mScheduledRecordingsForRemovedInput =
268 ListenableFuture<List<ScheduledRecording>> dvrQueryScheduleFuture = in start()
270 new FutureCallback<List<ScheduledRecording>>() { in start()
272 public void onSuccess(List<ScheduledRecording> result) { in start()
276 ScheduledRecording in start()
278 List<ScheduledRecording> toUpdate = new ArrayList<>(); in start()
[all …]
DBaseDvrDataManager.java30 import com.android.tv.dvr.data.ScheduledRecording;
31 import com.android.tv.dvr.data.ScheduledRecording.RecordingState;
58 private final HashMap<Long, ScheduledRecording> mDeletedScheduleMap = new HashMap<>();
187 protected final void notifyScheduledRecordingAdded(ScheduledRecording... scheduledRecording) { in notifyScheduledRecordingAdded()
195 protected final void notifyScheduledRecordingRemoved(ScheduledRecording... scheduledRecording) { in notifyScheduledRecordingRemoved()
206 ScheduledRecording... scheduledRecording) { in notifyScheduledRecordingStatusChanged()
217 private List<ScheduledRecording> filterEndTimeIsPast(List<ScheduledRecording> originals) { in filterEndTimeIsPast()
218 List<ScheduledRecording> results = new ArrayList<>(originals.size()); in filterEndTimeIsPast()
219 for (ScheduledRecording r : originals) { in filterEndTimeIsPast()
228 public List<ScheduledRecording> getAvailableScheduledRecordings() { in getAvailableScheduledRecordings()
[all …]
DDvrManager.java51 import com.android.tv.dvr.data.ScheduledRecording;
165 public ScheduledRecording addSchedule(Program program) { in addSchedule()
176 public ScheduledRecording addSchedule(Program program, in addSchedule()
195 public ScheduledRecording addScheduleWithHighestPriority(Program program) { in addScheduleWithHighestPriority()
214 private ScheduledRecording addSchedule(Program program, long priority, in addSchedule()
221 ScheduledRecording schedule; in addSchedule()
259 public void addSchedule(ScheduledRecording schedule) { in addSchedule()
267 ScheduledRecording.builder(inputId, channelId, startTime, endTime) in addScheduleInternal()
317 List<ScheduledRecording> toAdd = new ArrayList<>(); in addRecordedProgramToSeriesRecording()
325 ScheduledRecording.builder(recordedProgram) in addRecordedProgramToSeriesRecording()
[all …]
DDvrDataManager.java24 import com.android.tv.dvr.data.ScheduledRecording;
25 import com.android.tv.dvr.data.ScheduledRecording.RecordingState;
54 List<ScheduledRecording> getAllScheduledRecordings(); in getAllScheduledRecordings()
60 List<ScheduledRecording> getAvailableScheduledRecordings(); in getAvailableScheduledRecordings()
63 List<ScheduledRecording> getStartedRecordings(); in getStartedRecordings()
66 List<ScheduledRecording> getNonStartedScheduledRecordings(); in getNonStartedScheduledRecordings()
69 List<ScheduledRecording> getFailedScheduledRecordings(); in getFailedScheduledRecordings()
95 List<ScheduledRecording> getScheduledRecordings(Range<Long> period, @RecordingState int state); in getScheduledRecordings()
98 List<ScheduledRecording> getScheduledRecordings(long seriesRecordingId); in getScheduledRecordings()
101 List<ScheduledRecording> getScheduledRecordings(String inputId); in getScheduledRecordings()
[all …]
DWritableDvrDataManager.java20 import com.android.tv.dvr.data.ScheduledRecording;
21 import com.android.tv.dvr.data.ScheduledRecording.RecordingState;
33 void addScheduledRecording(ScheduledRecording... scheduledRecordings); in addScheduledRecording()
39 void removeScheduledRecording(ScheduledRecording... scheduledRecordings); in removeScheduledRecording()
45 void removeScheduledRecording(boolean forceRemove, ScheduledRecording... scheduledRecordings); in removeScheduledRecording()
51 void updateScheduledRecording(ScheduledRecording... scheduledRecordings); in updateScheduledRecording()
57 void changeState(ScheduledRecording scheduledRecording, @RecordingState int newState); in changeState()
65 ScheduledRecording scheduledRecording, @RecordingState int newState, int reason); in changeState()
/packages/apps/TV/tests/common/src/com/android/tv/testing/dvr/
DDvrDataManagerInMemoryImpl.java30 import com.android.tv.dvr.data.ScheduledRecording;
31 import com.android.tv.dvr.data.ScheduledRecording.RecordingState;
44 private final Map<Long, ScheduledRecording> mScheduledRecordings = new HashMap<>();
67 private List<ScheduledRecording> getScheduledRecordingsPrograms() { in getScheduledRecordingsPrograms()
77 public List<ScheduledRecording> getAllScheduledRecordings() { in getAllScheduledRecordings()
100 List<ScheduledRecording> temp = getNonStartedScheduledRecordings(); in getNextScheduledStartTimeAfter()
101 Collections.sort(temp, ScheduledRecording.START_TIME_COMPARATOR); in getNextScheduledStartTimeAfter()
102 for (ScheduledRecording r : temp) { in getNextScheduledStartTimeAfter()
111 public List<ScheduledRecording> getScheduledRecordings( in getScheduledRecordings()
113 List<ScheduledRecording> temp = getScheduledRecordingsPrograms(); in getScheduledRecordings()
[all …]
DRecordingTestUtils.java19 import com.android.tv.dvr.data.ScheduledRecording;
27 public static ScheduledRecording createTestRecordingWithIdAndPeriod( in createTestRecordingWithIdAndPeriod()
29 return ScheduledRecording.builder(inputId, channelId, startTime, endTime) in createTestRecordingWithIdAndPeriod()
35 public static ScheduledRecording createTestRecordingWithPeriod( in createTestRecordingWithPeriod()
38 ScheduledRecording.ID_NOT_SET, inputId, channelId, startTime, endTime); in createTestRecordingWithPeriod()
41 public static ScheduledRecording createTestRecordingWithPriorityAndPeriod( in createTestRecordingWithPriorityAndPeriod()
43 return ScheduledRecording.builder(INPUT_ID, CHANNEL_ID, startTime, endTime) in createTestRecordingWithPriorityAndPeriod()
49 public static ScheduledRecording createTestRecordingWithIdAndPriorityAndPeriod( in createTestRecordingWithIdAndPriorityAndPeriod()
51 return ScheduledRecording.builder(INPUT_ID, CHANNEL_ID, startTime, endTime) in createTestRecordingWithIdAndPriorityAndPeriod()
58 public static ScheduledRecording normalizePriority(ScheduledRecording orig) { in normalizePriority()
[all …]
/packages/apps/TV/tests/robotests/src/com/android/tv/dvr/
DDvrScheduleManagerTest.java27 import com.android.tv.dvr.data.ScheduledRecording;
49 List<ScheduledRecording> schedules = new ArrayList<>(); in testGetConflictingSchedules_emptySchedule()
57 List<ScheduledRecording> schedules = new ArrayList<>(); in testGetConflictingSchedules_noConflict()
89 List<ScheduledRecording> schedules = new ArrayList<>(); in testGetConflictingSchedules_noTuner()
107 List<ScheduledRecording> schedules = new ArrayList<>(); in testGetConflictingSchedules_conflict()
109 ScheduledRecording r1 = in testGetConflictingSchedules_conflict()
115 ScheduledRecording r2 = in testGetConflictingSchedules_conflict()
124 ScheduledRecording r3 = in testGetConflictingSchedules_conflict()
133 ScheduledRecording r4 = in testGetConflictingSchedules_conflict()
145 ScheduledRecording r5 = in testGetConflictingSchedules_conflict()
[all …]
DScheduledRecordingTest.java32 import com.android.tv.dvr.data.ScheduledRecording;
55 ScheduledRecording r = in testIsOverLapping()
74 ScheduledRecording actual = in testBuildProgram()
75 ScheduledRecording.builder(INPUT_ID, p).setChannelId(c.getId()).build(); in testBuildProgram()
76 assertWithMessage("type").that(actual.getType()).isEqualTo(ScheduledRecording.TYPE_PROGRAM); in testBuildProgram()
81 ScheduledRecording actual = in testBuildTime()
83 assertWithMessage("type").that(actual.getType()).isEqualTo(ScheduledRecording.TYPE_TIMED); in testBuildTime()
88 ScheduledRecording expected = in testBuildFrom()
90 ScheduledRecording actual = ScheduledRecording.buildFrom(expected).build(); in testBuildFrom()
96 ScheduledRecording a = in testBuild_priority()
[all …]
DBaseDvrDataManagerTest.java24 import com.android.tv.dvr.data.ScheduledRecording;
69 ScheduledRecording recording = in testGetNonStartedScheduledRecordings()
72 List<ScheduledRecording> result = mDvrDataManager.getNonStartedScheduledRecordings(); in testGetNonStartedScheduledRecordings()
80 List<ScheduledRecording> result = mDvrDataManager.getNonStartedScheduledRecordings(); in testGetNonStartedScheduledRecordings_past()
85 private ScheduledRecording createNewScheduledRecordingStartingNow() { in createNewScheduledRecordingStartingNow()
86 return ScheduledRecording.buildFrom( in createNewScheduledRecordingStartingNow()
88 ScheduledRecording.ID_NOT_SET, in createNewScheduledRecordingStartingNow()
93 .setState(ScheduledRecording.STATE_RECORDING_NOT_STARTED) in createNewScheduledRecordingStartingNow()
/packages/apps/TV/tests/robotests/src/com/android/tv/dvr/provider/
DDvrDbSyncTest.java35 import com.android.tv.dvr.data.ScheduledRecording;
74 private ScheduledRecording baseSchedule;
75 private ScheduledRecording baseSeriesSchedule;
101 baseSchedule = ScheduledRecording.builder(INPUT_ID, baseProgram).build(); in setUp()
102 baseSeriesSchedule = ScheduledRecording.builder(INPUT_ID, baseSeriesProgram).build(); in setUp()
144 ScheduledRecording.buildFrom(baseSchedule) in testHandleUpdateProgram_changeTimeInProgressNotCalled()
145 .setState(ScheduledRecording.STATE_RECORDING_IN_PROGRESS) in testHandleUpdateProgram_changeTimeInProgressNotCalled()
172 ScheduledRecording.buildFrom(baseSeriesSchedule) in testHandleUpdateProgram_finished()
173 .setState(ScheduledRecording.STATE_RECORDING_FINISHED) in testHandleUpdateProgram_finished()
189 ScheduledRecording schedule = ScheduledRecording.buildFrom(baseSchedule) in testHandleUpdateProgram_addOffsetNotStarted()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/ui/list/
DScheduleRow.java22 import com.android.tv.dvr.data.ScheduledRecording;
28 @Nullable private ScheduledRecording mSchedule;
32 public ScheduleRow(@Nullable ScheduledRecording recording, SchedulesHeaderRow headerRow) { in ScheduleRow()
44 public ScheduledRecording getSchedule() { in getSchedule()
71 public void setSchedule(@Nullable ScheduledRecording schedule) { in setSchedule()
104 && mSchedule.getState() == ScheduledRecording.STATE_RECORDING_NOT_STARTED; in isRecordingNotStarted()
110 && mSchedule.getState() == ScheduledRecording.STATE_RECORDING_IN_PROGRESS; in isRecordingInProgress()
116 && mSchedule.getState() == ScheduledRecording.STATE_RECORDING_FAILED; in isRecordingFailed()
122 && mSchedule.getState() == ScheduledRecording.STATE_RECORDING_CANCELED; in isScheduleCanceled()
127 && (mSchedule.getState() == ScheduledRecording.STATE_RECORDING_FAILED in isRecordingFinished()
[all …]
DDvrHistoryRowAdapter.java32 import com.android.tv.dvr.data.ScheduledRecording;
56 private final Map<Long, ScheduledRecording> mRecordedProgramScheduleMap = new HashMap<>();
81 List<ScheduledRecording> recordingList = mDvrDataManager.getFailedScheduledRecordings(); in start()
87 ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR.reversed()); in start()
90 ArrayList<ScheduledRecording> section = new ArrayList<>(); in start()
106 for (ScheduledRecording recording : section) { in start()
134 private List<ScheduledRecording> recordedProgramsToScheduledRecordings( in recordedProgramsToScheduledRecordings()
136 List<ScheduledRecording> result = new ArrayList<>(); in recordedProgramsToScheduledRecordings()
138 ScheduledRecording scheduledRecording = in recordedProgramsToScheduledRecordings()
148 private ScheduledRecording recordedProgramsToScheduledRecordings( in recordedProgramsToScheduledRecordings()
[all …]
DScheduleRowAdapter.java35 import com.android.tv.dvr.data.ScheduledRecording;
87 List<ScheduledRecording> recordingList = in start()
94 recordingList, ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR); in start()
97 ArrayList<ScheduledRecording> section = new ArrayList<>(); in start()
113 for (ScheduledRecording recording : section) { in start()
157 public ScheduleRow findRowByScheduledRecording(ScheduledRecording recording) { in findRowByScheduledRecording()
172 private ScheduleRow findRowWithStartRequest(ScheduledRecording schedule) { in findRowWithStartRequest()
188 private void addScheduleRow(ScheduledRecording recording) { in addScheduleRow()
197 if (ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR.compare( in addScheduleRow()
269 public void onScheduledRecordingAdded(ScheduledRecording schedule) { in onScheduledRecordingAdded()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/recorder/
DRecordingTask.java46 import com.android.tv.dvr.data.ScheduledRecording;
127 private ScheduledRecording mScheduledRecording;
137 ScheduledRecording scheduledRecording, in RecordingTask()
177 handleUpdateSchedule((ScheduledRecording) msg.obj); in handleMessage()
200 failAndQuit(ScheduledRecording.FAILED_REASON_NOT_FINISHED); in onDisconnected()
208 failAndQuit(ScheduledRecording.FAILED_REASON_CONNECTION_FAILED); in onConnectionFailed()
223 failAndQuit(ScheduledRecording.FAILED_REASON_MESSAGE_NOT_SENT); in onTuned()
244 int state = ScheduledRecording.STATE_RECORDING_FINISHED; in onRecordingStopped()
248 state = ScheduledRecording.STATE_RECORDING_CLIPPED; in onRecordingStopped()
274 ScheduledRecording scheduledRecording = in onError()
[all …]
DInputTaskScheduler.java35 import com.android.tv.dvr.data.ScheduledRecording;
66 public static Comparator<ScheduledRecording> getRecordingOrderComparator() { in getRecordingOrderComparator()
67 return ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR; in getRecordingOrderComparator()
79 Looper looper, ScheduledRecording scheduledRecording, RecordingTask recordingTask) { in HandlerWrapper()
111 private final Map<Long, ScheduledRecording> mWaitingSchedules = new ArrayMap<>();
165 ScheduledRecording schedule, in InputTaskScheduler()
185 public void addSchedule(ScheduledRecording schedule) { in addSchedule()
190 void handleAddSchedule(ScheduledRecording schedule) { in handleAddSchedule()
201 public void removeSchedule(ScheduledRecording schedule) { in removeSchedule()
206 void handleRemoveSchedule(ScheduledRecording schedule) { in handleRemoveSchedule()
[all …]
DRecordingScheduler.java45 import com.android.tv.dvr.data.ScheduledRecording;
196 List<ScheduledRecording> scheduledRecordings = in updatePendingRecordings()
201 ScheduledRecording.STATE_RECORDING_NOT_STARTED); in updatePendingRecordings()
202 for (ScheduledRecording r : scheduledRecordings) { in updatePendingRecordings()
220 public void onScheduledRecordingAdded(ScheduledRecording... schedules) { in onScheduledRecordingAdded()
229 public void onScheduledRecordingRemoved(ScheduledRecording... schedules) { in onScheduledRecordingRemoved()
235 for (ScheduledRecording schedule : schedules) { in onScheduledRecordingRemoved()
248 public void onScheduledRecordingStatusChanged(ScheduledRecording... schedules) { in onScheduledRecordingStatusChanged()
254 for (ScheduledRecording schedule : schedules) { in onScheduledRecordingStatusChanged()
263 private void handleScheduleChange(ScheduledRecording... schedules) { in handleScheduleChange()
[all …]
/packages/apps/TV/tests/robotests/src/com/android/tv/dvr/ui/list/
DDvrHistoryRowAdapterTest.java26 import com.android.tv.dvr.data.ScheduledRecording;
47 private static final ScheduledRecording SCHEDULE_1 =
52 ScheduledRecording.STATE_RECORDING_FAILED);
53 private static final ScheduledRecording SCHEDULE_1_COPY =
58 ScheduledRecording.STATE_RECORDING_FAILED);
59 private static final ScheduledRecording SCHEDULE_2 =
64 ScheduledRecording.STATE_RECORDING_FAILED);
65 private static final ScheduledRecording SCHEDULE_2_COPY =
70 ScheduledRecording.STATE_RECORDING_FAILED);
114 ScheduledRecording toAdd = in testOnScheduledRecordingAdded_existingHeader()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/ui/browse/
DDvrBrowseFragment.java46 import com.android.tv.dvr.data.ScheduledRecording;
130 if (lhs instanceof ScheduledRecording) {
131 if (rhs instanceof ScheduledRecording) {
132 return ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR
133 .compare((ScheduledRecording) lhs, (ScheduledRecording) rhs);
137 } else if (rhs instanceof ScheduledRecording) {
146 if (lhs instanceof ScheduledRecording) {
147 if (rhs instanceof ScheduledRecording) {
148 return ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR
150 .compare((ScheduledRecording) lhs, (ScheduledRecording) rhs);
[all …]
DDetailsContent.java29 import com.android.tv.dvr.data.ScheduledRecording;
97 Context context, ScheduledRecording scheduledRecording) { in createFromScheduledRecording()
103 if (scheduledRecording.getState() == ScheduledRecording.STATE_RECORDING_FAILED) { in createFromScheduledRecording()
125 scheduledRecording.getState() == ScheduledRecording.STATE_RECORDING_FAILED) in createFromScheduledRecording()
129 private static String getErrorMessage(Context context, ScheduledRecording recording) { in getErrorMessage()
132 ? ScheduledRecording.FAILED_REASON_OTHER in getErrorMessage()
135 case ScheduledRecording.FAILED_REASON_PROGRAM_ENDED_BEFORE_RECORDING_STARTED: in getErrorMessage()
137 case ScheduledRecording.FAILED_REASON_RESOURCE_BUSY: in getErrorMessage()
139 case ScheduledRecording.FAILED_REASON_INPUT_UNAVAILABLE: in getErrorMessage()
142 case ScheduledRecording.FAILED_REASON_INPUT_DVR_UNSUPPORTED: in getErrorMessage()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/provider/
DDvrDbSync.java39 import com.android.tv.dvr.data.ScheduledRecording;
126 public void onScheduledRecordingAdded(ScheduledRecording... schedules) {
127 for (ScheduledRecording schedule : schedules) {
134 public void onScheduledRecordingRemoved(ScheduledRecording... schedules) {
135 for (ScheduledRecording schedule : schedules) {
141 public void onScheduledRecordingStatusChanged(ScheduledRecording... schedules) {
142 for (ScheduledRecording schedule : schedules) {
235 List<ScheduledRecording> schedulesToRemove = new ArrayList<>(); in onChannelsUpdated()
236 for (ScheduledRecording r : mDataManager.getAvailableScheduledRecordings()) { in onChannelsUpdated()
243 mDataManager.removeScheduledRecording(ScheduledRecording.toArray(schedulesToRemove)); in onChannelsUpdated()
[all …]
DDvrDbFuture.java25 import com.android.tv.dvr.data.ScheduledRecording;
75 public static class AddScheduleFuture extends DvrDbFuture<ScheduledRecording, Void> {
81 protected final Void dbHelperInBackground(ScheduledRecording... params) { in dbHelperInBackground()
88 public static class UpdateScheduleFuture extends DvrDbFuture<ScheduledRecording, Void> {
94 protected final Void dbHelperInBackground(ScheduledRecording... params) { in dbHelperInBackground()
101 public static class DeleteScheduleFuture extends DvrDbFuture<ScheduledRecording, Void> {
107 protected final Void dbHelperInBackground(ScheduledRecording... params) { in dbHelperInBackground()
114 public static class DvrQueryScheduleFuture extends DvrDbFuture<Void, List<ScheduledRecording>> {
136 protected final List<ScheduledRecording> dbHelperInBackground(Void... params) { in dbHelperInBackground()
140 List<ScheduledRecording> scheduledRecordings = new ArrayList<>(); in dbHelperInBackground()
[all …]
/packages/apps/TV/src/com/android/tv/dialog/
DDvrHistoryDialogFragment.java38 import com.android.tv.dvr.data.ScheduledRecording;
39 import com.android.tv.dvr.data.ScheduledRecording.RecordingState;
52 private final List<ScheduledRecording> mSchedules = new ArrayList<>();
59 for (ScheduledRecording schedule : dataManager.getAllScheduledRecordings()) { in onCreateDialog()
64 mSchedules.sort(ScheduledRecording.START_TIME_COMPARATOR.reversed()); in onCreateDialog()
67 new ArrayAdapter<ScheduledRecording>( in onCreateDialog()
70 ScheduledRecording.toArray(mSchedules)) { in onCreateDialog()
75 ScheduledRecording schedule = mSchedules.get(position); in onCreateDialog()
98 case ScheduledRecording.STATE_RECORDING_CLIPPED: in onCreateDialog()
100 case ScheduledRecording.STATE_RECORDING_FAILED: in onCreateDialog()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/data/
DScheduledRecording.java50 public final class ScheduledRecording implements Parcelable { class
63 public static final Comparator<ScheduledRecording> START_TIME_COMPARATOR =
64 (ScheduledRecording lhs, ScheduledRecording rhs) ->
68 public static final Comparator<ScheduledRecording> END_TIME_COMPARATOR =
69 (ScheduledRecording lhs, ScheduledRecording rhs) ->
73 public static final Comparator<ScheduledRecording> ID_COMPARATOR =
74 (ScheduledRecording lhs, ScheduledRecording rhs) -> Long.compare(lhs.mId, rhs.mId);
77 public static final Comparator<ScheduledRecording> PRIORITY_COMPARATOR =
78 (ScheduledRecording lhs, ScheduledRecording rhs) ->
85 public static final Comparator<ScheduledRecording> START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR =
[all …]

123