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

Commit 9e3dc546 authored by Peter Kalauskas's avatar Peter Kalauskas Committed by Android (Google) Code Review
Browse files

Merge "New accessibility string for multi-user switch" into sc-dev

parents 3cd3a80f 7a47ce97
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -2295,6 +2295,9 @@
    <!-- accessibility label for button to select user [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_user">Signed in as <xliff:g name="user" example="John">%s</xliff:g></string>

    <!-- Accessibility description (not shown on the screen) of action to open user switcher when the multi-user icon is clicked. It will read as "Double-tap to choose user" in screen readers [CHAR LIMIT=NONE] -->
    <string name="accessibility_quick_settings_choose_user_action">choose user</string>

    <!-- Content description for no internet connection [CHAR LIMIT=NONE] -->
    <string name="data_connection_no_internet">No internet</string>

+11 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.view.accessibility.AccessibilityNodeInfo;

import com.android.internal.logging.UiEventLogger;
import com.android.keyguard.KeyguardConstants;
@@ -143,6 +144,16 @@ public class KeyguardQsUserSwitchController extends ViewController<UserAvatarVie
            openQsUserPanel();
        });

        mView.setAccessibilityDelegate(new View.AccessibilityDelegate() {
            public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
                super.onInitializeAccessibilityNodeInfo(host, info);
                info.addAction(new AccessibilityNodeInfo.AccessibilityAction(
                        AccessibilityNodeInfo.ACTION_CLICK,
                        mContext.getString(
                                R.string.accessibility_quick_settings_choose_user_action)));
            }
        });

        updateView(true /* forceUpdate */);
    }