diff options
| author | 2019-01-03 14:46:06 -0800 | |
|---|---|---|
| committer | 2019-01-15 15:06:07 -0800 | |
| commit | 919d4646add6bddfc1c9b6e06198db4726d4eed4 (patch) | |
| tree | b442c6515749b96ba8a5a5a55d7b232ad792bcbf | |
| parent | 550f7d4dc9fe21d0fc51db88614af5857edb3300 (diff) | |
Set connected OSU network to active AP at top of wifi picker
Clicking on an OSU network in the wifi picker should result in
the OSU network properly showing at the top as the connected
network instead of the underlying infrastructure AP.
Tracking bug for adding robolectric tests: b/122849296
Bug: 118705403
Test: manual, build and visual check
Change-Id: I05560b07acffb8aa85ac371d613088d5b7cd19f6
| -rw-r--r-- | packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java index 1267898d24b9..e2013dff8663 100644 --- a/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java +++ b/packages/SettingsLib/src/com/android/settingslib/wifi/AccessPoint.java @@ -886,7 +886,17 @@ public class AccessPoint implements Comparable<AccessPoint> { // Update to new summary StringBuilder summary = new StringBuilder(); - if (isActive()) { + if (isOsuProvider()) { + if (mOsuProvisioningComplete) { + summary.append(mContext.getString(R.string.osu_provisioning_complete)); + } else if (mOsuFailure != null) { + summary.append(mOsuFailure); + } else if (mOsuStatus != null) { + summary.append(mOsuStatus); + } else { + summary.append(mContext.getString(R.string.tap_to_set_up)); + } + } else if (isActive()) { if (isPasspoint()) { // This is the active connection on passpoint summary.append(getSummary(mContext, ssid, getDetailedState(), @@ -931,16 +941,6 @@ public class AccessPoint implements Comparable<AccessPoint> { } else if (mIsCarrierAp) { summary.append(String.format(mContext.getString( R.string.available_via_carrier), mCarrierName)); - } else if (isOsuProvider()) { - if (mOsuProvisioningComplete) { - summary.append(mContext.getString(R.string.osu_provisioning_complete)); - } else if (mOsuFailure != null) { - summary.append(mOsuFailure); - } else if (mOsuStatus != null) { - summary.append(mOsuStatus); - } else { - summary.append(mContext.getString(R.string.tap_to_set_up)); - } } else if (!isReachable()) { // Wifi out of range summary.append(mContext.getString(R.string.wifi_not_in_range)); } else { // In range, not disabled. @@ -1045,6 +1045,10 @@ public class AccessPoint implements Comparable<AccessPoint> { * match based on SSID and security. */ private boolean isInfoForThisAccessPoint(WifiConfiguration config, WifiInfo info) { + if (info.isOsuAp()) { + return (mOsuStatus != null); + } + if (isPasspoint() == false && networkId != WifiConfiguration.INVALID_NETWORK_ID) { return networkId == info.getNetworkId(); } else if (config != null) { |