am b805ceda: am ba6a68c8: Merge "Fix not updating error message when authentication fails"

* commit 'b805ceda30be33e663c708663e9d6b7bebfa0914':
  Fix not updating error message when authentication fails
This commit is contained in:
Irfan Sheriff
2013-03-05 21:08:07 +00:00
committed by Android Git Automerger

View File

@@ -338,11 +338,7 @@ class AccessPoint extends Preference {
setTitle(ssid); setTitle(ssid);
Context context = getContext(); Context context = getContext();
if (mState != null) { // This is the active connection if (mConfig != null && mConfig.status == WifiConfiguration.Status.DISABLED) {
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) {
switch (mConfig.disableReason) { switch (mConfig.disableReason) {
case WifiConfiguration.DISABLED_AUTH_FAILURE: case WifiConfiguration.DISABLED_AUTH_FAILURE:
setSummary(context.getString(R.string.wifi_disabled_password_failure)); setSummary(context.getString(R.string.wifi_disabled_password_failure));
@@ -354,6 +350,10 @@ class AccessPoint extends Preference {
case WifiConfiguration.DISABLED_UNKNOWN_REASON: case WifiConfiguration.DISABLED_UNKNOWN_REASON:
setSummary(context.getString(R.string.wifi_disabled_generic)); 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. } else { // In range, not disabled.
StringBuilder summary = new StringBuilder(); StringBuilder summary = new StringBuilder();
if (mConfig != null) { // Is saved network if (mConfig != null) { // Is saved network