Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0a52fb98 authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 9084753 from d4341004 to tm-qpr1-release

Change-Id: Ia1fe93e688a342a1c334bcdf562da4a6114a47b3
parents be094db9 d4341004
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -3126,6 +3126,8 @@
    <string name="screen_resolution_summary_highest">1440p QHD+</string>
    <!-- The footer message for switch screen resolution [CHAR LIMIT=NONE] -->
    <string name="screen_resolution_footer">Full resolution uses more of your battery. Switching your resolution may cause some apps to restart.</string>
    <!-- Message announced to a11y users when they selected one resolution [CHAR LIMIT=NONE] -->
    <string name="screen_resolution_selected_a11y">Selected</string>
    <!-- Display settings screen, Color mode settings title [CHAR LIMIT=30] -->
    <string name="color_mode_title">Colors</string>
@@ -3946,13 +3948,13 @@
    <!-- Title of a line item. Below this title, a user can tap a button to select this option if they want to use their SD card as extra device storage. [CHAR LIMIT=50] -->
    <string name="storage_wizard_init_v2_internal_title" product="tablet">Format SD card for internal storage</string>
    <!-- Subtext for a line item. Below this subtext, a user can tap a button to select this option if they want to use their SD card as extra device storage. [CHAR LIMIT=NONE] -->
    <string name="storage_wizard_init_v2_internal_summary" product="tablet">Store apps \u0026 media to use on this tablet only. &lt;a href="https://support.google.com/android/answer/12153449"&gt;Learn more about setting up an SD card&lt;/a&gt;</string>
    <string name="storage_wizard_init_v2_internal_summary" product="tablet">Store apps \u0026 media to use on this tablet only. &lt;a href="https://support.google.com/android/answer/12153449"&gt;Learn more about setting up an SD card&lt;/a&gt;.</string>
    <!-- Button text. A user can tap this button if they want to use their SD card as extra device storage. [CHAR LIMIT=32] -->
    <string name="storage_wizard_init_v2_internal_action" product="tablet">Format</string>
    <!-- Title of a line item. Below this title, a user can tap a button to select this option if they want to use their SD card as extra device storage. [CHAR LIMIT=50] -->
    <string name="storage_wizard_init_v2_internal_title" product="default">Format SD card for internal storage</string>
    <!-- Subtext for a line item. Below this subtext, a user can tap a button to select this option if they want to use their SD card as extra device storage. [CHAR LIMIT=NONE] -->
    <string name="storage_wizard_init_v2_internal_summary" product="default">Store apps \u0026 media to use on this phone only. &lt;a href="https://support.google.com/android/answer/12153449"&gt;Learn more about setting up an SD card&lt;/a&gt;</string>
    <string name="storage_wizard_init_v2_internal_summary" product="default">Store apps \u0026 media to use on this phone only. &lt;a href="https://support.google.com/android/answer/12153449"&gt;Learn more about setting up an SD card&lt;/a&gt;.</string>
    <!-- Button text. A user can tap this button if they want to use their SD card as extra device storage. [CHAR LIMIT=32] -->
    <string name="storage_wizard_init_v2_internal_action" product="default">Format</string>
    <!-- This text separates two options in a full-screen message. It's used to indicate a user can choose one option or the other. [CHAR LIMIT=16] -->
@@ -3960,7 +3962,7 @@
    <!-- Title of a line item. Below this title, a user can tap a button to select this option if they want to use their SD card as portable device storage. [CHAR LIMIT=50] -->
    <string name="storage_wizard_init_v2_external_title">Format SD card for portable storage</string>
    <!-- Subtext for a line item. Below this subtext, a user can tap a button to select this option if they want to use their SD card as portable device storage. [CHAR LIMIT=NONE] -->
    <string name="storage_wizard_init_v2_external_summary">Store photos, videos, music, and more and access them from other devices. &lt;a href="https://support.google.com/android/answer/12153449"&gt;Learn more about setting up an SD card&lt;/a&gt;</string>
    <string name="storage_wizard_init_v2_external_summary">Store photos, videos, music, and more and access them from other devices. &lt;a href="https://support.google.com/android/answer/12153449"&gt;Learn more about setting up an SD card&lt;/a&gt;.</string>
    <!-- Button text. A user can tap this button if they want to use their SD card as portable device storage. [CHAR LIMIT=32] -->
    <string name="storage_wizard_init_v2_external_action">Format</string>
    <!-- Button text. A user can tap this button if they want to delay setting up their SD card until a later time. [CHAR LIMIT=32] -->
+12 −0
Original line number Diff line number Diff line
@@ -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);
    }