Home | History | Annotate | Download | only in tv

Lines Matching full:channel

84 import com.android.tv.data.Channel;
284 private Channel mPipChannel;
308 // keeping the channel unblocking status while TV view is shrunken.
311 private Channel mChannelBeforeShrunkenTvView;
312 private Channel mPipChannelBeforeShrunkenTvView;
370 // Do not update channel banner by this notification
375 Channel channel = mTvView.getCurrentChannel();
376 if (channel != null && channel.getId() == channelId) {
407 public void onCurrentChannelUnavailable(Channel channel) {
408 // TODO: handle the case that a channel is suddenly removed from DB.
412 public void onChannelChanged(Channel previousChannel, Channel currentChannel) {
478 mProgramDataManager.addOnCurrentProgramUpdatedListener(Channel.INVALID_ID,
581 Channel currentChannel = mChannelTuner.getCurrentChannel();
591 Channel currentChannel = mChannelTuner.getCurrentChannel();
596 tuneToChannel(Channel.createPassthroughChannel(input.getId()));
710 // If PIN dialog is shown for unblocking the channel lock or content ratings lock,
803 // This will delay the start of the animation until after the Live Channel app is
816 // This will delay the start of the animation until after the Live Channel app is
938 // The requested channel is already tuned.
945 Log.w(TAG, "The current channel should be reset before");
949 // If any initial channel id is not given, remember the last channel the user watched.
951 if (channelId != Channel.INVALID_ID) {
960 Channel channel = Channel.createPassthroughChannel(channelUri);
961 mChannelTuner.moveToChannel(channel);
964 Channel channel = mChannelDataManager.getChannel(channelId);
965 if (channel == null || !mChannelTuner.moveToChannel(channel)) {
967 Log.w(TAG, "The requested channel (id=" + channelId + ") doesn't exist. "
968 + "The first channel will be tuned to.");
1006 * Handles screen off to keep the current channel for next screen on.
1119 public Channel getCurrentChannel() {
1126 Channel channel = mTvView.getCurrentChannel();
1127 return channel == null ? Channel.INVALID_ID : channel.getId();
1188 public Channel getBrowsableChannel() {
1191 Channel curChannel = mChannelTuner.getCurrentChannel();
1225 Channel currentChannel = mChannelTuner.getCurrentChannel();
1226 long channelId = currentChannel == null ? Channel.INVALID_ID : currentChannel.getId();
1269 Channel returnChannel = mChannelBeforeShrunkenTvView;
1272 // Try to tune to the next best channel instead.
1277 // The current channel is mTvView.getCurrentChannel() and need to tune to the returnChannel.
1279 final Channel channel = returnChannel;
1283 tuneToChannel(channel);
1285 || !mChannelBeforeShrunkenTvView.equals(channel)) {
1286 Utils.setLastWatchedChannel(MainActivity.this, channel);
1434 // vnd.android.cursor.item/channel isn't really necessary here.
1490 // In case the channel is given explicitly, use it.
1494 // Tune to default channel.
1501 Log.w(TAG, "Malformed channel uri " + mInitChannelUri
1532 if (channelId == Channel.INVALID_ID) {
1541 if (channelId == Channel.INVALID_ID) {
1542 // Couldn't find any channel probably because the input hasn't been set up.
1622 Log.w(TAG, "PIP channel id is an invalid id.");
1629 public void onUnexpectedStop(Channel channel) {
1635 public void onTuneFailed(Channel channel) {
1636 Log.w(TAG, "Fail to start the PIP during channel tuning");
1652 public void onChannelRetuned(Uri channel) {
1653 if (channel == null) {
1656 Channel currentChannel =
1657 mChannelDataManager.getChannel(ContentUris.parseId(channel));
1659 Log.e(TAG, "onChannelRetuned is called from PIP input but can't find a channel"
1660 + " with the URI " + channel);
1664 // Ignore this message if the user is changing the channel.
1741 final Channel channel = mChannelTuner.getCurrentChannel();
1765 // Show new channel sources fragment.
1794 if (channel == null) {
1795 // There is no channel to tune to.
1798 // Wait until channel data is loaded in order to know the number of channels.
1799 // tune() will be retried, once the channel data is loaded.
1811 if (initChannelId == channel.getId()) {
1825 // For every tune, we need to inform the tuned channel or input to a user,
1831 if (TvContract.isChannelUriForPassthroughInput(channel.getUri())) {
1832 TvInputInfo input = mTvInputManagerHelper.getTvInputInfo(channel.getInputId());
1834 } else if (TextUtils.isEmpty(channel.getDisplayName())) {
1835 event.getText().add(channel.getDisplayNumber());
1837 event.getText().add(channel.getDisplayNumber() + " " + channel.getDisplayName());
1842 boolean success = mTvView.tuneTo(channel, mTuneParams, mOnTuneListener);
1843 mOnTuneListener.onTune(channel, isUnderShrunkenTvView());
1855 if (!channel.isPassthrough()) {
1856 addToRecentChannels(channel.getId());
1858 Utils.setLastWatchedChannel(this, channel);
1860 .notifyCurrentChannelChange(this, channel);
1896 // If the channel is blocked, display a lock and a short text on the Now Playing Card
1965 Channel channel = getCurrentChannel();
1966 if (channel == null || program != getCurrentProgram()) {
1971 if (channel.isPassthrough()) {
1972 TvInputInfo input = getTvInputManagerHelper().getTvInputInfo(channel.getInputId());
1977 cardTitleText = channel.getDisplayName();
2012 Channel channel = tvView.getCurrentChannel();
2013 if (tvView.isPlaying() && channel != null) {
2015 && channel.isLocked()
2018 && channel.equals(mChannelBeforeShrunkenTvView)
2020 if (DEBUG) Log.d(TAG, "Channel " + channel.getId() + " is locked");
2045 * Shows the channel banner if it was hidden from the side fragment.
2047 * <p>When the side fragment is visible, showing the channel banner should be put off until the
2048 * side fragment is closed even though the channel changes.
2080 // If lock type is not changed, we don't need to update channel banner by parental
2111 * Hide the overlays when tuning to a channel from the menu (e.g. Channels).
2271 Channel.INVALID_ID, mOnCurrentProgramUpdatedListener);
2370 * V KEYCODE_MEDIA_RECORD debug: record the current channel for 30 sec
2371 * X KEYCODE_BUTTON_X KEYCODE_PROG_BLUE debug: record current channel for a few minutes
2377 // If we are in the middle of channel change, finish it before showing overlays.
2410 // Now channel map is under loading.
2492 // Channel change is already done in the head of this method.
2571 Channel channel = mTvView.getCurrentChannel();
2572 long channelId = channel.getId();
2577 .addSchedule(channel, now, now + TimeUnit.MINUTES.toMillis(1));
2673 public void tuneToChannelForPip(Channel channel) {
2677 if (mPipChannel.equals(channel)) {
2680 mPipChannel = channel;
2696 Channel pipChannel = pipAvailableInputs.get(0).getChannel();
2771 // If the current channel is passthrough channel without a PIP view,
2790 public void tuneToChannel(Channel channel) {
2791 if (channel == null) {
2796 if (mPipEnabled && mPipInputManager.areInSamePipInput(channel, mPipChannel)) {
2800 startTv(channel.getUri());
2801 } else if (channel.equals(mTvView.getCurrentChannel())) {
2803 } else if (mChannelTuner.moveToChannel(channel)) {
2804 // Channel banner would be updated inside of tune.
2813 * This method just moves the channel in the channel map and updates the channel banner,
2814 * but doesn't actually tune to the channel.
2817 * @param channelUp {@code true} for channel up, and {@code false} for channel down.
2827 public Channel getPipChannel() {
2841 Channel channel = mTvView.getCurrentChannel();
2844 if (channel == null || !mTvView.isPlaying()) {
2845 // If the TV view is not currently playing or its current channel is null, swapping here
2854 // Reset the TV view and tune the PIP view to the previous channel of the TV view.
2857 Channel oldPipChannel = mPipChannel;
2858 tuneToChannelForPip(channel);
2866 // Tune the TV view to the previous PIP channel.
3134 Channel mChannel;
3138 private void onTune(Channel channel, boolean wasUnderShrukenTvView) {
3141 mChannel = channel;
3153 public void onUnexpectedStop(Channel channel) {
3159 public void onTuneFailed(Channel channel) {
3160 Log.w(TAG, "Failed to tune to channel " + channel.getId()
3161 + "@" + channel.getInputId());
3175 // when the channel is quickly changed.
3202 public void onChannelRetuned(Uri channel) {
3203 if (channel == null) {
3206 Channel currentChannel =
3207 mChannelDataManager.getChannel(ContentUris.parseId(channel));
3209 Log.e(TAG, "onChannelRetuned is called but can't find a channel with the URI "
3210 + channel);
3214 // Ignore this message if the user is changing the channel.
3226 // When tuneTo was called while TV view was shrunken, if the channel id is the same
3227 // with the channel watched before shrunken, we allow the rating which was allowed