Fix not updating error message when authentication fails
If attempt to configure the first network fails, AccessPoints fails to update error message because it only checks the error code if it is not active. With this change, user may see saved network message for a second because SupplicantStateTracker retries on authentication failure so intermediate status is displayed between each trial. Bug: 8284024 Change-Id: I8b976b03878e27e46726ee8a176f131115b7a409
This commit is contained in:
@@ -338,11 +338,7 @@ class AccessPoint extends Preference {
|
||||
setTitle(ssid);
|
||||
|
||||
Context context = getContext();
|
||||
if (mState != null) { // This is the active connection
|
||||
setSummary(Summary.get(context, mState));
|
||||
} else if (mRssi == Integer.MAX_VALUE) { // Wifi out of range
|
||||
setSummary(context.getString(R.string.wifi_not_in_range));
|
||||
} else if (mConfig != null && mConfig.status == WifiConfiguration.Status.DISABLED) {
|
||||
if (mConfig != null && mConfig.status == WifiConfiguration.Status.DISABLED) {
|
||||
switch (mConfig.disableReason) {
|
||||
case WifiConfiguration.DISABLED_AUTH_FAILURE:
|
||||
setSummary(context.getString(R.string.wifi_disabled_password_failure));
|
||||
@@ -354,6 +350,10 @@ class AccessPoint extends Preference {
|
||||
case WifiConfiguration.DISABLED_UNKNOWN_REASON:
|
||||
setSummary(context.getString(R.string.wifi_disabled_generic));
|
||||
}
|
||||
} else if (mRssi == Integer.MAX_VALUE) { // Wifi out of range
|
||||
setSummary(context.getString(R.string.wifi_not_in_range));
|
||||
} else if (mState != null) { // This is the active connection
|
||||
setSummary(Summary.get(context, mState));
|
||||
} else { // In range, not disabled.
|
||||
StringBuilder summary = new StringBuilder();
|
||||
if (mConfig != null) { // Is saved network
|
||||
|
Reference in New Issue
Block a user