1 /* 2 * Copyright (C) 2010 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.cts.verifier.audioquality; 18 19 import com.android.cts.verifier.audioquality.experiments.BiasExperiment; 20 import com.android.cts.verifier.audioquality.experiments.ColdLatencyExperiment; 21 import com.android.cts.verifier.audioquality.experiments.OverflowExperiment; 22 import com.android.cts.verifier.audioquality.experiments.GainLinearityExperiment; 23 import com.android.cts.verifier.audioquality.experiments.GlitchExperiment; 24 import com.android.cts.verifier.audioquality.experiments.SoundLevelExperiment; 25 import com.android.cts.verifier.audioquality.experiments.SpectrumShapeExperiment; 26 import com.android.cts.verifier.audioquality.experiments.WarmLatencyExperiment; 27 28 import android.content.Context; 29 30 import java.util.ArrayList; 31 32 /** 33 * Data shared between the VerifierActivity and ExperimentService 34 */ 35 public class VerifierExperiments { 36 37 private static ArrayList<Experiment> mExperiments = null; 38 39 private VerifierExperiments() { 40 } 41 42 public static ArrayList<Experiment> getExperiments(Context context) { 43 if (mExperiments == null) { 44 mExperiments = new ArrayList<Experiment>(); 45 mExperiments.add(new SoundLevelExperiment()); 46 mExperiments.add(new BiasExperiment()); 47 mExperiments.add(new OverflowExperiment()); 48 mExperiments.add(new GainLinearityExperiment()); 49 mExperiments.add(new SpectrumShapeExperiment()); 50 mExperiments.add(new GlitchExperiment(0)); 51 mExperiments.add(new GlitchExperiment(7)); 52 mExperiments.add(new ColdLatencyExperiment()); 53 mExperiments.add(new WarmLatencyExperiment()); 54 for (Experiment exp : mExperiments) { 55 exp.init(context); 56 } 57 } 58 return mExperiments; 59 } 60 } 61