1. Set mNetwork before the NetworkCallbacks can be delivered.
Previously, the code would set mNetwork in updateInfo, relying
on the fact that the BroadcastReceiver registered in onResume
is immediately invoked. However, this races with the
callbacks, which are also immediately invoked. If the
callbacks won the race, mNetwork would not be set and they
would be ignored.
2. Call updateInfo in onResume instead of in displayPreference.
This ensures that it's always called exactly once before the
activity starts running, regardless of whether it's being
displayed the first time (i.e., after onStart) or resumed
by switching from another app. displayPreference is only
called in the former case.
3. Don't call getLinkProperties and getNetworkCapabilities in
updateInfo. These calls are superfluous, because this
information is update by the NetworkCallbacks, and they can
cause jank because updateInfo is called on the UI thread.
This requires that the tests be changed so they always call
onResume, since no UI elements are populated until onResume is
called.
Bug: 62209358
Test: make -j64 RunSettingsRoboTests
Change-Id: Iccb1b9ae51188755d890a6df83004dbe9bec565e
This stops the AP summary from getting stuck on "Connected, no
Internet" even when the system has validated Internet access.
Bug: 62209358
Test: make -j64 RunSettingsRoboTests
Change-Id: I235404408f7d8b958653d25656d97da8206e35ce
Currently, when anything changes, the wifi detail status page
removes and then redraws all IP address information. This causes
the whole screen to flicker. Instead, only add and remove things
when they actually change.
In order to do this, convert the IPv6 addresses from a list of
Preference objects to a single newline-separated text field.
This removes the need to keep track of addresses as they are
added and deleted, and also looks a bit better.
Also, minor correctness fixes:
- Get the gateway from the default route, not from the last route
with a non-null gateway.
- Get the IPv4 subnet mask from the IPv4 address prefix, not from
the last route with prefix length > 0.
Bug: 62171690
Test: make -j64 RunSettingsRoboTests
Test: IP information does not flicker when signal strength changes
Change-Id: Ia9f2a277e53a2800407ae327701c5b95a9eec20a
- Move forget button preference handling logic to
WifiDetailPreferenceController
- Remove unnecessary updateInfo call in onResume since
NETWORK_STATE_CHANGED_ACTION is a sticky broadcast
- Populate network state fields and set up initial wifi state
when the Preference is displayed instead of waiting for onResume
Bug: 37751816
Test: m RunSettingsRoboTests && manually tested on device
Change-Id: I509013c72a0d26fc9a3feca564d92a0ab8414d1e
Disable selectable when adding ipv6 addresses to the
WifiNetworkDetailsPage.
Bug: b/37351354
Test: make RunSettingsRoboTests
Change-Id: I79bc3dcab7339df96598aa1a6505f0148f8844b0
This allows the WifiNetworkDetailsFragment to update dynamically based
on network and connection changes.
Bug: b/36278407
Test: make RunSettingsRoboTests
Change-Id: I388cf9842a144e45b68f2d173c7b29f347226b78
- Fix NPE in WifiDetailPreferenceController#setIpText
- Add MAC address preference in the details section
- Set subnet mask and gateway preferences
- Do not show IP information preferences if no information is available
- Fix string capitalization errors
- Only show IPv4 DNS servers under "Network details" section
Bug: 36483230
Bug: 37096448
Bug: 36482499
Bug: 37165860
Test: m RunSettingsRoboTests
Change-Id: I0e3f0ccfc4a8d802b51ed6b3be81c75e384dd06f
- Fixed disablement of ephemeral networks
- Exit out of the fragment when Forget is pressed
Bug: 36723238
Test: m RunSettingsRoboTests and manual testing
Change-Id: I83c09a44dbef0f02a452dc8c3163523a27bd4b63
- Corrected logic for forgetting the current network in the network
details page
- After a user has forgotten a network, the button becomes disabled
(TODO final UX on this - go/remaining-wifi-picker-work tracks this)
- Added unit tests for forgetting network flow
- Fixed bug where the current tethering WifiConfiguration was associated
with the currrent network
Bug: 36458941
Test: m RunSettingsRoboTests
Change-Id: Ie3c4bae8b295908b17179e60359c8bc599519744
More tests to follow in separate CLs. Submitting test class in order to
unblock parallel development.
Bug: 35963536
Test: make RunSettingsRoboTests
Change-Id: I50752ba0d6c53d016bf5809f7bd5d5f6e0350b90
This page should not be searchable, as it corresponds to a specific
access point, thus click on a search result would not have an access
point in which to open.
Fix WifiPicker bugs b/35883232 and b/35951638 that deal with UI jank.
Bug: 34713316
Test: Tracked in b/35963536 and to be implemented in an immediate follow
up CL.
Change-Id: Iad7f26c7f04c3fc7d07a8e9188843eeb4d44cd36