/packages/apps/TV/tests/robotests/src/com/android/tv/dvr/ |
D | DvrScheduleManagerTest.java | 56 long channelId = 0; in testGetConflictingSchedules_noConflict() local 61 ++channelId, ++priority, 0L, 200L)); in testGetConflictingSchedules_noConflict() 66 ++channelId, ++priority, 0L, 100L)); in testGetConflictingSchedules_noConflict() 71 ++channelId, ++priority, 100L, 200L)); in testGetConflictingSchedules_noConflict() 76 ++channelId, ++priority, 0L, 100L)); in testGetConflictingSchedules_noConflict() 81 ++channelId, ++priority, 100L, 200L)); in testGetConflictingSchedules_noConflict() 88 long channelId = 0; in testGetConflictingSchedules_noTuner() local 94 ++channelId, ++priority, 0L, 200L)); in testGetConflictingSchedules_noTuner() 99 ++channelId, ++priority, 0L, 100L)); in testGetConflictingSchedules_noTuner() 106 long channelId = 0; in testGetConflictingSchedules_conflict() local [all …]
|
/packages/apps/TV/src/com/android/tv/data/ |
D | ProgramDataManager.java | 272 public Program getCurrentProgram(long channelId) { in getCurrentProgram() argument 273 return mChannelIdCurrentProgramMap.get(channelId); in getCurrentProgram() 298 public void prefetchChannel(long channelId, int selectedProgramIndex) { in prefetchChannel() argument 307 && isHorizontalLoadNeeded(startTimeMs, channelId, selectedProgramIndex)) { in prefetchChannel() 315 } else if (!mCompleteInfoChannelIds.contains(channelId)) { in prefetchChannel() 319 mCompleteInfoChannelIds.add(channelId); in prefetchChannel() 320 new SingleChannelPrefetchTask(channelId, startTimeMs, endTimeMs).executeOnDbThread(); in prefetchChannel() 324 public void prefetchChannel(long channelId) { in prefetchChannel() argument 325 prefetchChannel(channelId, 0); in prefetchChannel() 340 long startTimeMs, long channelId, int selectedProgramIndex) { in isHorizontalLoadNeeded() argument [all …]
|
D | WatchedHistoryManager.java | 245 public final long channelId; field in WatchedHistoryManager.WatchedRecord 249 WatchedRecord(long channelId, long watchedStartTime, long duration) { in WatchedRecord() argument 250 this.channelId = channelId; in WatchedRecord() 258 + channelId in toString() 269 return Objects.equals(channelId, that.channelId) in equals() 278 return Objects.hash(channelId, watchedStartTime, duration); in hashCode() 284 return record.channelId + " " + record.watchedStartTime + " " + record.duration; in encode() 290 long channelId = scanner.nextLong(); in decode() local 293 return new WatchedRecord(channelId, watchedStartTime, duration); in decode()
|
D | ChannelDataManager.java | 247 public void addChannelListener(Long channelId, ChannelListener listener) { in addChannelListener() argument 248 ChannelWrapper channelWrapper = mData.channelWrapperMap.get(channelId); in addChannelListener() 259 public void removeChannelListener(Long channelId, ChannelListener listener) { in removeChannelListener() argument 260 ChannelWrapper channelWrapper = mData.channelWrapperMap.get(channelId); in removeChannelListener() 309 public boolean doesChannelExistInDb(long channelId) { in doesChannelExistInDb() argument 310 return mData.channelWrapperMap.get(channelId) != null; in doesChannelExistInDb() 326 public Channel getChannel(Long channelId) { in getChannel() argument 327 ChannelWrapper channelWrapper = mData.channelWrapperMap.get(channelId); in getChannel() 335 public void updateBrowsable(Long channelId, boolean browsable) { in updateBrowsable() argument 336 updateBrowsable(channelId, browsable, false); in updateBrowsable() [all …]
|
/packages/apps/TV/src/com/android/tv/guide/ |
D | ProgramManager.java | 143 oldEntry.channelId, 161 oldEntry.channelId, 180 oldEntry.channelId, 342 int getProgramIdIndex(long channelId, long entryId) { in getProgramIdIndex() argument 343 List<TableEntry> entries = mChannelIdEntriesMap.get(channelId); in getProgramIdIndex() 355 int getProgramIndexAtTime(long channelId, long time) { in getProgramIndexAtTime() argument 356 List<TableEntry> entries = mChannelIdEntriesMap.get(channelId); in getProgramIndexAtTime() 406 int getChannelIndex(long channelId) { in getChannelIndex() argument 407 return getChannelIndex(mChannelDataManager.getChannel(channelId)); in getChannelIndex() 414 int getTableEntryCount(long channelId) { in getTableEntryCount() argument [all …]
|
/packages/apps/TV/tests/unit/src/com/android/tv/recommendation/ |
D | RecentChannelEvaluatorTest.java | 48 long channelId = addChannel().getId(); in testOneChannelWithNoWatchLog() local 52 Recommender.Evaluator.NOT_RECOMMENDED, mEvaluator.evaluateChannel(channelId)); in testOneChannelWithNoWatchLog() 73 for (long channelId : channelIdList) { in testMultiChannelsWithNoWatchLog() 75 Recommender.Evaluator.NOT_RECOMMENDED, mEvaluator.evaluateChannel(channelId)); in testMultiChannelsWithNoWatchLog() 98 for (long channelId : channelIdList) { in testMultiChannelsWithSimpleWatchLogs() 99 addWatchLog(channelId, latestWatchEndTimeMs, TimeUnit.HOURS.toMillis(1)); in testMultiChannelsWithSimpleWatchLogs() 107 for (long channelId : channelIdList) { in testMultiChannelsWithSimpleWatchLogs() 108 double score = mEvaluator.evaluateChannel(channelId); in testMultiChannelsWithSimpleWatchLogs() 125 for (long channelId : channelIdList) { in testScoreIncreasesWithNewWatchLog() 126 double previousScore = mEvaluator.evaluateChannel(channelId); in testScoreIncreasesWithNewWatchLog() [all …]
|
D | FavoriteChannelEvaluatorTest.java | 46 long channelId = addChannel().getId(); in testOneChannelWithNoWatchLog() local 50 Recommender.Evaluator.NOT_RECOMMENDED, mEvaluator.evaluateChannel(channelId)); in testOneChannelWithNoWatchLog() 71 for (long channelId : channelIdList) { in testMultiChannelsWithNoWatchLog() 73 Recommender.Evaluator.NOT_RECOMMENDED, mEvaluator.evaluateChannel(channelId)); in testMultiChannelsWithNoWatchLog() 97 for (long channelId : channelIdList) { in testMultiChannelsWithSimpleWatchLogs() 99 addWatchLog(channelId, latestWatchEndTimeMs, durationMs); in testMultiChannelsWithSimpleWatchLogs() 107 for (long channelId : channelIdList) { in testMultiChannelsWithSimpleWatchLogs() 108 double score = mEvaluator.evaluateChannel(channelId); in testMultiChannelsWithSimpleWatchLogs() 162 long channelId = addChannel().getId(); in testScoreIncreasesWithNewWatchLog() local 170 double previousScore = mEvaluator.evaluateChannel(channelId); in testScoreIncreasesWithNewWatchLog() [all …]
|
D | RecommendationUtils.java | 64 long channelId = (long) invocation.getArguments()[0]; in createMockRecommendationDataManager() 65 return channelRecordSortedMap.get(channelId); in createMockRecommendationDataManager() 108 long channelId = size(); in addChannel() local 109 ChannelImpl channel = new ChannelImpl.Builder().setId(channelId).build(); in addChannel() 111 put(channelId, channelRecord); in addChannel() 128 long channelId = channelIdList.get(mRandom.nextInt(channelIdList.size())); in addRandomWatchLogs() local 129 if (previousChannelId == channelId) { in addRandomWatchLogs() 134 if (!addWatchLog(channelId, latestWatchEndTimeMs, watchedDurationMs)) { in addRandomWatchLogs() 138 previousChannelId = channelId; in addRandomWatchLogs() 150 public boolean addWatchLog(long channelId, long watchStartTimeMs, long durationTimeMs) { in addWatchLog() argument [all …]
|
D | EvaluatorTestCase.java | 72 public void addWatchLog(long channelId, long watchStartTimeMs, long durationTimeMs) { in addWatchLog() argument 74 mChannelRecordSortedMap.addWatchLog(channelId, watchStartTimeMs, durationTimeMs)); in addWatchLog() 98 for (long channelId : mChannelRecordSortedMap.keySet()) { in assertChannelScoresValid() 99 double score = mEvaluator.evaluateChannel(channelId); in assertChannelScoresValid() 101 "Channel " + channelId + " score of " + score + "is not valid", in assertChannelScoresValid() 134 public ChannelRecord getChannelRecord(long channelId) { in getChannelRecord() argument 135 return mChannelRecordSortedMap.get(channelId); in getChannelRecord()
|
D | RecommenderTest.java | 250 for (long channelId : mChannelRecordSortedMap.keySet()) { in testListener_onRecommendationChanged() 251 mEvaluator.setChannelScore(channelId, 1.0); in testListener_onRecommendationChanged() 255 channelId, latestWatchEndTimeMs, TimeUnit.MINUTES.toMillis(10))) in testListener_onRecommendationChanged() 333 for (long channelId : channelIdList) { in setChannelScores_scoreIncreasesAsChannelIdIncreases() 335 mEvaluator.setChannelScore(channelId, score); in setChannelScores_scoreIncreasesAsChannelIdIncreases() 344 public double evaluateChannel(long channelId) { in evaluateChannel() argument 345 if (getRecommender().getChannelRecord(channelId) == null) { in evaluateChannel() 348 Double score = mChannelScore.get(channelId); in evaluateChannel() 352 public void setChannelScore(long channelId, double score) { in setChannelScore() argument 353 mChannelScore.put(channelId, score); in setChannelScore()
|
/packages/providers/TvProvider/tests/src/com/android/providers/tv/ |
D | Utils.java | 123 Long channelId; field in Utils.RecordedProgram 124 RecordedProgram(String pkgName, Long channelId) { in RecordedProgram() argument 125 this(-1, pkgName, channelId); in RecordedProgram() 128 RecordedProgram(long id, String pkgName, Long channelId) { in RecordedProgram() argument 130 this.channelId = channelId; in RecordedProgram() 141 && Objects.equals(channelId, that.channelId); in equals() 147 + channelId + ")"; in toString() 200 ContentResolver resolver, long channelId, Program... programs) { in insertPrograms() argument 202 values.put(TvContract.Programs.COLUMN_CHANNEL_ID, channelId); in insertPrograms() 231 ContentResolver resolver, long channelId, PreviewProgram... programs) { in insertPreviewPrograms() argument [all …]
|
D | ColumnFilterTest.java | 82 long channelId = insertChannel(false); in testQueryChannel() local 93 assertEquals(channelId, cursor.getLong(2)); in testQueryChannel() 97 long channelId = insertChannel(false); in testQueryChannel_count() local 109 long channelId = insertChannel(false); in testQueryChannelWithNullProjection() local 116 long channelId = insertChannel(false); in testQueryChannelWithNoValidColumn() local 128 long channelId = insertChannel(true); in testInsertAndQueryChannel() local 139 assertEquals(channelId, cursor.getLong(2)); in testInsertAndQueryChannel() 143 long channelId = insertChannel(false); in testUpdateChannel() local 157 assertEquals(channelId, cursor.getLong(2)); in testUpdateChannel()
|
/packages/apps/TV/tests/robotests/src/com/android/tv/data/ |
D | ProgramDataManagerTest.java | 119 for (long channelId = 1; channelId < Constants.UNIT_TEST_CHANNEL_COUNT; channelId++) { in testProgramUtils() 120 int index = stub.getIndex(mClock.currentTimeMillis(), channelId); in testProgramUtils() 121 long startTimeMs = stub.getStartTimeMs(index, channelId); in testProgramUtils() 145 for (long channelId = 1; channelId <= Constants.UNIT_TEST_CHANNEL_COUNT; channelId++) { in testGetPrograms() 146 Program currentProgram = mProgramDataManager.getCurrentProgram(channelId); in testGetPrograms() 159 mProgramDataManager.getPrograms(channelId, mClock.currentTimeMillis()); in testGetPrograms() 161 int index = stub.getIndex(mClock.currentTimeMillis(), channelId); in testGetPrograms() 164 long startTimeMs = stub.getStartTimeMs(index, channelId); in testGetPrograms() 170 programs = mProgramDataManager.getPrograms(channelId, startTimeMs); in testGetPrograms() 176 channelId, prefetchTimeRangeStartMs - TimeUnit.HOURS.toMillis(1)); in testGetPrograms() [all …]
|
/packages/apps/TV/tests/common/src/com/android/tv/testing/dvr/ |
D | RecordingTestUtils.java | 28 long id, String inputId, long channelId, long startTime, long endTime) { in createTestRecordingWithIdAndPeriod() argument 29 return ScheduledRecording.builder(inputId, channelId, startTime, endTime) in createTestRecordingWithIdAndPeriod() 31 .setChannelId(channelId) in createTestRecordingWithIdAndPeriod() 36 String inputId, long channelId, long startTime, long endTime) { in createTestRecordingWithPeriod() argument 38 ScheduledRecording.ID_NOT_SET, inputId, channelId, startTime, endTime); in createTestRecordingWithPeriod() 42 long channelId, long priority, long startTime, long endTime) { in createTestRecordingWithPriorityAndPeriod() argument 44 .setChannelId(channelId) in createTestRecordingWithPriorityAndPeriod() 50 long id, long channelId, long priority, long startTime, long endTime) { in createTestRecordingWithIdAndPriorityAndPeriod() argument 53 .setChannelId(channelId) in createTestRecordingWithIdAndPriorityAndPeriod()
|
/packages/apps/TV/src/com/android/tv/dvr/ |
D | DvrScheduleManager.java | 575 long channelId, long startTimeMs, long endTimeMs) { in getConflictingSchedules() argument 577 SoftPreconditions.checkState(channelId != Channel.INVALID_ID, TAG, "Invalid channel ID"); in getConflictingSchedules() 579 if (!mInitialized || channelId == Channel.INVALID_ID || startTimeMs >= endTimeMs) { in getConflictingSchedules() argument 582 TvInputInfo input = Utils.getTvInputInfoForChannelId(mContext, channelId); in getConflictingSchedules() 589 ScheduledRecording.builder(input.getId(), channelId, startTimeMs, endTimeMs) in getConflictingSchedules() 658 public List<ScheduledRecording> getConflictingSchedulesForTune(long channelId) { in getConflictingSchedulesForTune() argument 660 SoftPreconditions.checkState(channelId != Channel.INVALID_ID, TAG, "Invalid channel ID"); in getConflictingSchedulesForTune() 661 TvInputInfo input = Utils.getTvInputInfoForChannelId(mContext, channelId); in getConflictingSchedulesForTune() 663 input != null, TAG, "Can't find input for channel ID: " + channelId); in getConflictingSchedulesForTune() 664 if (!mInitialized || channelId == Channel.INVALID_ID || input == null) { in getConflictingSchedulesForTune() [all …]
|
/packages/apps/TV/tuner/src/com/android/tv/tuner/tvinput/datamanager/ |
D | ChannelDataManager.java | 205 public TunerChannel getChannel(long channelId) { in getChannel() argument 206 TunerChannel channel = mTunerChannelMap.get(channelId); in getChannel() 216 TvContract.buildChannelUri(channelId), in getChannel() 234 channel.setChannelId(channelId); in getChannel() 392 long channelId = getChannelId(channel); in handleEvents() local 393 if (channelId <= 0) { in handleEvents() 396 channel.setChannelId(channelId); in handleEvents() 589 long channelId = getChannelId(channel); in handleChannel() local 604 if (channelId <= 0) { in handleChannel() 618 channelId = ContentUris.parseId(channelUri); in handleChannel() [all …]
|
/packages/apps/TV/src/com/android/tv/recommendation/ |
D | Recommender.java | 160 public Channel getChannel(long channelId) { in getChannel() argument 161 ChannelRecord record = mDataManager.getChannelRecord(channelId); in getChannel() 171 public ChannelRecord getChannelRecord(long channelId) { in getChannelRecord() argument 172 return mDataManager.getChannelRecord(channelId); in getChannelRecord() 182 public String getChannelSortKey(long channelId) { in getChannelSortKey() argument 183 String key = mChannelSortKey.get(channelId); in getChannelSortKey() 258 protected abstract double evaluateChannel(final long channelId); in evaluateChannel() argument 298 private double getScaledEvaluatorScore(long channelId) { in getScaledEvaluatorScore() argument 299 double score = mEvaluator.evaluateChannel(channelId); in getScaledEvaluatorScore()
|
/packages/apps/TV/tests/unit/src/com/android/tv/data/ |
D | ChannelDataManagerTest.java | 469 long channelId = ContentUris.parseId(uri); in update() local 470 channelIds.add(channelId); in update() 491 for (long channelId : channelIds) { in update() 493 ChannelInfoWrapper channel = mChannelInfoList.get((int) channelId); in update() 526 long channelId = testChannelInfo.originalNetworkId; in simulateInsert() local 528 (int) channelId, in simulateInsert() 530 ChannelInfo.create(getTargetContext(), (int) channelId))); in simulateInsert() 531 mContentResolver.notifyChange(TvContract.buildChannelUri(channelId), null); in simulateInsert() 535 public void simulateDelete(long channelId) { in simulateDelete() argument 536 mChannelInfoList.remove((int) channelId); in simulateDelete() [all …]
|
/packages/apps/TV/src/com/android/tv/util/ |
D | Utils.java | 142 public static String getInputIdForChannel(Context context, long channelId) { in getInputIdForChannel() argument 143 if (channelId == Channel.INVALID_ID) { in getInputIdForChannel() 146 Uri channelUri = TvContract.buildChannelUri(channelId); in getInputIdForChannel() 169 long channelId = channel.getId(); in setLastWatchedChannel() local 175 .putLong(PREF_KEY_LAST_WATCHED_CHANNEL_ID, channelId) in setLastWatchedChannel() 178 channelId) in setLastWatchedChannel() 310 public static Program getProgramAt(Context context, long channelId, long timeMs) { in getProgramAt() argument 311 if (channelId == Channel.INVALID_ID) { in getProgramAt() 326 TvContract.buildChannelUri(channelId), timeMs, timeMs); in getProgramAt() 347 public static Program getCurrentProgram(Context context, long channelId) { in getCurrentProgram() argument [all …]
|
/packages/apps/Dialer/java/com/android/dialer/notification/ |
D | VoicemailChannelUtils.java | 110 String channelId = getChannelIdForAccount(handle); in getChannelId() local 111 if (!doesChannelExist(context, channelId)) { in getChannelId() 117 return channelId; in getChannelId() 120 private static boolean doesChannelExist(@NonNull Context context, @NonNull String channelId) { in doesChannelExist() argument 121 return context.getSystemService(NotificationManager.class).getNotificationChannel(channelId) in doesChannelExist() 217 @NonNull Context context, @NonNull String channelId, @Nullable CharSequence nameSuffix) { in newChannel() argument 225 new NotificationChannel(channelId, name, NotificationManager.IMPORTANCE_DEFAULT); in newChannel()
|
/packages/apps/TV/tests/common/src/com/android/tv/testing/data/ |
D | ProgramUtils.java | 71 long channelId = ContentUris.parseId(channelUri); in populatePrograms() local 73 values.put(Programs.COLUMN_CHANNEL_ID, channelId); in populatePrograms() 83 int index = program.getIndex(timeMs, channelId); in populatePrograms() 84 timeMs = program.getStartTimeMs(index, channelId); in populatePrograms() 141 for (Long channelId : channelIdToInfoMap.keySet()) { in updateProgramForAllChannelsOf() 144 context, TvContract.buildChannelUri(channelId), programInfo, clock, durationMs); in updateProgramForAllChannelsOf()
|
/packages/apps/TV/src/com/android/tv/search/ |
D | DataManagerSearch.java | 244 long channelId = channel.getId(); in addResult() local 245 result.setChannelId(channelId); in addResult() 250 result.setImageUri(TvContract.buildChannelLogoUri(channelId).toString()); in addResult() 252 result.setIntentData(buildIntentData(channelId)); in addResult() 266 result.setIntentData(buildIntentData(channelId)); in addResult() 304 private String buildIntentData(long channelId) { in buildIntentData() argument 305 return TvContract.buildChannelUri(channelId).toString(); in buildIntentData()
|
/packages/services/Telecomm/src/com/android/server/telecom/ui/ |
D | NotificationChannelManager.java | 68 private void createOrUpdateChannel(Context context, String channelId) { in createOrUpdateChannel() argument 69 NotificationChannel channel = createChannel(context, channelId); in createOrUpdateChannel() 73 private NotificationChannel createChannel(Context context, String channelId) { in createChannel() argument 82 switch (channelId) { in createChannel() 132 NotificationChannel channel = new NotificationChannel(channelId, name, importance); in createChannel()
|
/packages/apps/TV/src/com/android/tv/ |
D | ChannelTuner.java | 231 public Channel findNearestBrowsableChannel(long channelId) { in findNearestBrowsableChannel() argument 235 Channel channel = mChannelMap.get(channelId); in findNearestBrowsableChannel() 241 int index = mChannelIndexMap.get(channelId); in findNearestBrowsableChannel() 330 long channelId = channel.getId(); in updateChannelData() local 331 mChannelMap.put(channelId, channel); in updateChannelData() 332 mChannelIndexMap.put(channelId, i); in updateChannelData()
|
/packages/apps/TV/src/com/android/tv/data/epg/ |
D | EpgFetchHelper.java | 78 Context context, Clock clock, long channelId, List<Program> fetchedPrograms) { in updateEpgData() argument 86 List<Program> oldPrograms = queryPrograms(context, channelId, startTimeMs, endTimeMs); in updateEpgData() 146 Log.d(TAG, "Running " + size + " operations for channel " + channelId); in updateEpgData() 161 Log.d(TAG, "Updated " + fetchedProgramsCount + " programs for channel " + channelId); in updateEpgData() 204 Context context, long channelId, long startTimeMs, long endTimeMs) { in queryPrograms() argument 215 channelId, startTimeMs, endTimeMs), in queryPrograms()
|