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

Commit 2d2f598d authored by Rohan Shah's avatar Rohan Shah Committed by Android (Google) Code Review
Browse files

Merge "[QS] Override/add long click accessibility action" into pi-dev

parents e3ba4964 185f6616
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1748,6 +1748,10 @@
    <!-- Name of the headset in status bar [CHAR LIMIT=30] -->
    <string name="headset">Headset</string>

    <!-- Accessibility description for long click on a quick settings tile - this is used in the
         context of the sentence "double tap and hold to _Open settings_" [CHAR LIMIT=NONE] -->
    <string name="accessibility_long_click_tile">Open settings</string>

    <!-- Accessibility description of headphones icon [CHAR LIMIT=NONE] -->
    <string name="accessibility_status_bar_headphones">Headphones connected</string>

+5 −0
Original line number Diff line number Diff line
@@ -194,6 +194,7 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView {
        setClickable(state.state != Tile.STATE_UNAVAILABLE);
        mIcon.setIcon(state);
        setContentDescription(state.contentDescription);

        mAccessibilityClass = state.expandedAccessibilityClassName;
        if (state instanceof QSTile.BooleanState) {
            boolean newState = ((BooleanState) state).value;
@@ -269,6 +270,10 @@ public class QSTileBaseView extends com.android.systemui.plugins.qs.QSTileView {
                info.setText(label);
                info.setChecked(b);
                info.setCheckable(true);
                info.addAction(
                        new AccessibilityNodeInfo.AccessibilityAction(
                                AccessibilityNodeInfo.AccessibilityAction.ACTION_LONG_CLICK.getId(),
                                getResources().getString(R.string.accessibility_long_click_tile)));
            }
        }
    }