Merge "Unify the caption preference class naming"

This commit is contained in:
Menghan Li
2022-08-02 22:15:31 +00:00
committed by Android (Google) Code Review
51 changed files with 202 additions and 210 deletions

View File

@@ -92,7 +92,7 @@ public class CaptionHelperTest {
final float fontScale = 1.0f;
when(mCaptioningManager.getFontScale()).thenReturn(fontScale);
final float textSize = mContext.getResources().getDimension(
R.dimen.caption_preview_text_size) * fontScale;
R.dimen.captioning_preview_text_size) * fontScale;
mCaptionHelper.applyCaptionProperties(mSubtitleView, /* PreviewWindow= */ null,
/* styleId= */ 0);

View File

@@ -33,16 +33,16 @@ import org.robolectric.RobolectricTestRunner;
import java.util.List;
/** Tests for {@link CaptionAppearanceFragment}. */
/** Tests for {@link CaptioningAppearanceFragment}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionAppearanceFragmentTest {
public class CaptioningAppearanceFragmentTest {
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionAppearanceFragment mFragment;
private CaptioningAppearanceFragment mFragment;
@Before
public void setUp() {
mFragment = new CaptionAppearanceFragment();
mFragment = new CaptioningAppearanceFragment();
}
@Test
@@ -58,7 +58,7 @@ public class CaptionAppearanceFragmentTest {
@Test
public void getLogTag_returnsCorrectTag() {
assertThat(mFragment.getLogTag()).isEqualTo("CaptionAppearanceFragment");
assertThat(mFragment.getLogTag()).isEqualTo("CaptioningAppearanceFragment");
}
@Test
@@ -68,7 +68,7 @@ public class CaptionAppearanceFragmentTest {
@Test
public void getNonIndexableKeys_existInXmlLayout() {
final List<String> niks = CaptionAppearanceFragment.SEARCH_INDEX_DATA_PROVIDER
final List<String> niks = CaptioningAppearanceFragment.SEARCH_INDEX_DATA_PROVIDER
.getNonIndexableKeys(mContext);
final List<String> keys = XmlTestUtils.getKeysFromPreferenceXml(mContext,
R.xml.captioning_appearance);

View File

@@ -34,23 +34,23 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionAppearancePreferenceController}. */
/** Tests for {@link CaptioningAppearancePreferenceController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionAppearancePreferenceControllerTest {
public class CaptioningAppearancePreferenceControllerTest {
private static final String TEST_KEY = "test_key";
private static final int DEFAULT_PRESET_INDEX = 1;
private static final int DEFAULT_FONT_SCALE_INDEX = 2;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionAppearancePreferenceController mController;
private CaptioningAppearancePreferenceController mController;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
CaptioningManager captioningManager = mContext.getSystemService(CaptioningManager.class);
mShadowCaptioningManager = Shadow.extract(captioningManager);
mController = new CaptionAppearancePreferenceController(mContext, TEST_KEY);
mController = new CaptioningAppearancePreferenceController(mContext, TEST_KEY);
}
@Test

View File

@@ -45,22 +45,23 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionBackgroundColorController}. */
/** Tests for {@link CaptioningBackgroundColorController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionBackgroundColorControllerTest {
public class CaptioningBackgroundColorControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionBackgroundColorController mController;
private CaptioningBackgroundColorController mController;
private ColorPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionBackgroundColorController(mContext, "captioning_background_color");
mController = new CaptioningBackgroundColorController(mContext,
"captioning_background_color");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new ColorPreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -47,21 +47,21 @@ import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionBackgroundOpacityController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionBackgroundOpacityControllerTest {
public class CaptioningBackgroundOpacityControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionBackgroundOpacityController mController;
private CaptioningBackgroundOpacityController mController;
private ColorPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController =
new CaptionBackgroundOpacityController(mContext, "captioning_background_opacity");
mController = new CaptioningBackgroundOpacityController(mContext,
"captioning_background_opacity");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new ColorPreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -41,9 +41,9 @@ import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
/** Tests for {@link CaptionCustomController}. */
/** Tests for {@link CaptioningCustomController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionCustomControllerTest {
public class CaptioningCustomControllerTest {
private static final String PREF_KEY = "custom";
@@ -55,13 +55,13 @@ public class CaptionCustomControllerTest {
private AccessibilitySettingsContentObserver mAccessibilitySettingsContentObserver;
private final Context mContext = ApplicationProvider.getApplicationContext();
private ContentResolver mContentResolver;
private CaptionCustomController mController;
private CaptioningCustomController mController;
private Preference mPreference;
@Before
public void setUp() {
mContentResolver = mContext.getContentResolver();
mController = new CaptionCustomController(mContext, PREF_KEY,
mController = new CaptioningCustomController(mContext, PREF_KEY,
mAccessibilitySettingsContentObserver);
mPreference = new Preference(mContext);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -45,21 +45,21 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionEdgeColorController}. */
/** Tests for {@link CaptioningEdgeColorController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionEdgeColorControllerTest {
public class CaptioningEdgeColorControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionEdgeColorController mController;
private CaptioningEdgeColorController mController;
private ColorPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionEdgeColorController(mContext, "captioning_edge_color");
mController = new CaptioningEdgeColorController(mContext, "captioning_edge_color");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new ColorPreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -46,22 +46,22 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionEdgeTypeController}. */
/** Tests for {@link CaptioningEdgeTypeController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionEdgeTypeControllerTest {
public class CaptioningEdgeTypeControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionEdgeTypeController mController;
private CaptioningEdgeTypeController mController;
private EdgeTypePreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionEdgeTypeController(mContext, "captioning_edge_type");
mController = new CaptioningEdgeTypeController(mContext, "captioning_edge_type");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new EdgeTypePreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -45,22 +45,22 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionFontSizeController}. */
/** Tests for {@link CaptioningFontSizeController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionFontSizeControllerTest {
public class CaptioningFontSizeControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionFontSizeController mController;
private CaptioningFontSizeController mController;
private ListPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionFontSizeController(mContext, "captioning_font_size");
mController = new CaptioningFontSizeController(mContext, "captioning_font_size");
mPreference = new ListPreference(mContext);
mPreference.setEntries(R.array.captioning_font_size_selector_titles);
mPreference.setEntryValues(R.array.captioning_font_size_selector_values);

View File

@@ -45,22 +45,23 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionForegroundColorController}. */
/** Tests for {@link CaptioningForegroundColorController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionForegroundColorControllerTest {
public class CaptioningForegroundColorControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionForegroundColorController mController;
private CaptioningForegroundColorController mController;
private ColorPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionForegroundColorController(mContext, "captioning_foreground_color");
mController = new CaptioningForegroundColorController(mContext,
"captioning_foreground_color");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new ColorPreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -45,23 +45,23 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionForegroundOpacityController}. */
/** Tests for {@link CaptioningForegroundOpacityController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionForegroundOpacityControllerTest {
public class CaptioningForegroundOpacityControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionForegroundOpacityController mController;
private CaptioningForegroundOpacityController mController;
private ColorPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController =
new CaptionForegroundOpacityController(mContext, "captioning_foreground_opacity");
mController = new CaptioningForegroundOpacityController(mContext,
"captioning_foreground_opacity");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new ColorPreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -38,21 +38,21 @@ import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
/** Tests for {@link CaptionLocalePreferenceController}. */
/** Tests for {@link CaptioningLocalePreferenceController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionLocalePreferenceControllerTest {
public class CaptioningLocalePreferenceControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionLocalePreferenceController mController;
private CaptioningLocalePreferenceController mController;
private LocalePreference mPreference;
@Before
public void setUp() {
mController = new CaptionLocalePreferenceController(mContext, "captioning_local_pref");
mController = new CaptioningLocalePreferenceController(mContext, "captioning_local_pref");
mPreference = new LocalePreference(mContext);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);
}

View File

@@ -33,16 +33,16 @@ import org.robolectric.RobolectricTestRunner;
import java.util.List;
/** Tests for {@link CaptionMoreOptionsFragment}. */
/** Tests for {@link CaptioningMoreOptionsFragment}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionMoreOptionsFragmentTest {
public class CaptioningMoreOptionsFragmentTest {
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionMoreOptionsFragment mFragment;
private CaptioningMoreOptionsFragment mFragment;
@Before
public void setUp() {
mFragment = new CaptionMoreOptionsFragment();
mFragment = new CaptioningMoreOptionsFragment();
}
@Test
@@ -59,12 +59,12 @@ public class CaptionMoreOptionsFragmentTest {
@Test
public void getLogTag_returnsCorrectTag() {
assertThat(mFragment.getLogTag()).isEqualTo("CaptionMoreOptionsFragment");
assertThat(mFragment.getLogTag()).isEqualTo("CaptioningMoreOptionsFragment");
}
@Test
public void getNonIndexableKeys_existInXmlLayout() {
final List<String> niks = CaptionMoreOptionsFragment.SEARCH_INDEX_DATA_PROVIDER
final List<String> niks = CaptioningMoreOptionsFragment.SEARCH_INDEX_DATA_PROVIDER
.getNonIndexableKeys(mContext);
final List<String> keys =
XmlTestUtils.getKeysFromPreferenceXml(mContext,

View File

@@ -16,6 +16,9 @@
package com.android.settings.accessibility;
import static com.android.settings.accessibility.AccessibilityUtil.State.OFF;
import static com.android.settings.accessibility.AccessibilityUtil.State.ON;
import static com.google.common.truth.Truth.assertThat;
import android.content.Context;
@@ -30,10 +33,9 @@ import org.junit.runner.RunWith;
import org.robolectric.RobolectricTestRunner;
import org.robolectric.RuntimeEnvironment;
/** Tests for {@link CaptioningPreferenceController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptioningPreferenceControllerTest {
private static final int ON = 1;
private static final int OFF = 0;
private Context mContext;
private CaptioningPreferenceController mController;

View File

@@ -46,22 +46,22 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionPresetController}. */
/** Tests for {@link CaptioningPresetController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionPresetControllerTest {
public class CaptioningPresetControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionPresetController mController;
private CaptioningPresetController mController;
private PresetPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionPresetController(mContext, "captioning_preset");
mController = new CaptioningPresetController(mContext, "captioning_preset");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new PresetPreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -42,9 +42,9 @@ import org.mockito.junit.MockitoJUnit;
import org.mockito.junit.MockitoRule;
import org.robolectric.RobolectricTestRunner;
/** Tests for {@link CaptionPreviewPreferenceController}. */
/** Tests for {@link CaptioningPreviewPreferenceController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionPreviewPreferenceControllerTest {
public class CaptioningPreviewPreferenceControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@@ -54,13 +54,13 @@ public class CaptionPreviewPreferenceControllerTest {
private ContentResolver mContentResolver;
@Spy
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionPreviewPreferenceController mController;
private CaptioningPreviewPreferenceController mController;
private LayoutPreference mLayoutPreference;
@Before
public void setUp() {
when(mContext.getContentResolver()).thenReturn(mContentResolver);
mController = new CaptionPreviewPreferenceController(mContext,
mController = new CaptioningPreviewPreferenceController(mContext,
"captioning_preference_switch");
final View view = new View(mContext);
mLayoutPreference = new LayoutPreference(mContext, view);

View File

@@ -33,16 +33,16 @@ import org.robolectric.RobolectricTestRunner;
import java.util.List;
/** Tests for {@link CaptionPropertiesFragment}. */
/** Tests for {@link CaptioningPropertiesFragment}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionPropertiesFragmentTest {
public class CaptioningPropertiesFragmentTest {
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionPropertiesFragment mFragment;
private CaptioningPropertiesFragment mFragment;
@Before
public void setUp() {
mFragment = new CaptionPropertiesFragment();
mFragment = new CaptioningPropertiesFragment();
}
@Test
@@ -59,12 +59,12 @@ public class CaptionPropertiesFragmentTest {
@Test
public void getLogTag_returnsCorrectTag() {
assertThat(mFragment.getLogTag()).isEqualTo("CaptionPropertiesFragment");
assertThat(mFragment.getLogTag()).isEqualTo("CaptioningPropertiesFragment");
}
@Test
public void getNonIndexableKeys_existInXmlLayout() {
final List<String> niks = CaptionPropertiesFragment.SEARCH_INDEX_DATA_PROVIDER
final List<String> niks = CaptioningPropertiesFragment.SEARCH_INDEX_DATA_PROVIDER
.getNonIndexableKeys(mContext);
final List<String> keys =
XmlTestUtils.getKeysFromPreferenceXml(mContext,

View File

@@ -45,22 +45,22 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionTogglePreferenceController}. */
/** Tests for {@link CaptioningTogglePreferenceController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionTogglePreferenceControllerTest {
public class CaptioningTogglePreferenceControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionTogglePreferenceController mController;
private CaptioningTogglePreferenceController mController;
private SettingsMainSwitchPreference mSwitchPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionTogglePreferenceController(mContext,
mController = new CaptioningTogglePreferenceController(mContext,
"captioning_preference_switch");
mSwitchPreference = new SettingsMainSwitchPreference(mContext);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mSwitchPreference);

View File

@@ -45,22 +45,22 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionTypefaceController}. */
/** Tests for {@link CaptioningTypefaceController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionTypefaceControllerTest {
public class CaptioningTypefaceControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionTypefaceController mController;
private CaptioningTypefaceController mController;
private ListPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionTypefaceController(mContext, "captioning_typeface");
mController = new CaptioningTypefaceController(mContext, "captioning_typeface");
mPreference = new ListPreference(mContext);
mPreference.setEntries(R.array.captioning_typeface_selector_titles);
mPreference.setEntryValues(R.array.captioning_typeface_selector_values);

View File

@@ -46,22 +46,22 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionWindowColorController}. */
/** Tests for {@link CaptioningWindowColorController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionWindowColorControllerTest {
public class CaptioningWindowColorControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionWindowColorController mController;
private CaptioningWindowColorController mController;
private ColorPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionWindowColorController(mContext, "captioning_window_color");
mController = new CaptioningWindowColorController(mContext, "captioning_window_color");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new ColorPreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);

View File

@@ -45,22 +45,22 @@ import org.robolectric.RobolectricTestRunner;
import org.robolectric.shadow.api.Shadow;
import org.robolectric.shadows.ShadowCaptioningManager;
/** Tests for {@link CaptionWindowOpacityController}. */
/** Tests for {@link CaptioningWindowOpacityController}. */
@RunWith(RobolectricTestRunner.class)
public class CaptionWindowOpacityControllerTest {
public class CaptioningWindowOpacityControllerTest {
@Rule
public final MockitoRule mMockitoRule = MockitoJUnit.rule();
@Mock
private PreferenceScreen mScreen;
private final Context mContext = ApplicationProvider.getApplicationContext();
private CaptionWindowOpacityController mController;
private CaptioningWindowOpacityController mController;
private ColorPreference mPreference;
private ShadowCaptioningManager mShadowCaptioningManager;
@Before
public void setUp() {
mController = new CaptionWindowOpacityController(mContext, "captioning_window_opacity");
mController = new CaptioningWindowOpacityController(mContext, "captioning_window_opacity");
final AttributeSet attributeSet = Robolectric.buildAttributeSet().build();
mPreference = new ColorPreference(mContext, attributeSet);
when(mScreen.findPreference(mController.getPreferenceKey())).thenReturn(mPreference);