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.content.Context; 20 21 import android.support.annotation.NonNull; 22 import com.android.tv.data.Channel; 23 import com.android.tv.data.Lineup; 24 import com.android.tv.data.Program; 25 import com.android.tv.dvr.data.SeriesInfo; 26 27 import java.util.Collections; 28 import java.util.List; 29 import java.util.Map; 30 31 /** 32 * A stub class to read EPG. 33 */ 34 public class StubEpgReader implements EpgReader{ StubEpgReader(@uppressWarnings"unused") Context context)35 public StubEpgReader(@SuppressWarnings("unused") Context context) { 36 } 37 38 @Override isAvailable()39 public boolean isAvailable() { 40 return true; 41 } 42 43 @Override getEpgTimestamp()44 public long getEpgTimestamp() { 45 return 0; 46 } 47 48 @Override setRegionCode(String regionCode)49 public void setRegionCode(String regionCode) { 50 // Do nothing 51 } 52 53 @Override getLineups(@onNull String postalCode)54 public List<Lineup> getLineups(@NonNull String postalCode) { 55 return Collections.emptyList(); 56 } 57 58 @Override getChannelNumbers(@onNull String lineupId)59 public List<String> getChannelNumbers(@NonNull String lineupId) { 60 return Collections.emptyList(); 61 } 62 63 @Override getChannels(@onNull String lineupId)64 public List<Channel> getChannels(@NonNull String lineupId) { 65 return Collections.emptyList(); 66 } 67 68 @Override preloadChannels(@onNull String lineupId)69 public void preloadChannels(@NonNull String lineupId) { 70 // Do nothing 71 } 72 73 @Override clearCachedChannels(@onNull String lineupId)74 public void clearCachedChannels(@NonNull String lineupId) { 75 // Do nothing 76 } 77 78 @Override getPrograms(long channelId)79 public List<Program> getPrograms(long channelId) { 80 return Collections.emptyList(); 81 } 82 83 @Override getPrograms(@onNull List<Long> channelIds, long duration)84 public Map<Long, List<Program>> getPrograms(@NonNull List<Long> channelIds, long duration) { 85 return Collections.emptyMap(); 86 } 87 88 @Override getSeriesInfo(@onNull String seriesId)89 public SeriesInfo getSeriesInfo(@NonNull String seriesId) { 90 return null; 91 } 92 }