Home
last modified time | relevance | path

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

123

/packages/apps/TV/src/com/android/tv/dvr/
DDvrScheduleManager.java35 import com.android.tv.dvr.data.ScheduledRecording;
64 private static final Comparator<ScheduledRecording> RESULT_COMPARATOR =
66 ScheduledRecording.PRIORITY_COMPARATOR.reversed(),
67 ScheduledRecording.START_TIME_COMPARATOR,
68 ScheduledRecording.ID_COMPARATOR.reversed());
72 private static final Comparator<ScheduledRecording> CANDIDATE_COMPARATOR =
74 ScheduledRecording.PRIORITY_COMPARATOR,
75 ScheduledRecording.END_TIME_COMPARATOR,
76 ScheduledRecording.ID_COMPARATOR);
82 private final Map<String, List<ScheduledRecording>> mInputScheduleMap = new HashMap<>();
[all …]
DDvrDataManagerImpl.java48 import com.android.tv.dvr.data.ScheduledRecording;
49 import com.android.tv.dvr.data.ScheduledRecording.RecordingState;
88 private final HashMap<Long, ScheduledRecording> mScheduledRecordings = new HashMap<>();
91 private final HashMap<Long, ScheduledRecording> mProgramId2ScheduledRecordings =
95 private final HashMap<Long, ScheduledRecording> mScheduledRecordingsForRemovedInput =
241 ListenableFuture<List<ScheduledRecording>> dvrQueryScheduleFuture = in start()
243 new FutureCallback<List<ScheduledRecording>>() { in start()
245 public void onSuccess(List<ScheduledRecording> result) { in start()
249 ScheduledRecording in start()
251 List<ScheduledRecording> toUpdate = new ArrayList<>(); in start()
[all …]
DDvrManager.java50 import com.android.tv.dvr.data.ScheduledRecording;
163 public ScheduledRecording addSchedule(Program program) { in addSchedule()
179 public ScheduledRecording addScheduleWithHighestPriority(Program program) { in addScheduleWithHighestPriority()
196 private ScheduledRecording addSchedule(Program program, long priority) { in addSchedule()
202 ScheduledRecording schedule; in addSchedule()
238 public void addSchedule(ScheduledRecording schedule) { in addSchedule()
246 ScheduledRecording.builder(inputId, channelId, startTime, endTime) in addScheduleInternal()
296 List<ScheduledRecording> toAdd = new ArrayList<>(); in addRecordedProgramToSeriesRecording()
304 ScheduledRecording.builder(recordedProgram) in addRecordedProgramToSeriesRecording()
311 mDataManager.addScheduledRecording(ScheduledRecording.toArray(toAdd)); in addRecordedProgramToSeriesRecording()
[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 …]
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/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 …]
DConflictChecker.java39 import com.android.tv.dvr.data.ScheduledRecording;
82 private final List<ScheduledRecording> mUpcomingConflicts = new ArrayList<>();
85 private final Map<Long, List<ScheduledRecording>> mCheckedConflictsMap = new HashMap<>();
90 public void onScheduledRecordingAdded(ScheduledRecording... scheduledRecordings) {
101 public void onScheduledRecordingRemoved(ScheduledRecording... scheduledRecordings) {
113 ScheduledRecording... scheduledRecordings) {
165 public List<ScheduledRecording> getUpcomingConflicts() { in getUpcomingConflicts()
186 public void setCheckedConflictsForChannel(long mChannelId, List<ScheduledRecording> conflicts) { in setCheckedConflictsForChannel()
214 List<ScheduledRecording> conflicts = in onCheckConflict()
218 for (ScheduledRecording schedule : conflicts) { in onCheckConflict()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/ui/browse/
DDvrBrowseFragment.java45 import com.android.tv.dvr.data.ScheduledRecording;
129 if (lhs instanceof ScheduledRecording) {
130 if (rhs instanceof ScheduledRecording) {
131 return ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR
132 .compare((ScheduledRecording) lhs, (ScheduledRecording) rhs);
136 } else if (rhs instanceof ScheduledRecording) {
145 if (lhs instanceof ScheduledRecording) {
146 if (rhs instanceof ScheduledRecording) {
147 return ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR
149 .compare((ScheduledRecording) lhs, (ScheduledRecording) rhs);
[all …]
DDetailsContent.java28 import com.android.tv.dvr.data.ScheduledRecording;
96 Context context, ScheduledRecording scheduledRecording) { in createFromScheduledRecording()
102 if (scheduledRecording.getState() == ScheduledRecording.STATE_RECORDING_FAILED) { in createFromScheduledRecording()
124 scheduledRecording.getState() == ScheduledRecording.STATE_RECORDING_FAILED) in createFromScheduledRecording()
128 private static String getErrorMessage(Context context, ScheduledRecording recording) { in getErrorMessage()
130 ? ScheduledRecording.FAILED_REASON_OTHER in getErrorMessage()
133 case ScheduledRecording.FAILED_REASON_PROGRAM_ENDED_BEFORE_RECORDING_STARTED: in getErrorMessage()
135 case ScheduledRecording.FAILED_REASON_RESOURCE_BUSY: in getErrorMessage()
137 case ScheduledRecording.FAILED_REASON_INPUT_UNAVAILABLE: in getErrorMessage()
141 case ScheduledRecording.FAILED_REASON_INPUT_DVR_UNSUPPORTED: in getErrorMessage()
[all …]
DScheduledRecordingPresenter.java24 import com.android.tv.dvr.data.ScheduledRecording;
29 class ScheduledRecordingPresenter extends DvrItemPresenter<ScheduledRecording> {
37 private ScheduledRecording mScheduledRecording;
53 protected void onBound(ScheduledRecording recording) { in onBound()
72 if (recordingState == ScheduledRecording.STATE_RECORDING_IN_PROGRESS) { in updateProgressBar()
84 } else if (recordingState == ScheduledRecording.STATE_RECORDING_FINISHED) { in updateProgressBar()
116 DvrItemViewHolder baseHolder, ScheduledRecording recording) { in onBindDvrItemViewHolder()
122 if (recording.getState() == ScheduledRecording.STATE_RECORDING_FAILED) { in onBindDvrItemViewHolder()
132 private String generateMajorContent(ScheduledRecording recording) { in generateMajorContent()
/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.java33 import com.android.tv.dvr.data.ScheduledRecording;
57 private final Map<Long, ScheduledRecording> mRecordedProgramScheduleMap = new HashMap<>();
77 List<ScheduledRecording> recordingList = mDvrDataManager.getFailedScheduledRecordings(); in start()
83 .sort(ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR.reversed()); in start()
86 ArrayList<ScheduledRecording> section = new ArrayList<>(); in start()
102 for (ScheduledRecording recording : section) { in start()
130 private List<ScheduledRecording> recordedProgramsToScheduledRecordings( in recordedProgramsToScheduledRecordings()
132 List<ScheduledRecording> result = new ArrayList<>(); in recordedProgramsToScheduledRecordings()
134 ScheduledRecording scheduledRecording = in recordedProgramsToScheduledRecordings()
144 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 …]
DScheduleRowPresenter.java46 import com.android.tv.dvr.data.ScheduledRecording;
426 ScheduledRecording schedule = row.getSchedule(); in onBindRowViewHolder()
462 private boolean isFailedRecording(ScheduledRecording scheduledRecording) { in isFailedRecording()
464 && scheduledRecording.getState() == ScheduledRecording.STATE_RECORDING_FAILED; in isFailedRecording()
467 private String getErrorMessage(ScheduledRecording recording) { in getErrorMessage()
470 ? ScheduledRecording.FAILED_REASON_OTHER in getErrorMessage()
473 case ScheduledRecording.FAILED_REASON_PROGRAM_ENDED_BEFORE_RECORDING_STARTED: in getErrorMessage()
475 case ScheduledRecording.FAILED_REASON_RESOURCE_BUSY: in getErrorMessage()
477 case ScheduledRecording.FAILED_REASON_INPUT_UNAVAILABLE: in getErrorMessage()
481 case ScheduledRecording.FAILED_REASON_INPUT_DVR_UNSUPPORTED: in getErrorMessage()
[all …]
DBaseDvrSchedulesFragment.java30 import com.android.tv.dvr.data.ScheduledRecording;
126 public void onScheduledRecordingAdded(ScheduledRecording... scheduledRecordings) { in onScheduledRecordingAdded()
128 for (ScheduledRecording recording : scheduledRecordings) { in onScheduledRecordingAdded()
135 public void onScheduledRecordingRemoved(ScheduledRecording... scheduledRecordings) { in onScheduledRecordingRemoved()
137 for (ScheduledRecording recording : scheduledRecordings) { in onScheduledRecordingRemoved()
144 public void onScheduledRecordingStatusChanged(ScheduledRecording... scheduledRecordings) { in onScheduledRecordingStatusChanged()
146 for (ScheduledRecording recording : scheduledRecordings) { in onScheduledRecordingStatusChanged()
153 public void onConflictStateChange(boolean conflict, ScheduledRecording... schedules) { in onConflictStateChange()
155 for (ScheduledRecording recording : schedules) { in onConflictStateChange()
/packages/apps/TV/src/com/android/tv/dvr/provider/
DDvrDbSync.java38 import com.android.tv.dvr.data.ScheduledRecording;
117 public void onScheduledRecordingAdded(ScheduledRecording... schedules) {
118 for (ScheduledRecording schedule : schedules) {
125 public void onScheduledRecordingRemoved(ScheduledRecording... schedules) {
126 for (ScheduledRecording schedule : schedules) {
132 public void onScheduledRecordingStatusChanged(ScheduledRecording... schedules) {
133 for (ScheduledRecording schedule : schedules) {
206 List<ScheduledRecording> schedulesToRemove = new ArrayList<>(); in onChannelsUpdated()
207 for (ScheduledRecording r : mDataManager.getAvailableScheduledRecordings()) { in onChannelsUpdated()
214 mDataManager.removeScheduledRecording(ScheduledRecording.toArray(schedulesToRemove)); in onChannelsUpdated()
[all …]
DDvrDbFuture.java24 import com.android.tv.dvr.data.ScheduledRecording;
76 extends DvrDbFuture<ScheduledRecording, Void> {
82 protected final Void dbHelperInBackground(ScheduledRecording... params) { in dbHelperInBackground()
90 extends DvrDbFuture<ScheduledRecording, Void> {
96 protected final Void dbHelperInBackground(ScheduledRecording... params) { in dbHelperInBackground()
104 extends DvrDbFuture<ScheduledRecording, Void> {
110 protected final Void dbHelperInBackground(ScheduledRecording... params) { in dbHelperInBackground()
118 extends DvrDbFuture<Void, List<ScheduledRecording>> {
125 protected final List<ScheduledRecording> dbHelperInBackground(Void... params) { in dbHelperInBackground()
129 List<ScheduledRecording> scheduledRecordings = new ArrayList<>(); in dbHelperInBackground()
[all …]
/packages/apps/TV/src/com/android/tv/dvr/data/
DScheduledRecording.java48 public final class ScheduledRecording implements Parcelable { class
58 public static final Comparator<ScheduledRecording> START_TIME_COMPARATOR =
59 (ScheduledRecording lhs, ScheduledRecording rhs) ->
63 public static final Comparator<ScheduledRecording> END_TIME_COMPARATOR =
64 (ScheduledRecording lhs, ScheduledRecording rhs) ->
68 public static final Comparator<ScheduledRecording> ID_COMPARATOR =
69 (ScheduledRecording lhs, ScheduledRecording rhs) -> Long.compare(lhs.mId, rhs.mId);
72 public static final Comparator<ScheduledRecording> PRIORITY_COMPARATOR =
73 (ScheduledRecording lhs, ScheduledRecording rhs) ->
80 public static final Comparator<ScheduledRecording> START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR =
[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/ui/
DDvrUiHelper.java53 import com.android.tv.dvr.data.ScheduledRecording;
315 ScheduledRecording duplicate = in handleCreateSchedule()
321 && (duplicate.getState() == ScheduledRecording.STATE_RECORDING_NOT_STARTED in handleCreateSchedule()
323 == ScheduledRecording.STATE_RECORDING_IN_PROGRESS)) { in handleCreateSchedule()
371 private static ScheduledRecording getEarliestScheduledRecording( in getEarliestScheduledRecording()
372 List<ScheduledRecording> recordings) { in getEarliestScheduledRecording()
373 ScheduledRecording earlistScheduledRecording = null; in getEarliestScheduledRecording()
376 recordings, ScheduledRecording.START_TIME_THEN_PRIORITY_THEN_ID_COMPARATOR); in getEarliestScheduledRecording()
406 List<ScheduledRecording> conflicts = in startSchedulesActivityForTuneConflict()
415 Context context, List<ScheduledRecording> conflicts) { in startSchedulesActivityForOneTimeRecordingConflict()
[all …]

123