Split the string resource id for non-generic accessibility preference.
- Keep the accessibility settings strings the same as in U. Bug: 289425138 Test: manual Test: atest Change-Id: Iddbbfe627c93529d2421e153094a30628229c4bc
This commit is contained in:
@@ -20,12 +20,10 @@ import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.ResolveInfo;
|
||||
import android.provider.Settings;
|
||||
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import com.android.settings.R;
|
||||
import com.android.settings.core.BasePreferenceController;
|
||||
|
||||
import java.util.List;
|
||||
@@ -56,16 +54,5 @@ public class LiveCaptionPreferenceController extends BasePreferenceController {
|
||||
public void updateState(Preference preference) {
|
||||
super.updateState(preference);
|
||||
preference.setIntent(LIVE_CAPTION_INTENT);
|
||||
boolean enabled = Settings.Secure.getInt(
|
||||
mContext.getContentResolver(),
|
||||
Settings.Secure.ODI_CAPTIONS_ENABLED, AccessibilityUtil.State.OFF)
|
||||
== AccessibilityUtil.State.ON;
|
||||
CharSequence serviceState = mContext.getText(enabled
|
||||
? R.string.live_caption_enabled : R.string.live_caption_disabled);
|
||||
|
||||
preference.setSummary(
|
||||
mContext.getString(
|
||||
R.string.preference_summary_default_combination,
|
||||
serviceState, mContext.getText(R.string.live_caption_summary)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user