/packages/apps/TV/src/com/android/tv/guide/ |
D | ProgramManager.java | 127 public void onSingleChannelUpdated(long channelId) { 135 createProgramEntries(channelId, parentalControlsEnabled); 136 mChannelIdEntriesMap.put(channelId, entries); 150 oldEntry.channelId, 168 oldEntry.channelId, 187 oldEntry.channelId, 352 int getProgramIdIndex(long channelId, long entryId) { in getProgramIdIndex() argument 353 List<TableEntry> entries = mChannelIdEntriesMap.get(channelId); in getProgramIdIndex() 365 int getProgramIndexAtTime(long channelId, long time) { in getProgramIndexAtTime() argument 366 List<TableEntry> entries = mChannelIdEntriesMap.get(channelId); in getProgramIndexAtTime() [all …]
|
/packages/apps/TV/src/com/android/tv/data/ |
D | ProgramDataManager.java | 242 public Program getCurrentProgram(long channelId) { in getCurrentProgram() argument 243 return mChannelIdCurrentProgramMap.get(channelId); in getCurrentProgram() 262 public void prefetchChannel(long channelId) { in prefetchChannel() argument 263 if (mCompleteInfoChannelIds.add(channelId)) { in prefetchChannel() 269 new SingleChannelPrefetchTask(channelId, startTimeMs, endTimeMs).executeOnDbThread(); in prefetchChannel() 288 void onSingleChannelUpdated(long channelId); in onSingleChannelUpdated() argument 328 public List<Program> getPrograms(long channelId, long startTime) { in getPrograms() argument 330 ArrayList<Program> cachedPrograms = mChannelIdProgramCache.get(channelId); in getPrograms() 374 long channelId, OnCurrentProgramUpdatedListener listener) { in addOnCurrentProgramUpdatedListener() argument 375 mChannelId2ProgramUpdatedListeners.put(channelId, listener); in addOnCurrentProgramUpdatedListener() [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 | 251 public void addChannelListener(Long channelId, ChannelListener listener) { in addChannelListener() argument 252 ChannelWrapper channelWrapper = mData.channelWrapperMap.get(channelId); in addChannelListener() 263 public void removeChannelListener(Long channelId, ChannelListener listener) { in removeChannelListener() argument 264 ChannelWrapper channelWrapper = mData.channelWrapperMap.get(channelId); in removeChannelListener() 313 public boolean doesChannelExistInDb(long channelId) { in doesChannelExistInDb() argument 314 return mData.channelWrapperMap.get(channelId) != null; in doesChannelExistInDb() 330 public Channel getChannel(Long channelId) { in getChannel() argument 331 ChannelWrapper channelWrapper = mData.channelWrapperMap.get(channelId); in getChannel() 339 public void updateBrowsable(Long channelId, boolean browsable) { in updateBrowsable() argument 340 updateBrowsable(channelId, browsable, false); in updateBrowsable() [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 | 65 long channelId = (long) invocation.getArguments()[0]; in createMockRecommendationDataManager() 66 return channelRecordSortedMap.get(channelId); in createMockRecommendationDataManager() 109 long channelId = size(); in addChannel() local 110 ChannelImpl channel = new ChannelImpl.Builder().setId(channelId).build(); in addChannel() 112 put(channelId, channelRecord); in addChannel() 129 long channelId = channelIdList.get(mRandom.nextInt(channelIdList.size())); in addRandomWatchLogs() local 130 if (previousChannelId == channelId) { in addRandomWatchLogs() 135 if (!addWatchLog(channelId, latestWatchEndTimeMs, watchedDurationMs)) { in addRandomWatchLogs() 139 previousChannelId = channelId; in addRandomWatchLogs() 151 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/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 | 573 long channelId, long startTimeMs, long endTimeMs) { in getConflictingSchedules() argument 575 SoftPreconditions.checkState(channelId != Channel.INVALID_ID, TAG, "Invalid channel ID"); in getConflictingSchedules() 577 if (!mInitialized || channelId == Channel.INVALID_ID || startTimeMs >= endTimeMs) { in getConflictingSchedules() argument 580 TvInputInfo input = Utils.getTvInputInfoForChannelId(mContext, channelId); in getConflictingSchedules() 587 ScheduledRecording.builder(input.getId(), channelId, startTimeMs, endTimeMs) in getConflictingSchedules() 656 public List<ScheduledRecording> getConflictingSchedulesForTune(long channelId) { in getConflictingSchedulesForTune() argument 658 SoftPreconditions.checkState(channelId != Channel.INVALID_ID, TAG, "Invalid channel ID"); in getConflictingSchedulesForTune() 659 TvInputInfo input = Utils.getTvInputInfoForChannelId(mContext, channelId); in getConflictingSchedulesForTune() 661 input != null, TAG, "Can't find input for channel ID: " + channelId); in getConflictingSchedulesForTune() 662 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 | 206 public TunerChannel getChannel(long channelId) { in getChannel() argument 207 TunerChannel channel = mTunerChannelMap.get(channelId); in getChannel() 217 TvContract.buildChannelUri(channelId), in getChannel() 235 channel.setChannelId(channelId); in getChannel() 387 long channelId = getChannelId(channel); in handleEvents() local 388 if (channelId <= 0) { in handleEvents() 391 channel.setChannelId(channelId); in handleEvents() 584 long channelId = getChannelId(channel); in handleChannel() local 599 if (channelId <= 0) { in handleChannel() 613 channelId = ContentUris.parseId(channelUri); in handleChannel() [all …]
|
/packages/apps/TV/src/com/android/tv/recommendation/ |
D | Recommender.java | 158 public Channel getChannel(long channelId) { in getChannel() argument 159 ChannelRecord record = mDataManager.getChannelRecord(channelId); in getChannel() 169 public ChannelRecord getChannelRecord(long channelId) { in getChannelRecord() argument 170 return mDataManager.getChannelRecord(channelId); in getChannelRecord() 180 public String getChannelSortKey(long channelId) { in getChannelSortKey() argument 181 String key = mChannelSortKey.get(channelId); in getChannelSortKey() 256 protected abstract double evaluateChannel(final long channelId); in evaluateChannel() argument 296 private double getScaledEvaluatorScore(long channelId) { in getScaledEvaluatorScore() argument 297 double score = mEvaluator.evaluateChannel(channelId); in getScaledEvaluatorScore()
|
/packages/apps/TV/tests/unit/src/com/android/tv/data/ |
D | ChannelDataManagerTest.java | 475 long channelId = ContentUris.parseId(uri); in update() local 476 channelIds.add(channelId); in update() 497 for (long channelId : channelIds) { in update() 499 ChannelInfoWrapper channel = mChannelInfoList.get((int) channelId); in update() 532 long channelId = testChannelInfo.originalNetworkId; in simulateInsert() local 534 (int) channelId, in simulateInsert() 536 ChannelInfo.create(getTargetContext(), (int) channelId))); in simulateInsert() 537 mContentResolver.notifyChange(TvContract.buildChannelUri(channelId), null); in simulateInsert() 541 public void simulateDelete(long channelId) { in simulateDelete() argument 542 mChannelInfoList.remove((int) channelId); in simulateDelete() [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/src/com/android/tv/util/ |
D | Utils.java | 140 public static String getInputIdForChannel(Context context, long channelId) { in getInputIdForChannel() argument 141 if (channelId == Channel.INVALID_ID) { in getInputIdForChannel() 144 Uri channelUri = TvContract.buildChannelUri(channelId); in getInputIdForChannel() 167 long channelId = channel.getId(); in setLastWatchedChannel() local 173 .putLong(PREF_KEY_LAST_WATCHED_CHANNEL_ID, channelId) in setLastWatchedChannel() 176 channelId) in setLastWatchedChannel() 308 public static Program getProgramAt(Context context, long channelId, long timeMs) { in getProgramAt() argument 309 if (channelId == Channel.INVALID_ID) { in getProgramAt() 324 TvContract.buildChannelUri(channelId), timeMs, timeMs); in getProgramAt() 345 public static Program getCurrentProgram(Context context, long channelId) { in getCurrentProgram() argument [all …]
|
/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()
|
D | ProgramInfo.java | 161 public int getIndex(long timeMs, long channelId) { in getIndex() argument 165 long startTimeMs = channelId * DURATIONS_MS[((int) (channelId % DURATIONS_MS.length))]; in getIndex() 180 public long getStartTimeMs(int index, long channelId) { in getStartTimeMs() argument 185 channelId * DURATIONS_MS[((int) (channelId % DURATIONS_MS.length))] in getStartTimeMs()
|
/packages/services/Telecomm/src/com/android/server/telecom/ui/ |
D | NotificationChannelManager.java | 62 private void createOrUpdateChannel(Context context, String channelId) { in createOrUpdateChannel() argument 63 NotificationChannel channel = createChannel(context, channelId); in createOrUpdateChannel() 67 private NotificationChannel createChannel(Context context, String channelId) { in createChannel() argument 76 switch (channelId) { in createChannel() 103 NotificationChannel channel = new NotificationChannel(channelId, name, importance); in createChannel()
|
/packages/apps/TV/src/com/android/tv/search/ |
D | DataManagerSearch.java | 241 long channelId = channel.getId(); in addResult() local 242 result.setChannelId(channelId); in addResult() 247 result.setImageUri(TvContract.buildChannelLogoUri(channelId).toString()); in addResult() 249 result.setIntentData(buildIntentData(channelId)); in addResult() 263 result.setIntentData(buildIntentData(channelId)); in addResult() 301 private String buildIntentData(long channelId) { in buildIntentData() argument 302 return TvContract.buildChannelUri(channelId).toString(); in buildIntentData()
|
/packages/apps/TV/src/com/android/tv/data/epg/ |
D | EpgFetchHelper.java | 75 Context context, Clock clock, long channelId, List<Program> fetchedPrograms) { in updateEpgData() argument 83 List<Program> oldPrograms = queryPrograms(context, channelId, startTimeMs, endTimeMs); in updateEpgData() 143 Log.d(TAG, "Running " + size + " operations for channel " + channelId); in updateEpgData() 158 Log.d(TAG, "Updated " + fetchedProgramsCount + " programs for channel " + channelId); in updateEpgData() 201 Context context, long channelId, long startTimeMs, long endTimeMs) { in queryPrograms() argument 212 channelId, startTimeMs, endTimeMs), in queryPrograms()
|
/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/tuner/src/com/android/tv/tuner/data/ |
D | TunerChannel.java | 99 mProto.channelId = -1L; in initProto() 366 return mProto.channelId; in getChannelId() 369 public synchronized void setChannelId(long channelId) { in setChannelId() argument 370 mProto.channelId = channelId; in setChannelId() 542 long channelId = cursor.getLong(0); in fromCursor() local 547 channel.setChannelId(channelId); in fromCursor()
|