Makes all custom caption settings unsearchable when custom captions are not active.
Unifies all custom caption controllers under a base controller, whose searchability is directly determined by CaptionHelper#getCustomCaptionAvailability(). Test: atest CaptionHelperTest Bug: 353757664 Flag: com.android.settings.accessibility.fix_a11y_settings_search Change-Id: If44e6eca4c72aa4413cd0a6e8735dbb22c7abe62
This commit is contained in:
@@ -23,22 +23,13 @@ import androidx.preference.PreferenceScreen;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.accessibility.ListDialogPreference.OnValueChangedListener;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
/** Preference controller for captioning background opacity. */
|
||||
public class CaptioningBackgroundOpacityController extends BasePreferenceController
|
||||
public class CaptioningBackgroundOpacityController extends BaseCaptioningCustomController
|
||||
implements OnValueChangedListener {
|
||||
|
||||
private final CaptionHelper mCaptionHelper;
|
||||
|
||||
public CaptioningBackgroundOpacityController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
mCaptionHelper = new CaptionHelper(context);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getAvailabilityStatus() {
|
||||
return AVAILABLE;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user