From cc38306d4fd7774a64582b5060e9071e95929fd1 Mon Sep 17 00:00:00 2001 From: alanv Date: Sat, 19 May 2012 01:07:34 -0700 Subject: [PATCH] Only speak key label after checking for password obscure flag. Bug: 6523222 Change-Id: Ic737c4ce135d869a3422b1ebbea0a845c71b1699 --- .../inputmethod/accessibility/KeyCodeDescriptionMapper.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java b/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java index f4e4105e3..7e1889a74 100644 --- a/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java +++ b/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java @@ -111,9 +111,6 @@ public class KeyCodeDescriptionMapper { if (mKeyLabelMap.containsKey(label)) { return context.getString(mKeyLabelMap.get(label)); } - - // Otherwise, return the label. - return key.mLabel; } // Just attempt to speak the description. @@ -229,6 +226,8 @@ public class KeyCodeDescriptionMapper { return context.getString(mKeyCodeMap.get(code)); } else if (isDefinedNonCtrl) { return Character.toString((char) code); + } else if (!TextUtils.isEmpty(key.mLabel)) { + return key.mLabel; } else { return context.getString(R.string.spoken_description_unknown, code); }