Show security info in saved network list

When an access point linked to a saved network is not found,
security info should be shown in dialog of saved network.
Notes that in Android N this list is created with saved networks
and scan result, and that causes security info is not shown for
access points seen around user, but in Android O only saved
networks are used to create a list. That means security info is
shown for all access points listed in the screen.

Bug: 38102896
Test: make RunSettingsRoboTests

Change-Id: Ia0c5184ae7a1325f2628f4c08e29350c5793a08f
(cherry-pick of a8382c11f58ecbfbc5b8d908b97c53d59cf774fe)
This commit is contained in:
Shinji Sogo
2017-05-06 18:33:41 +09:00
committed by Fan Zhang
parent f1730bee90
commit 8b23c35954
2 changed files with 16 additions and 5 deletions

View File

@@ -372,7 +372,11 @@ public class WifiConfigController implements TextWatcher,
group.addView(row);
}
private String getSignalString() {
@VisibleForTesting
String getSignalString() {
if (!mAccessPoint.isReachable()) {
return null;
}
final int level = mAccessPoint.getLevel();
return (level > -1 && level < mLevels.length) ? mLevels[level] : null;