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>
<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] -->
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();
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));
}
}