Lines Matching refs:Channel
38 * Tests for {@link Channel}.
86 // Channel.getAppLinkIntent() calls initAppLinkTypeAndIntent() which calls
107 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME, null, null);
108 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, LIVE_CHANNELS_PACKAGE_NAME, null, null);
109 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, NONE_LEANBACK_TV_INPUT_PACKAGE_NAME, null,
111 assertAppLinkType(Channel.APP_LINK_TYPE_APP, LEANBACK_TV_INPUT_PACKAGE_NAME, null, null);
115 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME, null,
117 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, LIVE_CHANNELS_PACKAGE_NAME, null,
119 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, NONE_LEANBACK_TV_INPUT_PACKAGE_NAME, null,
121 assertAppLinkType(Channel.APP_LINK_TYPE_APP, LEANBACK_TV_INPUT_PACKAGE_NAME, null,
126 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME, null,
128 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, LIVE_CHANNELS_PACKAGE_NAME, null,
130 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, NONE_LEANBACK_TV_INPUT_PACKAGE_NAME, null,
132 assertAppLinkType(Channel.APP_LINK_TYPE_APP, LEANBACK_TV_INPUT_PACKAGE_NAME, null,
137 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME,
139 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, LIVE_CHANNELS_PACKAGE_NAME,
141 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, NONE_LEANBACK_TV_INPUT_PACKAGE_NAME,
143 assertAppLinkType(Channel.APP_LINK_TYPE_APP, LEANBACK_TV_INPUT_PACKAGE_NAME,
148 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, INVALID_TV_INPUT_PACKAGE_NAME,
150 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, LIVE_CHANNELS_PACKAGE_NAME,
152 assertAppLinkType(Channel.APP_LINK_TYPE_NONE, NONE_LEANBACK_TV_INPUT_PACKAGE_NAME,
154 assertAppLinkType(Channel.APP_LINK_TYPE_APP, LEANBACK_TV_INPUT_PACKAGE_NAME,
159 assertAppLinkType(Channel.APP_LINK_TYPE_CHANNEL, INVALID_TV_INPUT_PACKAGE_NAME,
161 assertAppLinkType(Channel.APP_LINK_TYPE_CHANNEL, LIVE_CHANNELS_PACKAGE_NAME,
163 assertAppLinkType(Channel.APP_LINK_TYPE_CHANNEL, NONE_LEANBACK_TV_INPUT_PACKAGE_NAME,
165 assertAppLinkType(Channel.APP_LINK_TYPE_CHANNEL, LEANBACK_TV_INPUT_PACKAGE_NAME,
171 // In Channel, Intent.URI_INTENT_SCHEME is used to parse the URI. So the same flag should be
173 Channel testChannel = new Channel.Builder()
195 Comparator<Channel> comparator = new TestChannelComparator(manager);
196 ComparatorTester<Channel> comparatorTester =
199 new Channel.Builder().setInputId(PARTNER_INPUT_ID).build());
201 new Channel.Builder().setInputId("1").build());
203 new Channel.Builder().setInputId("1").setDisplayNumber("2").build());
205 new Channel.Builder().setInputId("2").setDisplayNumber("1.0").build());
209 new Channel.Builder().setInputId("2").setDisplayNumber("1.62")
211 new Channel.Builder().setInputId("2").setDisplayNumber("1.62")
213 new Channel.Builder().setInputId("2").setDisplayNumber("1.62")
216 new Channel.Builder().setInputId("2").setDisplayNumber("2.0").build());
219 new Channel.Builder().setInputId("2").setDisplayNumber("12.2").build());
224 * Test Input Label handled by {@link com.android.tv.data.Channel.DefaultComparator}.
240 Comparator<Channel> comparator = new ChannelComparatorWithDescriptionAsLabel(manager);
241 ComparatorTester<Channel> comparatorTester =
245 new Channel.Builder().setInputId(PARTNER_INPUT_ID).setDescription("A").build());
249 new Channel.Builder().setDescription("A").setInputId("1").build());
251 new Channel.Builder().setDescription("A").setInputId("2").build());
253 new Channel.Builder().setDescription("B").setInputId("1").build());
258 private class TestChannelComparator extends Channel.DefaultComparator {
264 public String getInputLabelForChannel(Channel channel) {
265 return channel.getInputId();
269 private static class ChannelComparatorWithDescriptionAsLabel extends Channel.DefaultComparator {
275 public String getInputLabelForChannel(Channel channel) {
276 return channel.getDescription();