aboutsummaryrefslogtreecommitdiffstats
path: root/java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java
diff options
context:
space:
mode:
authoralanv <alanv@google.com>2012-05-21 14:29:18 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-05-21 14:29:18 -0700
commit2f33311f8ed24fcfd510f9fee92edf8bf37778c3 (patch)
treef354025b7f146c5658a17bfbd33ee2a0bfdb941c /java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java
parent80bf070790e528b895e0426ca81c3ea4cb9638fd (diff)
parent6b9651068b8b8db3591a9c1067cc7dfe27890d7b (diff)
downloadlatinime-2f33311f8ed24fcfd510f9fee92edf8bf37778c3.tar.gz
latinime-2f33311f8ed24fcfd510f9fee92edf8bf37778c3.tar.xz
latinime-2f33311f8ed24fcfd510f9fee92edf8bf37778c3.zip
am 6b965106: am cc38306d: Only speak key label after checking for password obscure flag.
* commit '6b9651068b8b8db3591a9c1067cc7dfe27890d7b': Only speak key label after checking for password obscure flag.
Diffstat (limited to 'java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java')
-rw-r--r--java/src/com/android/inputmethod/accessibility/KeyCodeDescriptionMapper.java5
1 files 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);
}