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

Commit 4c163346 authored by Michael Bestas's avatar Michael Bestas Committed by Gerrit Code Review
Browse files

SystemUI: Add missing QS accessibility messages

Change-Id: Ic0e3e5bda2aaa296de90831cf059d907889faaf8
parent 94ff516a
Loading
Loading
Loading
Loading
+33 −1
Original line number Diff line number Diff line
@@ -26,13 +26,27 @@
        <item>369</item><item>0</item>
    </array>

    <!-- Performance profiles tiles -->
    <!-- Performance profiles drawables -->
    <string-array name="perf_profile_drawables" translatable="false">
        <item>@drawable/ic_qs_perf_profile_highperf_avd</item>
        <item>@drawable/ic_qs_perf_profile_pwrsv_avd</item>
        <item>@drawable/ic_qs_perf_profile_bal_avd</item>
    </string-array>

    <!-- Performance profiles description-->
    <string-array name="perf_profile_description" translatable="false">
        <item>@string/accessibility_quick_settings_perf_profile_pwrsv</item>
        <item>@string/accessibility_quick_settings_perf_profile_bal</item>
        <item>@string/accessibility_quick_settings_perf_profile_perf</item>
    </string-array>

    <!-- Performance profiles announcement-->
    <string-array name="perf_profile_announcement" translatable="false">
        <item>@string/accessibility_quick_settings_perf_profile_changed_pwrsv</item>
        <item>@string/accessibility_quick_settings_perf_profile_changed_bal</item>
        <item>@string/accessibility_quick_settings_perf_profile_changed_perf</item>
    </string-array>

    <!-- Cardinal directions for the compass tile -->
    <string-array name="cardinal_directions">
        <item>N</item>  <!-- North -->
@@ -54,4 +68,22 @@
        <item>@drawable/ic_livedisplay_outdoor</item>
    </string-array>

    <!-- LiveDisplay description-->
    <string-array name="live_display_description" translatable="false">
        <item>@string/accessibility_quick_settings_live_display_auto</item>
        <item>@string/accessibility_quick_settings_live_display_off</item>
        <item>@string/accessibility_quick_settings_live_display_day</item>
        <item>@string/accessibility_quick_settings_live_display_night</item>
        <item>@string/accessibility_quick_settings_live_display_outdoor</item>
    </string-array>

    <!-- LiveDisplay announcement-->
    <string-array name="live_display_announcement" translatable="false">
        <item>@string/accessibility_quick_settings_live_display_changed_auto</item>
        <item>@string/accessibility_quick_settings_live_display_changed_off</item>
        <item>@string/accessibility_quick_settings_live_display_changed_day</item>
        <item>@string/accessibility_quick_settings_live_display_changed_night</item>
        <item>@string/accessibility_quick_settings_live_display_changed_outdoor</item>
    </string-array>

</resources>
+146 −14
Original line number Diff line number Diff line
@@ -37,12 +37,40 @@
    <!-- Content description of the roaming tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_roaming_on">Roaming on.</string>

    <!-- Content description of the location tile in quick settings when on, battery saving mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_battery_saving">Location reporting: battery saving mode.</string>
    <!-- Content description of the location tile in quick settings when on, sensors only mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_gps_only">Location reporting: sensors only mode.</string>
    <!-- Content description of the location tile in quick settings when on, high accuracy mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_high_accuracy">Location reporting: high accuracy mode.</string>
    <!-- Content description of the network adb tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_network_adb_off">ADB over network off.</string>
    <!-- Content description of the network adb tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_network_adb_on">ADB over network on.</string>

    <!-- Announcement made when network adb changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_network_adb_changed_off">ADB over network turned off.</string>
    <!-- Announcement made when network adb changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_network_adb_changed_on">ADB over network turned on.</string>

    <!-- Content description of the ambient display tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_ambient_display_off">Ambient display off.</string>
    <!-- Content description of the ambient display tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_ambient_display_on">Ambient display on.</string>

    <!-- Announcement made when ambient display changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_ambient_display_changed_off">Ambient display turned off.</string>
    <!-- Announcement made when ambient display changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_ambient_display_changed_on">Ambient display turned on.</string>

    <!-- Content description of the color inversion tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_color_inversion_off">Color inversion off.</string>
    <!-- Content description of the color inversion tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_color_inversion_on">Color inversion on.</string>

    <!-- Content description of the compass tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_compass_off">Compass off.</string>
    <!-- Content description of the compass tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_compass_on">Compass on.</string>

    <!-- Announcement made when compass changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_compass_changed_off">Compass turned off.</string>
    <!-- Announcement made when compass changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_compass_changed_on">Compass turned on.</string>

    <!-- Content description of the heads up tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_heads_up_off">Heads up off.</string>
@@ -54,15 +82,106 @@
    <!-- Announcement made when heads up changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_heads_up_changed_on">Heads up turned on.</string>

    <!-- Content description of the ambient display tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_ambient_display_off">Ambient display off.</string>
    <!-- Content description of the ambient display tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_ambient_display_on">Ambient display on.</string>
    <!-- Content description of the hotspot tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_hotspot_off">Mobile hotspot off.</string>
    <!-- Content description of the hotspot tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_hotspot_on">Mobile hotspot on.</string>

    <!-- Announcement made when ambient display changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_ambient_display_changed_off">Ambient display turned off.</string>
    <!-- Announcement made when ambient display changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_ambient_display_changed_on">Ambient display turned on.</string>
    <!-- Content description of the LiveDisplay tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_off">LiveDisplay off.</string>
    <!-- Content description of the LiveDisplay tile in quick settings when auto (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_auto">LiveDisplay: auto mode.</string>
    <!-- Content description of the LiveDisplay tile in quick settings when day (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_day">LiveDisplay: day mode.</string>
    <!-- Content description of the LiveDisplay tile in quick settings when night (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_night">LiveDisplay: night mode.</string>
    <!-- Content description of the LiveDisplay tile in quick settings when outdoor (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_outdoor">LiveDisplay: outdoor mode.</string>

    <!-- Announcement made when LiveDisplay changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_changed_off">LiveDisplay turned off.</string>
    <!-- Announcement made when LiveDisplay changes to auto (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_changed_auto">LiveDisplay changed to auto mode.</string>
    <!-- Announcement made when LiveDisplay changes to day (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_changed_day">LiveDisplay changed to day mode.</string>
    <!-- Announcement made when LiveDisplay changes to night (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_changed_night">LiveDisplay changed to night mode.</string>
    <!-- Announcement made when LiveDisplay changes to outdoor (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_live_display_changed_outdoor">LiveDisplay changed to outdoor mode.</string>

    <!-- Content description of the location tile in quick settings when on, battery saving mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_battery_saving">Location reporting: battery saving mode.</string>
    <!-- Content description of the location tile in quick settings when on, sensors only mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_gps_only">Location reporting: sensors only mode.</string>
    <!-- Content description of the location tile in quick settings when on, high accuracy mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_high_accuracy">Location reporting: high accuracy mode.</string>

    <!-- Announcement made when the location tile changes to battery saving (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_changed_battery_saving">Location reporting changed to battery saving mode.</string>
    <!-- Announcement made when the location tile changes to sensors only (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_changed_gps_only">Location reporting changed to sensors only mode.</string>
    <!-- Announcement made when the location tile changes to high accuracy (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_location_changed_high_accuracy">Location reporting changed to high accuracy mode.</string>

    <!-- Content description of the lock screen tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_lock_screen_off">Lock screen off.</string>
    <!-- Content description of the lock screen tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_lock_screen_on">Lock screen on.</string>

    <!-- Announcement made when lock screen changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_lock_screen_changed_off">Lock screen turned off.</string>
    <!-- Announcement made when lock screen changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_lock_screen_changed_on">Lock screen turned on.</string>

    <!-- Content description of the LTE tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_lte_off">LTE off.</string>
    <!-- Content description of the LTE tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_lte_on">LTE on.</string>

    <!-- Announcement made when LTE changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_lte_changed_off">LTE turned off.</string>
    <!-- Announcement made when LTE changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_lte_changed_on">LTE turned on.</string>

    <!-- Content description of the NFC tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_nfc_off">NFC off.</string>
    <!-- Content description of the NFC tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_nfc_on">NFC on.</string>

    <!-- Announcement made when NFC changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_nfc_changed_off">NFC turned off.</string>
    <!-- Announcement made when NFC changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_nfc_changed_on">NFC turned on.</string>

    <!-- Content description of the battery mode tile in quick settings when on, power save mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_perf_profile_pwrsv">Battery mode: power save mode.</string>
    <!-- Content description of the battery mode tile in quick settings when on, balanced mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_perf_profile_bal">Battery mode: balanced mode.</string>
    <!-- Content description of the battery mode tile in quick settings when on, performance mode (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_perf_profile_perf">Battery mode: performance mode.</string>

    <!-- Announcement made when the battery mode tile changes to power save (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_perf_profile_changed_pwrsv">Battery mode changed to power save mode.</string>
    <!-- Announcement made when the battery mode tile changes to balanced (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_perf_profile_changed_bal">Battery mode changed to balanced mode.</string>
    <!-- Announcement made when the battery mode tile changes to performance (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_perf_profile_changed_perf">Battery mode changed to performance mode.</string>

    <!-- Content description of the profiles tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_profiles_off">Profiles off.</string>
    <!-- Content description of the profiles tile in quick settings (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_profiles">Profile: <xliff:g id="profile" example="Default">%s</xliff:g>.</string>

    <!-- Announcement made when the profiles tile changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_profiles_changed_off">Profiles turned off.</string>
    <!-- Announcement made when the profiles tile changes (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_profiles_changed">Profile changed to <xliff:g id="profile" example="Default">%s</xliff:g>.</string>

    <!-- Content description of the screen timeout tile in quick settings (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_screen_timeout">Screen timeout: <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>

    <!-- Announcement made when the screen timeout tile changes (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_screen_timeout_changed">Screen timeout changed to <xliff:g id="timeout" example="30 seconds">%s</xliff:g>.</string>

    <!-- Content description of the sync tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_sync_off">Sync off.</string>
@@ -74,6 +193,19 @@
    <!-- Announcement made when sync changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_sync_changed_on">Sync turned on.</string>

    <!-- Content description of the USB tethering tile in quick settings when off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_usb_tether_off">USB tethering off.</string>
    <!-- Content description of the USB tethering tile in quick settings when on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_usb_tether_on">USB tethering on.</string>

    <!-- Announcement made when USB tethering changes to off (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_usb_tether_changed_off">USB tethering turned off.</string>
    <!-- Announcement made when USB tethering changes to on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_usb_tether_changed_on">USB tethering turned on.</string>

    <!-- Content description of the visualizer tile in quick settings (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_visualizer">Visualizer.</string>

    <string name="accessibility_dpad_left">Cursor left</string>
    <string name="accessibility_dpad_right">Cursor right</string>

+15 −0
Original line number Diff line number Diff line
@@ -72,10 +72,25 @@ public class AdbOverNetworkTile extends QSTile<QSTile.BooleanState> {
                state.label = mContext.getString(R.string.quick_settings_network_adb_label);
            }
            state.icon = ResourceIcon.get(R.drawable.ic_qs_network_adb_on);
            state.contentDescription = mContext.getString(
                    R.string.accessibility_quick_settings_network_adb_on);
        } else {
            // Otherwise set the label and disabled icon
            state.label = mContext.getString(R.string.quick_settings_network_adb_label);
            state.icon = ResourceIcon.get(R.drawable.ic_qs_network_adb_off);
            state.contentDescription = mContext.getString(
                    R.string.accessibility_quick_settings_network_adb_off);
        }
    }

    @Override
    protected String composeChangeAnnouncement() {
        if (mState.value) {
            return mContext.getString(
                    R.string.accessibility_quick_settings_network_adb_changed_on);
        } else {
            return mContext.getString(
                    R.string.accessibility_quick_settings_network_adb_changed_off);
        }
    }

+4 −2
Original line number Diff line number Diff line
@@ -86,9 +86,11 @@ public class AmbientDisplayTile extends QSTile<QSTile.BooleanState> {
    @Override
    protected String composeChangeAnnouncement() {
        if (mState.value) {
            return mContext.getString(R.string.accessibility_quick_settings_ambient_display_changed_on);
            return mContext.getString(
                    R.string.accessibility_quick_settings_ambient_display_changed_on);
        } else {
            return mContext.getString(R.string.accessibility_quick_settings_ambient_display_changed_off);
            return mContext.getString(
                    R.string.accessibility_quick_settings_ambient_display_changed_off);
        }
    }

+9 −1
Original line number Diff line number Diff line
@@ -104,7 +104,15 @@ public class ColorInversionTile extends QSTile<QSTile.BooleanState> {
        state.visible = true;
        state.value = enabled;
        state.label = mContext.getString(R.string.quick_settings_inversion_label);
        state.icon = enabled ? mEnable : mDisable;
        if (enabled) {
            state.icon = mEnable;
            state.contentDescription = mContext.getString(
                    R.string.accessibility_quick_settings_color_inversion_on);
        } else {
            state.icon = mDisable;
            state.contentDescription = mContext.getString(
                    R.string.accessibility_quick_settings_color_inversion_off);
        }
    }

    @Override
Loading