1 /* 2 * Copyright (C) 2015 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; 18 19 import com.android.tv.analytics.Analytics; 20 import com.android.tv.analytics.Tracker; 21 import com.android.tv.config.RemoteConfig; 22 import com.android.tv.data.ChannelDataManager; 23 import com.android.tv.data.PreviewDataManager; 24 import com.android.tv.data.ProgramDataManager; 25 import com.android.tv.dvr.DvrDataManager; 26 import com.android.tv.dvr.DvrManager; 27 import com.android.tv.dvr.DvrScheduleManager; 28 import com.android.tv.dvr.DvrStorageStatusManager; 29 import com.android.tv.dvr.DvrWatchedPositionManager; 30 import com.android.tv.dvr.recorder.RecordingScheduler; 31 import com.android.tv.perf.PerformanceMonitor; 32 import com.android.tv.util.AccountHelper; 33 import com.android.tv.util.TvInputManagerHelper; 34 35 /** 36 * Interface with getters for application scoped singletons. 37 */ 38 public interface ApplicationSingletons { 39 getAnalytics()40 Analytics getAnalytics(); 41 getChannelDataManager()42 ChannelDataManager getChannelDataManager(); 43 44 /** 45 * Checks if the {@link ChannelDataManager} instance has been created and all the channels has 46 * been loaded. 47 */ isChannelDataManagerLoadFinished()48 boolean isChannelDataManagerLoadFinished(); 49 getProgramDataManager()50 ProgramDataManager getProgramDataManager(); 51 52 /** 53 * Checks if the {@link ProgramDataManager} instance has been created and the current programs 54 * for all the channels has been loaded. 55 */ isProgramDataManagerCurrentProgramsLoadFinished()56 boolean isProgramDataManagerCurrentProgramsLoadFinished(); 57 getPreviewDataManager()58 PreviewDataManager getPreviewDataManager(); 59 getDvrDataManager()60 DvrDataManager getDvrDataManager(); 61 getDvrStorageStatusManager()62 DvrStorageStatusManager getDvrStorageStatusManager(); 63 getDvrScheduleManager()64 DvrScheduleManager getDvrScheduleManager(); 65 getDvrManager()66 DvrManager getDvrManager(); 67 getRecordingScheduler()68 RecordingScheduler getRecordingScheduler(); 69 getDvrWatchedPositionManager()70 DvrWatchedPositionManager getDvrWatchedPositionManager(); 71 getInputSessionManager()72 InputSessionManager getInputSessionManager(); 73 getTracker()74 Tracker getTracker(); 75 getTvInputManagerHelper()76 TvInputManagerHelper getTvInputManagerHelper(); 77 getMainActivityWrapper()78 MainActivityWrapper getMainActivityWrapper(); 79 getAccountHelper()80 AccountHelper getAccountHelper(); 81 getRemoteConfig()82 RemoteConfig getRemoteConfig(); 83 isRunningInMainProcess()84 boolean isRunningInMainProcess(); 85 getPerformanceMonitor()86 PerformanceMonitor getPerformanceMonitor(); 87 } 88