Unify the caption preference class naming

Bug: 197695932
Test: make RunSettingsRoboTests
Change-Id: Ice244442ad21e6d9f006d488992e9f58cf5c8fb0
This commit is contained in:
menghanli
2022-08-01 16:47:12 +08:00
parent 0494c4540c
commit e57125650d
51 changed files with 202 additions and 210 deletions

View File

@@ -93,7 +93,7 @@ public class CaptionHelper {
previewText.setTextSize(virtualHeight * LINE_HEIGHT_RATIO * fontScale);
} else {
final float textSize = mContext.getResources().getDimension(
R.dimen.caption_preview_text_size);
R.dimen.captioning_preview_text_size);
previewText.setTextSize(textSize * fontScale);
}

View File

@@ -25,9 +25,9 @@ import com.android.settingslib.search.SearchIndexable;
/** Settings fragment containing font style of captioning properties. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class CaptionAppearanceFragment extends DashboardFragment {
public class CaptioningAppearanceFragment extends DashboardFragment {
private static final String TAG = "CaptionAppearanceFragment";
private static final String TAG = "CaptioningAppearanceFragment";
@Override
public int getMetricsCategory() {

View File

@@ -25,12 +25,12 @@ import com.android.settings.core.BasePreferenceController;
import com.google.common.primitives.Floats;
import com.google.common.primitives.Ints;
/** Controller that shows the caption scale and style summary. */
public class CaptionAppearancePreferenceController extends BasePreferenceController {
/** Controller that shows the captioning scale and style summary. */
public class CaptioningAppearancePreferenceController extends BasePreferenceController {
private final CaptioningManager mCaptioningManager;
public CaptionAppearancePreferenceController(Context context, String preferenceKey) {
public CaptioningAppearancePreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptioningManager = context.getSystemService(CaptioningManager.class);
}

View File

@@ -26,13 +26,13 @@ import com.android.settings.R;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption background color. */
public class CaptionBackgroundColorController extends BasePreferenceController
/** Preference controller for captioning background color. */
public class CaptioningBackgroundColorController extends BasePreferenceController
implements OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionBackgroundColorController(Context context, String preferenceKey) {
public CaptioningBackgroundColorController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -25,13 +25,13 @@ import com.android.settings.R;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption background opacity. */
public class CaptionBackgroundOpacityController extends BasePreferenceController
/** Preference controller for captioning background opacity. */
public class CaptioningBackgroundOpacityController extends BasePreferenceController
implements OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionBackgroundOpacityController(Context context, String preferenceKey) {
public CaptioningBackgroundOpacityController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -35,8 +35,8 @@ import com.android.settingslib.core.lifecycle.events.OnStop;
import java.util.Arrays;
import java.util.List;
/** Preference controller for caption custom visibility. */
public class CaptionCustomController extends BasePreferenceController
/** Preference controller for captioning custom visibility. */
public class CaptioningCustomController extends BasePreferenceController
implements LifecycleObserver, OnStart, OnStop {
private Preference mCustom;
@@ -49,7 +49,7 @@ public class CaptionCustomController extends BasePreferenceController
Settings.Secure.ACCESSIBILITY_CAPTIONING_PRESET
);
public CaptionCustomController(Context context, String preferenceKey) {
public CaptioningCustomController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
mContentResolver = context.getContentResolver();
@@ -60,7 +60,7 @@ public class CaptionCustomController extends BasePreferenceController
}
@VisibleForTesting
CaptionCustomController(Context context, String preferenceKey,
CaptioningCustomController(Context context, String preferenceKey,
AccessibilitySettingsContentObserver contentObserver) {
this(context, preferenceKey);
mSettingsContentObserver = contentObserver;

View File

@@ -25,13 +25,13 @@ import com.android.settings.R;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption edge color. */
public class CaptionEdgeColorController extends BasePreferenceController
/** Preference controller for captioning edge color. */
public class CaptioningEdgeColorController extends BasePreferenceController
implements OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionEdgeColorController(Context context, String preferenceKey) {
public CaptioningEdgeColorController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -23,13 +23,13 @@ import androidx.preference.PreferenceScreen;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption edge type. */
public class CaptionEdgeTypeController extends BasePreferenceController
/** Preference controller for captioning edge type. */
public class CaptioningEdgeTypeController extends BasePreferenceController
implements OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionEdgeTypeController(Context context, String preferenceKey) {
public CaptioningEdgeTypeController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -27,14 +27,14 @@ import androidx.preference.PreferenceScreen;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption font size. */
public class CaptionFontSizeController extends BasePreferenceController
/** Preference controller for captioning font size. */
public class CaptioningFontSizeController extends BasePreferenceController
implements Preference.OnPreferenceChangeListener {
private final CaptioningManager mCaptioningManager;
private final CaptionHelper mCaptionHelper;
public CaptionFontSizeController(Context context, String preferenceKey) {
public CaptioningFontSizeController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptioningManager = context.getSystemService(CaptioningManager.class);
mCaptionHelper = new CaptionHelper(context);

View File

@@ -20,12 +20,10 @@ import android.content.Context;
import com.android.settings.R;
/**
* Preference controller for caption footer.
*/
public class CaptionFooterPreferenceController extends AccessibilityFooterPreferenceController {
/** Preference controller for captioning footer. */
public class CaptioningFooterPreferenceController extends AccessibilityFooterPreferenceController {
public CaptionFooterPreferenceController(Context context, String key) {
public CaptioningFooterPreferenceController(Context context, String key) {
super(context, key);
}

View File

@@ -25,13 +25,13 @@ import com.android.settings.R;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption foreground color. */
public class CaptionForegroundColorController extends BasePreferenceController
/** Preference controller for captioning foreground color. */
public class CaptioningForegroundColorController extends BasePreferenceController
implements OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionForegroundColorController(Context context, String preferenceKey) {
public CaptioningForegroundColorController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -25,13 +25,13 @@ import com.android.settings.R;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption foreground opacity. */
public class CaptionForegroundOpacityController extends BasePreferenceController
/** Preference controller for captioning foreground opacity. */
public class CaptioningForegroundOpacityController extends BasePreferenceController
implements OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionForegroundOpacityController(Context context, String preferenceKey) {
public CaptioningForegroundOpacityController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -25,13 +25,13 @@ import androidx.preference.PreferenceScreen;
import com.android.settings.core.BasePreferenceController;
/** Controller that shows the caption locale summary. */
public class CaptionLocalePreferenceController extends BasePreferenceController
/** Controller that shows the captioning locale summary. */
public class CaptioningLocalePreferenceController extends BasePreferenceController
implements Preference.OnPreferenceChangeListener {
private final CaptioningManager mCaptioningManager;
public CaptionLocalePreferenceController(Context context, String preferenceKey) {
public CaptioningLocalePreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptioningManager = context.getSystemService(CaptioningManager.class);
}

View File

@@ -25,9 +25,9 @@ import com.android.settingslib.search.SearchIndexable;
/** Settings fragment containing more options of captioning properties. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class CaptionMoreOptionsFragment extends DashboardFragment {
public class CaptioningMoreOptionsFragment extends DashboardFragment {
private static final String TAG = "CaptionMoreOptionsFragment";
private static final String TAG = "CaptioningMoreOptionsFragment";
@Override
public int getMetricsCategory() {

View File

@@ -24,13 +24,13 @@ import androidx.preference.PreferenceScreen;
import com.android.settings.R;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption preset. */
public class CaptionPresetController extends BasePreferenceController
/** Preference controller for captioning preset. */
public class CaptioningPresetController extends BasePreferenceController
implements ListDialogPreference.OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionPresetController(Context context, String preferenceKey) {
public CaptioningPresetController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -39,8 +39,8 @@ import java.util.Arrays;
import java.util.List;
import java.util.Locale;
/** Controller that shows the caption locale summary. */
public class CaptionPreviewPreferenceController extends BasePreferenceController
/** Controller that shows the captioning locale summary. */
public class CaptioningPreviewPreferenceController extends BasePreferenceController
implements LifecycleObserver, OnStart, OnStop {
@VisibleForTesting
@@ -60,7 +60,7 @@ public class CaptionPreviewPreferenceController extends BasePreferenceController
private CaptionHelper mCaptionHelper;
private LayoutPreference mPreference;
public CaptionPreviewPreferenceController(Context context, String preferenceKey) {
public CaptioningPreviewPreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
mSettingsContentObserver = new AccessibilitySettingsContentObserver(mHandler);

View File

@@ -25,9 +25,9 @@ import com.android.settingslib.search.SearchIndexable;
/** Settings fragment containing captioning properties. */
@SearchIndexable(forTarget = SearchIndexable.ALL & ~SearchIndexable.ARC)
public class CaptionPropertiesFragment extends DashboardFragment {
public class CaptioningPropertiesFragment extends DashboardFragment {
private static final String TAG = "CaptionPropertiesFragment";
private static final String TAG = "CaptioningPropertiesFragment";
@Override
public int getMetricsCategory() {

View File

@@ -26,13 +26,13 @@ import com.android.settings.core.TogglePreferenceController;
import com.android.settings.widget.SettingsMainSwitchPreference;
import com.android.settingslib.widget.OnMainSwitchChangeListener;
/** Preference controller for caption more options. */
public class CaptionTogglePreferenceController extends TogglePreferenceController
/** Preference controller for captioning more options. */
public class CaptioningTogglePreferenceController extends TogglePreferenceController
implements OnMainSwitchChangeListener {
private final CaptionHelper mCaptionHelper;
public CaptionTogglePreferenceController(Context context, String preferenceKey) {
public CaptioningTogglePreferenceController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -27,13 +27,13 @@ import androidx.preference.PreferenceScreen;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption type face. */
public class CaptionTypefaceController extends BasePreferenceController
/** Preference controller for captioning type face. */
public class CaptioningTypefaceController extends BasePreferenceController
implements Preference.OnPreferenceChangeListener {
private final CaptionHelper mCaptionHelper;
public CaptionTypefaceController(Context context, String preferenceKey) {
public CaptioningTypefaceController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -26,13 +26,13 @@ import com.android.settings.R;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption window color. */
public class CaptionWindowColorController extends BasePreferenceController
/** Preference controller for captioning window color. */
public class CaptioningWindowColorController extends BasePreferenceController
implements OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionWindowColorController(Context context, String preferenceKey) {
public CaptioningWindowColorController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}

View File

@@ -25,13 +25,13 @@ import com.android.settings.R;
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
import com.android.settings.core.BasePreferenceController;
/** Preference controller for caption window opacity. */
public class CaptionWindowOpacityController extends BasePreferenceController
/** Preference controller for captioning window opacity. */
public class CaptioningWindowOpacityController extends BasePreferenceController
implements OnValueChangedListener {
private final CaptionHelper mCaptionHelper;
public CaptionWindowOpacityController(Context context, String preferenceKey) {
public CaptioningWindowOpacityController(Context context, String preferenceKey) {
super(context, preferenceKey);
mCaptionHelper = new CaptionHelper(context);
}