OSDN Git Service

Allow open password dialog for wrong-password wifi access points
authorAntony Sargent <asargent@google.com>
Tue, 18 Jul 2017 22:33:18 +0000 (15:33 -0700)
committerAntony Sargent <asargent@google.com>
Tue, 25 Jul 2017 20:25:59 +0000 (20:25 +0000)
commit5d137f0f2cfe20ffd1e759f2f566e419ba6ce2aa
tree916e3d1066b8a049350a30bda1ff947193b812ce
parent185e462d91bbac35ea450b7bb84f4ffb7fc51208
Allow open password dialog for wrong-password wifi access points

When we're failing to connect to a wifi access point due to an incorrect
password, we want to allow an intent from a notification to open up the
wifi settings page and bring up the dialog for entering a different
password. We already have code in settings to do this for not-yet-saved
access points, so this CL just changes it slightly to also allow it for
saved access points.

Unfortunately WifiSettings can't be tested with Robolectric due to it
not supporting PreferenceScreen, so this adds a test to
WifiSettingsUiTest. There were some existing test failures in that file
which I've fixed while I was in there:

-The TestAccessPointBuilder class wasn't being found at runtime because
 it was getting stripped out at build time due to not being used in
 settings.

-The changingSecurityStateOnApShouldNotCauseMultipleListItems test was
 asserting that we don't end up with multiple entries for the same SSID
 in the access point list when changing the security state for the AP,
 but it was accidentally passing multiple AP's with the same name the
 first time.

Bug: 33245941
Test: runtest --path WifiSettingsUiTest.java
Change-Id: I929ca6892242059df157c01d6e9ea30e8d1c5e78
src/com/android/settings/wifi/WifiSettings.java
tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java