am 508a693c
: Merge "sanitize strings and error messages in wiFi picker" into lmp-mr1-dev
* commit '508a693c9a240a5f297704c8cc837a3cb5702d6c': sanitize strings and error messages in wiFi picker
This commit is contained in:
@@ -1598,12 +1598,16 @@
|
|||||||
<!-- Status for networks disabled for unknown reason -->
|
<!-- Status for networks disabled for unknown reason -->
|
||||||
<string name="wifi_disabled_generic">Disabled</string>
|
<string name="wifi_disabled_generic">Disabled</string>
|
||||||
<!-- Status for networked disabled from a DNS or DHCP failure -->
|
<!-- Status for networked disabled from a DNS or DHCP failure -->
|
||||||
<string name="wifi_disabled_network_failure">Avoided poor Internet connection</string>
|
<string name="wifi_disabled_network_failure">IP Configuration Failure</string>
|
||||||
|
<!-- Status for networked disabled from a wifi association failure -->
|
||||||
|
<string name="wifi_disabled_wifi_failure">WiFi Connection Failure</string>
|
||||||
<!-- Status for networks disabled from authentication failure (wrong password
|
<!-- Status for networks disabled from authentication failure (wrong password
|
||||||
or certificate). -->
|
or certificate). -->
|
||||||
<string name="wifi_disabled_password_failure">Authentication problem</string>
|
<string name="wifi_disabled_password_failure">Authentication problem</string>
|
||||||
<!-- Summary for the remembered network but currently not in range. -->
|
<!-- Summary for the remembered network but currently not in range. -->
|
||||||
<string name="wifi_not_in_range">Not in range</string>
|
<string name="wifi_not_in_range">Not in range</string>
|
||||||
|
<!-- Summary for the remembered network but no internet connection was detected. -->
|
||||||
|
<string name="wifi_no_internet">No Internet Access Detected, won\'t automatically reconnect.</string>
|
||||||
<!-- Substring of status line when Wi-Fi Protected Setup (WPS) is available and
|
<!-- Substring of status line when Wi-Fi Protected Setup (WPS) is available and
|
||||||
string is listed first [CHAR LIMIT=20]-->
|
string is listed first [CHAR LIMIT=20]-->
|
||||||
<string name="wifi_wps_available_first_item">WPS available</string>
|
<string name="wifi_wps_available_first_item">WPS available</string>
|
||||||
|
@@ -299,7 +299,6 @@ class AccessPoint extends Preference {
|
|||||||
// Reachable one goes before unreachable one.
|
// Reachable one goes before unreachable one.
|
||||||
if (mRssi != Integer.MAX_VALUE && other.mRssi == Integer.MAX_VALUE) return -1;
|
if (mRssi != Integer.MAX_VALUE && other.mRssi == Integer.MAX_VALUE) return -1;
|
||||||
if (mRssi == Integer.MAX_VALUE && other.mRssi != Integer.MAX_VALUE) return 1;
|
if (mRssi == Integer.MAX_VALUE && other.mRssi != Integer.MAX_VALUE) return 1;
|
||||||
if (mRssi == Integer.MAX_VALUE && other.mRssi != Integer.MAX_VALUE) return 1;
|
|
||||||
|
|
||||||
// Configured one goes before unconfigured one.
|
// Configured one goes before unconfigured one.
|
||||||
if (networkId != WifiConfiguration.INVALID_NETWORK_ID
|
if (networkId != WifiConfiguration.INVALID_NETWORK_ID
|
||||||
@@ -447,7 +446,7 @@ class AccessPoint extends Preference {
|
|||||||
visibility.append(" rssi=").append(mInfo.getRssi());
|
visibility.append(" rssi=").append(mInfo.getRssi());
|
||||||
visibility.append(" ");
|
visibility.append(" ");
|
||||||
visibility.append(" score=").append(mInfo.score);
|
visibility.append(" score=").append(mInfo.score);
|
||||||
visibility.append(String.format("tx=%.1f,", mInfo.txSuccessRate));
|
visibility.append(String.format(" tx=%.1f,", mInfo.txSuccessRate));
|
||||||
visibility.append(String.format("%.1f,", mInfo.txRetriesRate));
|
visibility.append(String.format("%.1f,", mInfo.txRetriesRate));
|
||||||
visibility.append(String.format("%.1f ", mInfo.txBadRate));
|
visibility.append(String.format("%.1f ", mInfo.txBadRate));
|
||||||
visibility.append(String.format("rx=%.1f", mInfo.rxSuccessRate));
|
visibility.append(String.format("rx=%.1f", mInfo.rxSuccessRate));
|
||||||
@@ -588,6 +587,8 @@ class AccessPoint extends Preference {
|
|||||||
|
|
||||||
if (mState != null) { // This is the active connection
|
if (mState != null) { // This is the active connection
|
||||||
summary.append(Summary.get(context, mState));
|
summary.append(Summary.get(context, mState));
|
||||||
|
} else if (mConfig != null && mConfig.noInternetAccess) {
|
||||||
|
summary.append(context.getString(R.string.wifi_no_internet));
|
||||||
} else if (mConfig != null && ((mConfig.status == WifiConfiguration.Status.DISABLED &&
|
} else if (mConfig != null && ((mConfig.status == WifiConfiguration.Status.DISABLED &&
|
||||||
mConfig.disableReason != WifiConfiguration.DISABLED_UNKNOWN_REASON)
|
mConfig.disableReason != WifiConfiguration.DISABLED_UNKNOWN_REASON)
|
||||||
|| mConfig.autoJoinStatus
|
|| mConfig.autoJoinStatus
|
||||||
@@ -596,8 +597,10 @@ class AccessPoint extends Preference {
|
|||||||
>= WifiConfiguration.AUTO_JOIN_DISABLED_ON_AUTH_FAILURE) {
|
>= WifiConfiguration.AUTO_JOIN_DISABLED_ON_AUTH_FAILURE) {
|
||||||
if (mConfig.disableReason == WifiConfiguration.DISABLED_DHCP_FAILURE) {
|
if (mConfig.disableReason == WifiConfiguration.DISABLED_DHCP_FAILURE) {
|
||||||
summary.append(context.getString(R.string.wifi_disabled_network_failure));
|
summary.append(context.getString(R.string.wifi_disabled_network_failure));
|
||||||
} else {
|
} else if (mConfig.disableReason == WifiConfiguration.DISABLED_AUTH_FAILURE) {
|
||||||
summary.append(context.getString(R.string.wifi_disabled_password_failure));
|
summary.append(context.getString(R.string.wifi_disabled_password_failure));
|
||||||
|
} else {
|
||||||
|
summary.append(context.getString(R.string.wifi_disabled_wifi_failure));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
switch (mConfig.disableReason) {
|
switch (mConfig.disableReason) {
|
||||||
@@ -626,7 +629,7 @@ class AccessPoint extends Preference {
|
|||||||
//add RSSI/band information for this config, what was seen up to 6 seconds ago
|
//add RSSI/band information for this config, what was seen up to 6 seconds ago
|
||||||
//verbose WiFi Logging is only turned on thru developers settings
|
//verbose WiFi Logging is only turned on thru developers settings
|
||||||
if (mInfo != null && mState != null) { // This is the active connection
|
if (mInfo != null && mState != null) { // This is the active connection
|
||||||
summary.append(" (f=" + Integer.toString(mInfo.getFrequency()) + ")");
|
summary.append(" f=" + Integer.toString(mInfo.getFrequency()));
|
||||||
}
|
}
|
||||||
summary.append(" " + getVisibilityStatus());
|
summary.append(" " + getVisibilityStatus());
|
||||||
if (mConfig != null && mConfig.autoJoinStatus > 0) {
|
if (mConfig != null && mConfig.autoJoinStatus > 0) {
|
||||||
@@ -644,6 +647,15 @@ class AccessPoint extends Preference {
|
|||||||
}
|
}
|
||||||
summary.append(")");
|
summary.append(")");
|
||||||
}
|
}
|
||||||
|
if (mConfig != null && mConfig.numIpConfigFailures > 0) {
|
||||||
|
summary.append(" ipf=").append(mConfig.numIpConfigFailures);
|
||||||
|
}
|
||||||
|
if (mConfig != null && mConfig.numConnectionFailures > 0) {
|
||||||
|
summary.append(" cf=").append(mConfig.numConnectionFailures);
|
||||||
|
}
|
||||||
|
if (mConfig != null && mConfig.numAuthFailures > 0) {
|
||||||
|
summary.append(" authf=").append(mConfig.numAuthFailures);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (summary.length() > 0) {
|
if (summary.length() > 0) {
|
||||||
|
Reference in New Issue
Block a user