• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 package com.android.contacts.commonbind.experiments;
17 
18 import android.content.Context;
19 
20 /**
21  * Provides getters for experiment flags.
22  * This stub class is designed to be overwritten by an overlay.
23  */
24 public final class Flags {
25 
26     private static Flags sInstance;
27 
getInstance(Context context)28     public static Flags getInstance(Context context) {
29         if (sInstance == null) {
30             sInstance = new Flags();
31         }
32         return sInstance;
33     }
34 
Flags()35     private Flags() {
36     }
37 
getBoolean(String flagName, boolean defValue)38     public boolean getBoolean(String flagName, boolean defValue) {
39         return defValue;
40     }
41 
getBytes(String flagName, byte[] defValue)42     public byte[] getBytes(String flagName, byte[] defValue) {
43         return defValue;
44     }
45 
getDouble(String flagName, double defValue)46     public double getDouble(String flagName, double defValue) {
47         return defValue;
48     }
49 
getInt(String flagName, int defValue)50     public int getInt(String flagName, int defValue) {
51         return defValue;
52     }
53 
getLong(String flagName, long defValue)54     public long getLong(String flagName, long defValue) {
55         return defValue;
56     }
57 
getString(String flagName, String defValue)58     public String getString(String flagName, String defValue) {
59         return defValue;
60     }
61 }
62