1 /* 2 * Copyright (C) 2016 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.tv.data.epg; 18 19 import android.support.annotation.NonNull; 20 21 import com.android.tv.data.Lineup; 22 import com.android.tv.data.api.Channel; 23 import com.android.tv.data.api.Program; 24 import com.android.tv.dvr.data.SeriesInfo; 25 26 import java.util.Collection; 27 import java.util.Collections; 28 import java.util.List; 29 import java.util.Map; 30 import java.util.Set; 31 32 import javax.inject.Inject; 33 34 /** A stub class to read EPG. */ 35 public class StubEpgReader implements EpgReader { 36 @Inject StubEpgReader()37 public StubEpgReader() {} 38 39 @Override isAvailable()40 public boolean isAvailable() { 41 return true; 42 } 43 44 @Override getEpgTimestamp()45 public long getEpgTimestamp() { 46 return 0; 47 } 48 49 @Override setRegionCode(String regionCode)50 public void setRegionCode(String regionCode) { 51 // Do nothing 52 } 53 54 @Override getLineups(@onNull String postalCode)55 public List<Lineup> getLineups(@NonNull String postalCode) { 56 return Collections.emptyList(); 57 } 58 59 @Override getChannelNumbers(@onNull String lineupId)60 public List<String> getChannelNumbers(@NonNull String lineupId) { 61 return Collections.emptyList(); 62 } 63 64 @Override getChannels(Set<Channel> inputChannels, @NonNull String lineupId)65 public Set<EpgChannel> getChannels(Set<Channel> inputChannels, @NonNull String lineupId) { 66 return Collections.emptySet(); 67 } 68 69 @Override preloadChannels(@onNull String lineupId)70 public void preloadChannels(@NonNull String lineupId) { 71 // Do nothing 72 } 73 74 @Override clearCachedChannels(@onNull String lineupId)75 public void clearCachedChannels(@NonNull String lineupId) { 76 // Do nothing 77 } 78 79 @Override getPrograms(EpgChannel epgChannel)80 public List<Program> getPrograms(EpgChannel epgChannel) { 81 return Collections.emptyList(); 82 } 83 84 @Override getPrograms( @onNull Set<EpgChannel> channels, long duration)85 public Map<EpgChannel, Collection<Program>> getPrograms( 86 @NonNull Set<EpgChannel> channels, long duration) { 87 return Collections.emptyMap(); 88 } 89 90 @Override getSeriesInfo(@onNull String seriesId)91 public SeriesInfo getSeriesInfo(@NonNull String seriesId) { 92 return null; 93 } 94 } 95