Commit Graph

6 Commits

Author SHA1 Message Date
Antony Sargent
c00fedc639 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: I16c9c8b0d8380a0e26f9b23df6a8d012af6a2476
Merged-In: I929ca6892242059df157c01d6e9ea30e8d1c5e78
2017-07-26 07:00:51 +00:00
Shunta Sato
22080a1df5 Fix Wi-Fi list adds same AP repeatedly
When switch AP security mode, several same APs are shown.

To fix this issue, append security type to preference
key for avoiding different APs have same key.
git fetch

Cherrypick of:
https://partner-android-review.googlesource.com/#/c/799829/

Bug: 37558394
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: I39621636f14b29e45ba96ff76dc3c21a4996a136
2017-06-28 20:21:46 -07:00
Sundeep Ghuman
4ae59dde43 Allow WifiSettings to show old APs on app resume.
MANUAL MERGE of ag/2398149 to avoid merge conflicts when trying to
submit to oc-dev.

If we do not have any recent scan results, show the previous APs from
when the app was last paused, by not triggering a force update.

Accompanying changes are also made in WifiTracker to prevent
onAccessPointsChanged callbacks from being invoked until the tracker
receives a new 'SCAN_RESULTS_AVAILABLE' broadcast (ag/2409026).

Bug: b/38212080
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
one minute later.

Change-Id: I4f9b2ec855e057e28235b0253ab42c6b4521bebc
2017-06-14 19:05:21 -07:00
Fan Zhang
015c7706e4 Hide saved network preference when there is none.
We already do this when wifi is enabled. This change brings same
behavior when wifi is off.

Change-Id: I44301fe46a6183735f8be71c80cfe719ad0e82b4
Fix: 62094681
Test: runtest --path tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java
2017-06-01 12:38:08 -07:00
Stephen Chen
db332d4aa7 Added WifiSettings Espresso tests.
Added test cases for toggling Wi-Fi state, connected access points, and
saved network preferences.

Bug: 35322629
Bug: 35322690
Bug: 35322875
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: Iaba7fb2fa90cf0f37538c4b1ef141cf6b15d7f52
2017-05-08 14:48:01 -07:00
Sundeep Ghuman
87bf49a436 Force update APs when enabling wifi in WifiSettings.
This reverts commit b2bdc8f17b
and fixes a broken Espresso test case.

Reason for revert: Rolling forward after fix in ag/2133493, to fix b/37324736

Bug: b/37324736
Test: runtest --path
packages/apps/Settings/tests/unit/src/com/android/settings/wifi/WifiSettingsUiTest.java

Change-Id: I9cdf8cb1043af5d527eccbd9cc56d3b02419d7ac
2017-04-25 15:12:00 -07:00