OSDN Git Service

Cleanup usage of toUpperCase in Keyboard Shortcuts Helper
authorClara Bayarri <clarabayarri@google.com>
Mon, 13 Jun 2016 13:14:12 +0000 (14:14 +0100)
committerClara Bayarri <clarabayarri@google.com>
Mon, 13 Jun 2016 15:48:05 +0000 (16:48 +0100)
The current approach may lead to some cases being dropped, it is
easier to just apply it to the view's properties.

Change-Id: I7c9c171858f7fc1844d0c4250df583d93a3443ba

packages/SystemUI/res/layout/keyboard_shortcuts_key_view.xml
packages/SystemUI/src/com/android/systemui/statusbar/KeyboardShortcuts.java

index 31a8773..9b5e0c8 100644 (file)
@@ -23,4 +23,5 @@
           android:textColor="@color/ksh_key_item_color"
           android:singleLine="true"
           android:gravity="center"
-          android:textSize="@dimen/ksh_item_text_size"/>
+          android:textSize="@dimen/ksh_item_text_size"
+          android:textAllCaps="true" />
index d845121..461a03b 100644 (file)
@@ -697,7 +697,7 @@ public final class KeyboardShortcuts {
         if (displayLabelDrawable != null) {
             shortcutKeys.add(new StringOrDrawable(displayLabelDrawable));
         } else if (displayLabelString != null) {
-            shortcutKeys.add(new StringOrDrawable(displayLabelString.toUpperCase()));
+            shortcutKeys.add(new StringOrDrawable(displayLabelString));
         }
         return shortcutKeys;
     }
@@ -716,7 +716,7 @@ public final class KeyboardShortcuts {
                             mModifierDrawables.get(supportedModifier)));
                 } else {
                     shortcutKeys.add(new StringOrDrawable(
-                            mModifierNames.get(supportedModifier).toUpperCase()));
+                            mModifierNames.get(supportedModifier)));
                 }
                 modifiers &= ~supportedModifier;
             }