summaryrefslogtreecommitdiffstats
path: root/src/com
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2009-06-17 11:57:42 -0700
committerAmith Yamasani <yamasani@google.com>2009-06-17 12:12:51 -0700
commit2fb22c03bd587b373519f605feece1f846867cf6 (patch)
tree2e038949d928c0df52c4e5cce59f418723110e19 /src/com
parentf11d7458ea2f52b3c4afad495274167b862e7a4c (diff)
downloadpackages_apps_settings-2fb22c03bd587b373519f605feece1f846867cf6.zip
packages_apps_settings-2fb22c03bd587b373519f605feece1f846867cf6.tar.gz
packages_apps_settings-2fb22c03bd587b373519f605feece1f846867cf6.tar.bz2
Fixed auto-uncap of Wifi status messages.
Fixes #1852765. Change strings to lowercase and capitalize on demand.
Diffstat (limited to 'src/com')
-rw-r--r--src/com/android/settings/wifi/AccessPointState.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/com/android/settings/wifi/AccessPointState.java b/src/com/android/settings/wifi/AccessPointState.java
index d050767..7ea2dc9 100644
--- a/src/com/android/settings/wifi/AccessPointState.java
+++ b/src/com/android/settings/wifi/AccessPointState.java
@@ -815,22 +815,23 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
return null;
}
}
-
- private void buildSummary(StringBuilder sb, String string, boolean autoLowerCaseFirstLetter) {
+
+ private void buildSummary(StringBuilder sb, String string, boolean autoUpperCaseFirstLetter) {
if (sb.length() == 0) {
- sb.append(string);
- } else {
- sb.append(", ");
- if (autoLowerCaseFirstLetter) {
- // Convert first letter to lowercase
- sb.append(Character.toLowerCase(string.charAt(0))).append(string, 1,
+ if (autoUpperCaseFirstLetter && string.length() > 1
+ && Character.isLowerCase(string.charAt(0))
+ && !Character.isUpperCase(string.charAt(1))) {
+ sb.append(Character.toUpperCase(string.charAt(0))).append(string, 1,
string.length());
} else {
sb.append(string);
}
+ } else {
+ sb.append(", ");
+ sb.append(string);
}
}
-
+
public int compareTo(AccessPointState other) {
// This ranks the states for displaying in the AP list, not for
// connecting to (wpa_supplicant does that using the WifiConfiguration's