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

Commit 947c77cb authored by Selim Cinek's avatar Selim Cinek
Browse files

Moved the waiting for fingerprint string to the hint

We don't want to bake in the button into the text, so we're
switching the description to the hint text.

Test: manual
Change-Id: Ib0e4a86a11390ce5d3bcb0de9bc31861ad9ee84d
Fixes: 36557742
parent 44277fbd
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -85,6 +85,7 @@
        android:layout_height="@dimen/keyguard_affordance_height"
        android:layout_gravity="bottom|center_horizontal"
        android:src="@drawable/ic_lock_24dp"
        android:contentDescription="@string/accessibility_unlock_button"
        android:scaleType="center" />

</com.android.systemui.statusbar.phone.KeyguardBottomAreaView>
+2 −2
Original line number Diff line number Diff line
@@ -221,8 +221,8 @@
    <string name="accessibility_voice_assist_button">Voice Assist</string>
    <!-- Content description of the unlock button for accessibility (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_button">Unlock</string>
    <!-- Content description of the unlock button when fingerpint is on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_button_fingerprint">Unlock button, waiting for fingerprint</string>
    <!-- Content description hint of the unlock button when fingerprint is on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_waiting_for_fingerprint">Waiting for fingerprint</string>
    <!-- Accessibility action of the unlock button when fingerpint is on (not shown on the screen). [CHAR LIMIT=NONE] -->
    <string name="accessibility_unlock_without_fingerprint">Unlock without using your fingerprint</string>
    <!-- Click action label for accessibility for the unlock button. [CHAR LIMIT=NONE] -->
+2 −6
Original line number Diff line number Diff line
@@ -179,10 +179,6 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
            setRestingAlpha(
                    anyFingerprintIcon ? 1f : KeyguardAffordanceHelper.SWIPE_RESTING_ALPHA_AMOUNT);
            setImageDrawable(icon);
            String contentDescription = getResources().getString(anyFingerprintIcon
                    ? R.string.accessibility_unlock_button_fingerprint
                    : R.string.accessibility_unlock_button);
            setContentDescription(contentDescription);
            mHasFingerPrintIcon = anyFingerprintIcon;
            if (animation != null && isAnim) {
                animation.forceAnimationOnUI();
@@ -225,13 +221,13 @@ public class LockIcon extends KeyguardAffordanceView implements OnUserInfoChange
    public void onInitializeAccessibilityNodeInfo(AccessibilityNodeInfo info) {
        super.onInitializeAccessibilityNodeInfo(info);
        if (mHasFingerPrintIcon) {
            // Avoid that the button description is also spoken
            info.setClassName(LockIcon.class.getName());
            AccessibilityNodeInfo.AccessibilityAction unlock
                    = new AccessibilityNodeInfo.AccessibilityAction(
                    AccessibilityNodeInfo.ACTION_CLICK,
                    getContext().getString(R.string.accessibility_unlock_without_fingerprint));
            info.addAction(unlock);
            info.setHintText(getContext().getString(
                    R.string.accessibility_waiting_for_fingerprint));
        }
    }