diff --git a/res/values/strings.xml b/res/values/strings.xml index 22ba27a130c..a0798879293 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -3126,6 +3126,8 @@ 1440p QHD+ Full resolution uses more of your battery. Switching your resolution may cause some apps to restart. + + Selected Colors @@ -3946,13 +3948,13 @@ Format SD card for internal storage - Store apps \u0026 media to use on this tablet only. <a href="https://support.google.com/android/answer/12153449">Learn more about setting up an SD card</a> + Store apps \u0026 media to use on this tablet only. <a href="https://support.google.com/android/answer/12153449">Learn more about setting up an SD card</a>. Format Format SD card for internal storage - Store apps \u0026 media to use on this phone only. <a href="https://support.google.com/android/answer/12153449">Learn more about setting up an SD card</a> + Store apps \u0026 media to use on this phone only. <a href="https://support.google.com/android/answer/12153449">Learn more about setting up an SD card</a>. Format @@ -3960,7 +3962,7 @@ Format SD card for portable storage - Store photos, videos, music, and more and access them from other devices. <a href="https://support.google.com/android/answer/12153449">Learn more about setting up an SD card</a> + Store photos, videos, music, and more and access them from other devices. <a href="https://support.google.com/android/answer/12153449">Learn more about setting up an SD card</a>. Format diff --git a/src/com/android/settings/display/ScreenResolutionFragment.java b/src/com/android/settings/display/ScreenResolutionFragment.java index 914d4be568a..7c4b3aeef03 100644 --- a/src/com/android/settings/display/ScreenResolutionFragment.java +++ b/src/com/android/settings/display/ScreenResolutionFragment.java @@ -29,6 +29,8 @@ import android.hardware.display.DisplayManager; import android.provider.Settings; import android.text.TextUtils; import android.view.Display; +import android.view.accessibility.AccessibilityEvent; +import android.view.accessibility.AccessibilityManager; import androidx.annotation.VisibleForTesting; import androidx.preference.PreferenceScreen; @@ -65,6 +67,7 @@ public class ScreenResolutionFragment extends RadioButtonPickerFragment { private IllustrationPreference mImagePreference; private DisplayObserver mDisplayObserver; + private AccessibilityManager mAccessibilityManager; @Override public void onAttach(Context context) { @@ -72,6 +75,7 @@ public class ScreenResolutionFragment extends RadioButtonPickerFragment { mDefaultDisplay = context.getSystemService(DisplayManager.class).getDisplay(Display.DEFAULT_DISPLAY); + mAccessibilityManager = context.getSystemService(AccessibilityManager.class); mResources = context.getResources(); mScreenResolutionOptions = mResources.getStringArray(R.array.config_screen_resolution_options_strings); @@ -215,6 +219,14 @@ public class ScreenResolutionFragment extends RadioButtonPickerFragment { if (!mDisplayObserver.setPendingResolutionChange(selectedWidth)) { return; } + + if (mAccessibilityManager.isEnabled()) { + AccessibilityEvent event = AccessibilityEvent.obtain(); + event.setEventType(AccessibilityEvent.TYPE_ANNOUNCEMENT); + event.getText().add(mResources.getString(R.string.screen_resolution_selected_a11y)); + mAccessibilityManager.sendAccessibilityEvent(event); + } + super.onRadioButtonClicked(selected); }