Fixed auto-uncap of Wifi status messages.
Fixes #1852765. Change strings to lowercase and capitalize on demand.
This commit is contained in:
@@ -625,18 +625,18 @@
|
|||||||
|
|
||||||
<!-- Value for the wifi security when it is unknown -->
|
<!-- Value for the wifi security when it is unknown -->
|
||||||
<string name="wifi_security_unknown">Unknown</string>
|
<string name="wifi_security_unknown">Unknown</string>
|
||||||
<!-- Verbose security type of a wifi network. Open means no security. -->
|
<!-- Verbose security type of a wifi network. Open means no security. Capitalized by app. -->
|
||||||
<string name="wifi_security_verbose_open">Open network</string>
|
<string name="wifi_security_verbose_open">open network</string>
|
||||||
<!-- Verbose security type of a wifi network. -->
|
<!-- Verbose security type of a wifi network. Capitalized by app. -->
|
||||||
<string name="wifi_security_verbose_wep">Secured with WEP</string>
|
<string name="wifi_security_verbose_wep">secured with WEP</string>
|
||||||
<!-- Verbose security type of a wifi network. -->
|
<!-- Verbose security type of a wifi network. Capitalized by app. -->
|
||||||
<string name="wifi_security_verbose_wpa">Secured with WPA</string>
|
<string name="wifi_security_verbose_wpa">secured with WPA</string>
|
||||||
<!-- Verbose security type of a wifi network. -->
|
<!-- Verbose security type of a wifi network. Capitalized by app. -->
|
||||||
<string name="wifi_security_verbose_wpa2">Secured with WPA2</string>
|
<string name="wifi_security_verbose_wpa2">secured with WPA2</string>
|
||||||
<!-- Verbose security type of a wifi network. -->
|
<!-- Verbose security type of a wifi network. Capitalized by app. -->
|
||||||
<string name="wifi_security_verbose_wpa_eap">Secured with WPA-EAP</string>
|
<string name="wifi_security_verbose_wpa_eap">secured with WPA-EAP</string>
|
||||||
<!-- Verbose security type of a wifi network. -->
|
<!-- Verbose security type of a wifi network. Capitalized by app. -->
|
||||||
<string name="wifi_security_verbose_ieee8021x">Secured with IEEE 802.1x</string>
|
<string name="wifi_security_verbose_ieee8021x">secured with IEEE 802.1x</string>
|
||||||
<!-- Wi-Fi IP addrress label -->
|
<!-- Wi-Fi IP addrress label -->
|
||||||
<string name="ip_address">IP address</string>
|
<string name="ip_address">IP address</string>
|
||||||
<!-- Label for the signal strength -->
|
<!-- Label for the signal strength -->
|
||||||
@@ -683,10 +683,10 @@
|
|||||||
<string name="wifi_show_password">Show password.</string>
|
<string name="wifi_show_password">Show password.</string>
|
||||||
<!--Wi-Fi settings screen menu option -->
|
<!--Wi-Fi settings screen menu option -->
|
||||||
<string name="scan_wifi">Scan</string>
|
<string name="scan_wifi">Scan</string>
|
||||||
<!-- Wifi network summary when not in nearby -->
|
<!-- Wifi network summary when not in nearby. -->
|
||||||
<string name="summary_not_in_range">Not in range</string>
|
<string name="summary_not_in_range">Not in range</string>
|
||||||
<!-- Wifi network summary when the network is configured previously -->
|
<!-- Wifi network summary when the network is configured previously, capitalized by app -->
|
||||||
<string name="summary_remembered">Remembered</string>
|
<string name="summary_remembered">remembered</string>
|
||||||
<!-- Wifi network summary when there was an error connecting -->
|
<!-- Wifi network summary when there was an error connecting -->
|
||||||
<string name="summary_connection_failed">Connection unsuccessful, select to try again</string>
|
<string name="summary_connection_failed">Connection unsuccessful, select to try again</string>
|
||||||
<!-- Header for the list of wifi networks-->
|
<!-- Header for the list of wifi networks-->
|
||||||
|
@@ -815,22 +815,23 @@ public final class AccessPointState implements Comparable<AccessPointState>, Par
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void buildSummary(StringBuilder sb, String string, boolean autoLowerCaseFirstLetter) {
|
private void buildSummary(StringBuilder sb, String string, boolean autoUpperCaseFirstLetter) {
|
||||||
if (sb.length() == 0) {
|
if (sb.length() == 0) {
|
||||||
sb.append(string);
|
if (autoUpperCaseFirstLetter && string.length() > 1
|
||||||
} else {
|
&& Character.isLowerCase(string.charAt(0))
|
||||||
sb.append(", ");
|
&& !Character.isUpperCase(string.charAt(1))) {
|
||||||
if (autoLowerCaseFirstLetter) {
|
sb.append(Character.toUpperCase(string.charAt(0))).append(string, 1,
|
||||||
// Convert first letter to lowercase
|
|
||||||
sb.append(Character.toLowerCase(string.charAt(0))).append(string, 1,
|
|
||||||
string.length());
|
string.length());
|
||||||
} else {
|
} else {
|
||||||
sb.append(string);
|
sb.append(string);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
sb.append(", ");
|
||||||
|
sb.append(string);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public int compareTo(AccessPointState other) {
|
public int compareTo(AccessPointState other) {
|
||||||
// This ranks the states for displaying in the AP list, not for
|
// This ranks the states for displaying in the AP list, not for
|
||||||
// connecting to (wpa_supplicant does that using the WifiConfiguration's
|
// connecting to (wpa_supplicant does that using the WifiConfiguration's
|
||||||
|
Reference in New Issue
Block a user