1 /* 2 * Copyright (C) 2019 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 package com.android.tv.common.flags.impl; 17 18 import dagger.Module; 19 import dagger.Provides; 20 import dagger.Reusable; 21 22 import com.android.tv.common.flags.BackendKnobsFlags; 23 import com.android.tv.common.flags.CloudEpgFlags; 24 import com.android.tv.common.flags.DvrFlags; 25 import com.android.tv.common.flags.LegacyFlags; 26 import com.android.tv.common.flags.StartupFlags; 27 import com.android.tv.common.flags.TunerFlags; 28 import com.android.tv.common.flags.UiFlags; 29 30 /** Provides default flags. */ 31 @Module 32 public class DefaultFlagsModule { 33 34 @Provides 35 @Reusable provideBackendKnobsFlags()36 BackendKnobsFlags provideBackendKnobsFlags() { 37 return new DefaultBackendKnobsFlags(); 38 } 39 40 @Provides 41 @Reusable provideCloudEpgFlags()42 CloudEpgFlags provideCloudEpgFlags() { 43 return new DefaultCloudEpgFlags(); 44 } 45 46 @Provides 47 @Reusable provideDvrFlags()48 DvrFlags provideDvrFlags() { 49 return new DefaultDvrFlags(); 50 } 51 52 @Provides 53 @Reusable provideLegacyFlags()54 LegacyFlags provideLegacyFlags() { 55 return DefaultLegacyFlags.DEFAULT; 56 } 57 58 @Provides 59 @Reusable provideStartupFlags()60 StartupFlags provideStartupFlags() { 61 return new DefaultStartupFlags(); 62 } 63 64 @Provides 65 @Reusable provideTunerFlags()66 TunerFlags provideTunerFlags() { 67 return new DefaultTunerFlags(); 68 } 69 70 @Provides 71 @Reusable provideUiFlags()72 UiFlags provideUiFlags() { 73 return new DefaultUiFlags(); 74 } 75 } 76