/packages/apps/TV/src/com/android/tv/data/ |
D | ProgramDataManager.java | 107 private final Map<Long, Program> mChannelIdCurrentProgramMap = new ConcurrentHashMap<>(); 112 private Map<Long, ArrayList<Program>> mChannelIdProgramCache = new ConcurrentHashMap<>(); 127 private final LruCache<Long, Program> mZeroLengthProgramCache = new LruCache<>(10); 242 public Program getCurrentProgram(long channelId) { in getCurrentProgram() 248 public List<Program> getCurrentPrograms() { in getCurrentPrograms() 328 public List<Program> getPrograms(long channelId, long startTime) { in getPrograms() 330 ArrayList<Program> cachedPrograms = mChannelIdProgramCache.get(channelId); in getPrograms() 345 private int getProgramIndexAt(List<Program> programs, long time) { in getProgramIndexAt() 346 Program key = mZeroLengthProgramCache.get(time); in getProgramIndexAt() 363 private boolean isProgramPlayedAt(Program program, long time) { in isProgramPlayedAt() [all …]
|
D | Program.java | 52 public final class Program extends BaseProgram implements Comparable<Program>, Parcelable { class 124 public static Program fromCursor(Cursor cursor) { in fromCursor() 168 public static Program fromCursorPartialProjection(Cursor cursor) { in fromCursorPartialProjection() 182 public static Program fromParcel(Parcel in) { in fromParcel() 183 Program program = new Program(); in fromParcel() 218 public static final Parcelable.Creator<Program> CREATOR = 219 new Parcelable.Creator<Program>() { 221 public Program createFromParcel(Parcel in) { 222 return Program.fromParcel(in); 226 public Program[] newArray(int size) { [all …]
|
/packages/providers/TvProvider/tests/src/com/android/providers/tv/ |
D | EpgDataCleanupServiceTests.java | 89 private static class Program { class in EpgDataCleanupServiceTests 94 Program(long startTime, long endTime) { in Program() method in EpgDataCleanupServiceTests.Program 98 Program(long id, long startTime, long endTime) { in Program() method in EpgDataCleanupServiceTests.Program 106 if (!(obj instanceof Program)) { in equals() 109 Program that = (Program) obj; in equals() 134 private void insertPrograms(Program... programs) { in insertPrograms() 138 private void insertPrograms(Collection<Program> programs) { in insertPrograms() 143 for (Program program : programs) { in insertPrograms() 152 private Set<Program> queryPrograms() { in queryPrograms() 162 Set<Program> programs = Sets.newHashSet(); in queryPrograms() [all …]
|
D | Utils.java | 82 public static class Program extends BaseProgram { class in Utils 83 Program(String pkgName) { in Program() method in Utils.Program 87 Program(long id, String pkgName) { in Program() method in Utils.Program 93 if (!(obj instanceof Program)) { in equals() 96 Program that = (Program) obj; in equals() 200 ContentResolver resolver, long channelId, Program... programs) { in insertPrograms() 203 for (Program program : programs) { in insertPrograms() 210 public static Set<Program> queryPrograms(ContentResolver resolver) { in queryPrograms() 220 Set<Program> programs = Sets.newHashSet(); in queryPrograms() 222 programs.add(new Program(cursor.getLong(0), cursor.getString(1))); in queryPrograms()
|
D | UnrecognizedColumnsTest.java | 12 import com.android.providers.tv.Utils.Program; 28 private Program mProgram; 106 mProgram = new Program(1, MY_PACKAGE); in insertPrograms() 111 Program anotherProgram = new Program(2, ANOTHER_PACKAGE); in insertPrograms()
|
/packages/apps/Car/libs/car-broadcastradio-support/src/com/android/car/broadcastradio/support/ |
D | Program.java | 37 public final class Program implements Parcelable { class 41 public Program(@NonNull ProgramSelector selector, @NonNull String name) { in Program() method in Program 76 if (!(obj instanceof Program)) return false; in equals() 77 Program other = (Program) obj; in equals() 84 public static @NonNull Program fromProgramInfo(@NonNull ProgramInfo info) { in fromProgramInfo() 85 return new Program(info.getSelector(), ProgramInfoExt.getProgramName(info, 0)); in fromProgramInfo() 88 private Program(Parcel in) { in Program() method in Program 104 public static final Parcelable.Creator<Program> CREATOR = new Parcelable.Creator<Program>() { 105 public Program createFromParcel(Parcel in) { 106 return new Program(in); [all …]
|
/packages/apps/TV/tests/common/src/com/android/tv/testing/ |
D | FakeEpgReader.java | 25 import com.android.tv.data.Program; 47 public final ListMultimap<String, Program> epgChannelId2Programs = LinkedListMultimap.create(2); 118 public List<Program> getPrograms(EpgChannel epgChannel) { in getPrograms() 126 public Map<EpgChannel, Collection<Program>> getPrograms( in getPrograms() 131 ImmutableMap.Builder<EpgChannel, Collection<Program>> mapBuilder = ImmutableMap.builder(); in getPrograms() 133 Iterable<Program> programs = getPrograms(epgChannel); in getPrograms() 142 protected Function<Program, Program> updateWith(final EpgChannel channel) { in updateWith() 143 return new Function<Program, Program>() { in updateWith() 146 public Program apply(@Nullable Program program) { in updateWith() 147 return new Program.Builder(program) in updateWith() [all …]
|
D | EpgTestData.java | 21 import com.android.tv.data.Program; 77 public static final Program PROGRAM_1 = 78 new Program.Builder() 84 public static final Program PROGRAM_2 = 85 new Program.Builder() 115 public ListMultimap<String, Program> getEpgPrograms() { 116 ImmutableListMultimap.Builder<String, Program> builder = 137 public abstract ListMultimap<String, Program> getEpgPrograms(); in getEpgPrograms() 188 private static Iterable<Program> updateTime(long time, Program... programs) { 191 new Function<Program, Program>() { [all …]
|
/packages/apps/TV/src/com/android/tv/ |
D | TimeShiftManager.java | 33 import com.android.tv.data.Program; 173 private Program mCurrentProgram; 313 Program program = in jumpToPrevious() 339 Program currentProgram = in jumpToNext() 344 Program nextProgram = mProgramManager.getProgramAt(currentProgram.getEndTimeUtcMillis()); in jumpToNext() 449 Program currentProgram = getProgramAt(mCurrentPositionMediator.mCurrentPositionMs); in updateCurrentProgram() 450 if (!Program.isProgramValid(currentProgram)) { in updateCurrentProgram() 485 public Program getProgramAt(long timeMs) { in getProgramAt() 486 Program program = mProgramManager.getProgramAt(timeMs); in getProgramAt() 548 public Program getCurrentProgram() { in getCurrentProgram() [all …]
|
/packages/apps/TV/src/com/android/tv/dvr/recorder/ |
D | SeriesRecordingScheduler.java | 34 import com.android.tv.data.Program; 396 private LongSparseArray<List<Program>> pickOneProgramPerEpisode( in pickOneProgramPerEpisode() 397 List<SeriesRecording> seriesRecordings, List<Program> programs) { in pickOneProgramPerEpisode() 402 public static LongSparseArray<List<Program>> pickOneProgramPerEpisode( in pickOneProgramPerEpisode() 405 List<Program> programs) { in pickOneProgramPerEpisode() 407 LongSparseArray<List<Program>> result = new LongSparseArray<>(); in pickOneProgramPerEpisode() 414 Map<SeasonEpisodeNumber, List<Program>> programsForEpisodeMap = new HashMap<>(); in pickOneProgramPerEpisode() 415 for (Program program : programs) { in pickOneProgramPerEpisode() 428 List<Program> programsForEpisode = programsForEpisodeMap.get(seasonEpisodeNumber); in pickOneProgramPerEpisode() 436 for (Entry<SeasonEpisodeNumber, List<Program>> entry : programsForEpisodeMap.entrySet()) { in pickOneProgramPerEpisode() [all …]
|
/packages/apps/TV/src/com/android/tv/data/epg/ |
D | EpgFetchHelper.java | 33 import com.android.tv.data.Program; 75 Context context, Clock clock, long channelId, List<Program> fetchedPrograms) { in updateEpgData() 83 List<Program> oldPrograms = queryPrograms(context, channelId, startTimeMs, endTimeMs); in updateEpgData() 91 Program oldProgram = in updateEpgData() 95 Program newProgram = fetchedPrograms.get(newProgramsIndex); in updateEpgData() 109 .withValues(Program.toContentValues(newProgram, context)) in updateEpgData() 135 .withValues(Program.toContentValues(newProgram, context)) in updateEpgData() 200 private static List<Program> queryPrograms( in queryPrograms() 202 String[] projection = Program.PROJECTION; in queryPrograms() 220 ArrayList<Program> programs = new ArrayList<>(); in queryPrograms() [all …]
|
/packages/apps/Car/Radio/src/com/android/car/radio/storage/ |
D | RadioStorage.java | 29 import com.android.car.broadcastradio.support.Program; 51 private final LiveData<List<Program>> mFavorites; 76 public LiveData<List<Program>> getFavorites() { in getFavorites() 86 public static boolean isFavorite(@NonNull List<Program> favorites, in isFavorite() 88 return favorites.contains(new Program(selector, "")); in isFavorite() 97 List<Program> favorites = mFavorites.getValue(); in isFavorite() 105 private class AddFavoriteTask extends AsyncTask<Program, Void, Void> { 107 protected Void doInBackground(Program... programs) { in doInBackground() 129 public void addFavorite(@NonNull Program favorite) { in addFavorite()
|
D | Favorite.java | 26 import com.android.car.broadcastradio.support.Program; 55 Favorite(@NonNull Program program) { in Favorite() 61 public Program toProgram() { in toProgram() 62 return new Program(selector, name); in toProgram()
|
/packages/apps/Car/Radio/src/com/android/car/radio/ |
D | BrowseAdapter.java | 31 import com.android.car.broadcastradio.support.Program; 80 void onItemFavoriteChanged(Program program, boolean saveAsFavorite); in onItemFavoriteChanged() 84 public Program program; 88 Entry(Program program, boolean isFavorite) { in Entry() 97 @NonNull LiveData<List<Program>> favorites) { in BrowseAdapter() 142 .map(pi -> new Entry(Program.fromProgramInfo(pi), false)) in setProgramList() 167 private void onFavoritesChanged(List<Program> favorites) { in onFavoritesChanged() 168 Map<ProgramSelector.Identifier, Program> favMap = favorites.stream().collect( in onFavoritesChanged() 224 return new Entry(Program.fromProgramInfo(mCurrentProgram), false); in getEntryLocked()
|
/packages/apps/TV/src/com/android/tv/recommendation/ |
D | ChannelPreviewUpdater.java | 35 import com.android.tv.data.Program; 168 new AsyncTask<Void, Void, Set<Program>>() { in updatePreviewDataForChannels() 170 protected Set<Program> doInBackground(Void... params) { in updatePreviewDataForChannels() 171 Set<Program> programs = new HashSet<>(); in updatePreviewDataForChannels() 176 final Program program = in updatePreviewDataForChannels() 193 private boolean isChannelRecommendationApplicable(Channel channel, Program program) { in updatePreviewDataForChannels() 220 protected void onPostExecute(Set<Program> programs) { in updatePreviewDataForChannels() 226 private void updatePreviewDataForChannelsInternal(Set<Program> programs) { in updatePreviewDataForChannelsInternal() 269 long previewChannelId, Set<Program> programs) { in generatePreviewProgramContentsFromPrograms() 271 for (Program program : programs) { in generatePreviewProgramContentsFromPrograms()
|
D | RoutineWatchEvaluator.java | 22 import com.android.tv.data.Program; 46 Program currentProgram = cr.getCurrentProgram(); in evaluateChannel() 56 Program watchedProgram = watchHistory[watchHistory.length - 1].getProgram(); in evaluateChannel() 95 Program currentProgram, Program watchedProgram, long watchedDurationMs) { in calculateRoutineWatchScore() 154 private static double calculateTimeMatchScore(Program p1, Program p2) { in calculateTimeMatchScore() 199 private static double calculateWatchDurationScore(Program program, long durationMs) { in calculateWatchDurationScore() 235 public static ProgramTime createFromProgram(Program p) { in createFromProgram()
|
D | WatchedProgram.java | 19 import com.android.tv.data.Program; 22 private final Program mProgram; 26 public WatchedProgram(Program program, long watchStartTimeMs, long watchEndTimeMs) { in WatchedProgram() 44 public Program getProgram() { in getProgram()
|
/packages/apps/TV/src/com/android/tv/dvr/provider/ |
D | EpisodicProgramLoadTask.java | 31 import com.android.tv.data.Program; 50 private static final int PROGRAM_ID_INDEX = Program.getColumnIndex(Programs._ID); 52 Program.getColumnIndex(Programs.COLUMN_START_TIME_UTC_MILLIS); 54 Program.getColumnIndex(Programs.COLUMN_RECORDING_PROHIBITED); 180 protected void onPostExecute(List<Program> programs) {} in onPostExecute() 183 protected void onCancelled(List<Program> programs) {} in onCancelled() 196 protected void onPostExecute(List<Program> programs) { in createTask() 201 protected void onCancelled(List<Program> programs) { in createTask() 292 Program program = Program.fromCursor(c);
|
/packages/apps/TV/src/com/android/tv/util/ |
D | AsyncDbTask.java | 35 import com.android.tv.data.Program; 327 public abstract static class AsyncProgramQueryTask extends AsyncQueryListTask<Program> { 329 super(executor, context, Programs.CONTENT_URI, Program.PROJECTION, null, null, null); in AsyncProgramQueryTask() 344 Program.PROJECTION, in AsyncProgramQueryTask() 352 protected final Program fromCursor(Cursor c) { in fromCursor() 353 return Program.fromCursor(c); in fromCursor() 414 public static class AsyncQueryProgramTask extends AsyncQueryItemTask<Program> { 421 Program.PROJECTION, in AsyncQueryProgramTask() 428 protected Program fromCursor(Cursor c) { in fromCursor() 429 return Program.fromCursor(c); in fromCursor()
|
/packages/apps/TV/src/com/android/tv/dvr/ui/ |
D | DvrUiHelper.java | 48 import com.android.tv.data.Program; 120 Activity activity, Program program, boolean addCurrentProgramToSeries) { in showScheduleDialog() 142 public static void showScheduleConflictDialog(Activity activity, Program program) { in showScheduleConflictDialog() 225 public static void showAlreadyScheduleDialog(Activity activity, Program program) { in showAlreadyScheduleDialog() 235 public static void showAlreadyRecordedDialog(Activity activity, Program program) { in showAlreadyRecordedDialog() 259 Activity activity, Channel channel, Program program, boolean addProgramToSeries) { in requestRecordingCurrentProgram() 280 Activity activity, Program program, boolean addProgramToSeries) { in requestRecordingFutureProgram() 292 Activity activity, Program program, boolean addProgramToSeries) { in handleCreateSchedule() 458 @Nullable List<Program> programs, in startSeriesSettingsActivity() 462 Program currentProgram) { in startSeriesSettingsActivity() [all …]
|
D | DvrSeriesSettingsFragment.java | 33 import com.android.tv.data.Program; 69 private Program mCurrentProgram; 79 private List<Program> mPrograms; 101 (List<Program>) BigArguments.getArgument(DvrSeriesSettingsActivity.PROGRAM_LIST); in onAttach() 110 for (Program program : mPrograms) { in onAttach() 301 List<Program> recordingCandidates = new ArrayList<>(); in updateSchedulesToSeries() 313 for (Program program : mPrograms) { in updateSchedulesToSeries() 328 List<Program> programsToSchedule = in updateSchedulesToSeries()
|
/packages/apps/TV/src/com/android/tv/dvr/ui/list/ |
D | SeriesScheduleRowAdapter.java | 29 import com.android.tv.data.Program; 52 private final Map<Long, Program> mPrograms = new ArrayMap<>(); 84 public void setPrograms(List<Program> programs) { in setPrograms() 90 List<Program> sortedPrograms = new ArrayList<>(programs); in setPrograms() 100 for (Program program : sortedPrograms) { in setPrograms() 249 for (Iterator<Program> iter = mPrograms.values().iterator(); iter.hasNext(); ) { in handleUpdateRow() 250 Program program = iter.next(); in handleUpdateRow() 269 for (Program program : mPrograms.values()) { in getNextTimerMs()
|
D | EpisodicProgramRow.java | 20 import com.android.tv.data.Program; 28 private final Program mProgram; 32 Program program, in EpisodicProgramRow() 41 public Program getProgram() { in getProgram()
|
/packages/apps/TV/src/com/android/tv/ui/ |
D | ChannelBannerView.java | 53 import com.android.tv.data.Program; 83 Provider<Program> getCurrentProgramProvider(); in getCurrentProgramProvider() 110 private Program mNoProgram; 111 private Program mLockedChannelProgram; 116 private final Provider<Program> mCurrentProgramProvider; 143 private Program mLastUpdatedProgram; 268 new Program.Builder() in ChannelBannerView() 273 new Program.Builder() in ChannelBannerView() 609 private void updateProgramInfo(Program program) { 653 private void updateProgramTextView(Program program) { [all …]
|
/packages/apps/TV/src/com/android/tv/dvr/ |
D | DvrManager.java | 44 import com.android.tv.data.Program; 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() 253 Program selectedProgram, in addSeriesRecording() 254 List<Program> programsToSchedule, in addSeriesRecording() 321 SeriesRecording series, List<Program> programsToSchedule) { in addScheduleToSeriesRecording() 332 for (Program program : programsToSchedule) { in addScheduleToSeriesRecording() 579 public List<ScheduledRecording> getConflictingSchedules(Program program) { in getConflictingSchedules() 665 Program program = in isChannelRecordable() [all …]
|