Lines Matching refs:channel

55  * The class to manage channel data.
56 * Basic features: reading channel list and each channel's current program, and updating
94 for (ChannelWrapper channel : mChannelWrapperMap.values()) {
95 if (channel.mChannel.getInputId().equals(inputId)) {
96 channel.mInputRemoved = false;
97 addChannel(channel.mChannel);
111 for (ChannelWrapper channel : mChannelWrapperMap.values()) {
112 if (channel.mChannel.getInputId().equals(inputId)) {
113 channel.mInputRemoved = true;
115 removedChannels.add(channel);
127 for (ChannelWrapper channel : removedChannels) {
128 channel.notifyChannelRemoved();
175 // If not, other DB tasks can be executed before channel loading.
232 * Adds a {@link ChannelListener} for a specific channel with the channel ID {@code channelId}.
243 * Removes a {@link ChannelListener} for a specific channel with the channel ID
280 for (Channel channel : mChannels) {
281 if (channel.isBrowsable()) {
282 channels.add(channel);
289 * Returns the total channel count for a given input.
299 * Returns true if and only if there exists at least one channel and all channels are hidden.
305 for (Channel channel : mChannels) {
306 if (channel.isBrowsable()) {
314 * Gets the channel with the channel ID {@code channelId}.
487 private void addChannel(Channel channel) {
488 mChannels.add(channel);
489 String inputId = channel.getInputId();
512 * Reloads channel data.
540 * Called when the channel has been removed in DB.
542 void onChannelRemoved(Channel channel);
545 * Called when values of the channel has been changed.
547 void onChannelUpdated(Channel channel);
557 ChannelWrapper(Channel channel) {
558 mChannel = channel;
559 mBrowsableInDb = channel.isBrowsable();
560 mLockedInDb = channel.isLocked();
561 mInputRemoved = !mInputManager.hasTvInputInfo(channel.getInputId());
609 for (Channel channel : channels) {
611 String browsableKey = getBrowsableKey(channel);
612 channel.setBrowsable(mBrowsableSharedPreferences.getBoolean(browsableKey,
616 long channelId = channel.getId();
620 channelWrapper = new ChannelWrapper(channel);
621 mChannelWrapperMap.put(channel.getId(), channelWrapper);
627 if (!channelWrapper.mChannel.hasSameReadOnlyInfo(channel)) {
635 channelWrapper.mChannel.copyFrom(channel);
636 channel.setBrowsable(oldChannel.isBrowsable());
637 channel.setLocked(oldChannel.isLocked());
647 // If hasReadTvListings(mContext) is false, the given channel list would
714 private String getBrowsableKey(Channel channel) {
715 return channel.getInputId() + "|" + channel.getId();