summaryrefslogtreecommitdiffstats
path: root/libs/WifiTrackerLib/src
Commit message (Collapse)AuthorAgeFilesLines
* Replace network utils methodChiachang Wang2021-02-031-2/+3
| | | | | | | | | | | The getNetworkPart() method is used by Setting and wifi lib. NetworkUtils is moved to incoming connectivity mainline. It's not accessible outside the module, so move the method to share lib and update the usage in the callers side. Bug: 172183305 Test: atest WifiTrackerLibTests Change-Id: Id7bc015ef569d6f7b2116da5cfee82649e3315e9
* Merge "[WifiTrackerLib] Reset default route booleans in ↵TreeHugger Robot2020-09-241-0/+3
|\ | | | | | | | | | | | | | | BaseWifiTracker#onStart" into rvc-qpr-dev am: af9da2cbe2 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12666856 Change-Id: Iee801d6840efbce74f812251ac87d3185c8b026b
| * [WifiTrackerLib] Reset default route booleans in BaseWifiTracker#onStartQuang Luong2020-09-221-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default route booleans must be reset to false in onStart() if there is no default route. Otherwise these booleans may still hold an out-of-date "true" value and the actual false->true update will not trigger handleOnDefaultRouteChanged, causing the X in the wifi signal icon to never disappear. Bug: 168885802 Test: Connect to network in wifi picker, open network details and disconnect, go back to wifi picker and connect to same network. Observe X in wifi signal icon to disappear after validation. Change-Id: Ifde41ec0436ae67c59f5b935b5bc4ff1cd357f57
* | Merge "[WifiTrackerLib] Don't prompt password for never-connected networks" ↵Quang Luong2020-09-111-6/+0
|\| | | | | | | | | | | | | | | into rvc-qpr-dev am: 55f0b61020 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12553236 Change-Id: Ifa4bb91d70b684fb081b25debf0bfd941de6738b
| * Merge "[WifiTrackerLib] Don't prompt password for never-connected networks" ↵Quang Luong2020-09-111-6/+0
| |\ | | | | | | | | | into rvc-qpr-dev
| | * [WifiTrackerLib] Don't prompt password for never-connected networksQuang Luong2020-09-091-6/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Password shouldn't be prompted for secure saved networks that haven't been connected to. Bug: 160727383 Test: added a saved network via shell and manually connected to it, observe that password prompt does not pop up. Change-Id: Ib98fcbda077eacf22614aba766dba6ecb32a2ada
* | | Merge "[WifiTrackerLib] Show "Low quality" only if cell outscores wifi" into ↵Quang Luong2020-09-119-47/+108
|\| | | | | | | | | | | | | | | | | | | | | | | rvc-qpr-dev am: 76bd353577 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12475027 Change-Id: Iadb85af346c13d9532ef36266fb78b18e48a4dbb
| * | [WifiTrackerLib] Show "Low quality" only if cell outscores wifiQuang Luong2020-09-099-47/+108
| |/ | | | | | | | | | | | | | | | | | | "Low quality" text for a wifi entry should only show if wifi is validated but the default route is still cellular, which indicates that the score of wifi is insufficiently low. Bug: 163627176 Test: atest WifiTrackerLibTests Change-Id: I1c1f9218354274214222dd6ed92e6b451d74e3f4
* | Merge "[WifiTrackerLib] Add isDefaultNetwork boolean to WifiEntry" into ↵TreeHugger Robot2020-08-249-89/+180
|\| | | | | | | | | | | | | | | rvc-qpr-dev am: cfb75e7ccb Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12402284 Change-Id: I5ce98150e262e18ba9c54c7f56d4fe0d9fc16dcf
| * [WifiTrackerLib] Add isDefaultNetwork boolean to WifiEntryQuang Luong2020-08-229-89/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added boolean isDefaultNetwork to WifiEntry.ConnectedInfo, which may be retrieved through getConnectedInfo() for a connected WifiEntry. This value will be dynamically updated as the default route changes to and from Wifi. For a connected WifiEntry that is validated but not default, the summary will display "Low Quality". Bug: 163627176 Test: atest LocalWifiTrackerLibTests, manual verification of verbose log indicating correct default route state when connecting to validated and unvalidated networks. Change-Id: I35bb3f57a5144311717165aa2be510365db11efb
* | Merge "[WifiTrackerLib] Don't remove connected passpoint entry with no ↵TreeHugger Robot2020-08-141-1/+2
|\| | | | | | | | | | | | | | | scans" into rvc-qpr-dev am: ae0ff85e69 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12370679 Change-Id: I896e65dd15bfbbf00c6532a4424a8484eefa4e74
| * Merge "[WifiTrackerLib] Don't remove connected passpoint entry with no ↵TreeHugger Robot2020-08-141-1/+2
| |\ | | | | | | | | | scans" into rvc-qpr-dev
| | * [WifiTrackerLib] Don't remove connected passpoint entry with no scansQuang Luong2020-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Connected Passpoint entries should not be removed from the wifi picker list if they aren't seen in the scan results. Bug: 162911670 Test: atest WifiPickerTrackerTest Change-Id: I15a6d321659160aceddd428310f6b4c564c3058a
* | | [WifiTrackerLib] Handle isAutoJoinEnabled when no configs available am: ↵Quang Luong2020-08-132-14/+18
|\| | | | | | | | | | | | | | | | | | | | | | | 4976b67589 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12362260 Change-Id: I00e2c93f9a67cff768eea69e7df7a9a3eecaa2ef
| * | [WifiTrackerLib] Handle isAutoJoinEnabled when no configs availableQuang Luong2020-08-122-14/+18
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | PasspointWifiEntry may have cases where mPasspointConfig and mWifiConfig are both null, which can happen for a suggestion passpoint entry that goes out of range, or the brief moment when a subscription passpoint entry is forgotten but not yet removed. isAutoJoinEnabled needs to default to false in case both configs are missing. In addition, to prevent the wrong value from appearing for the out of range suggestion case, keep a reference to the old WifiConfig when updating with null scans. Bug: 163084959 Test: atest WifiTrackerLibTests Change-Id: I5eb40308cc01dc6e6f25b90828dd551f0cf4c633
* | Merge "[WifiTrackerLib] Add null check to setOsuWifiEntry()" into ↵Quang Luong2020-08-121-1/+3
|\| | | | | | | | | | | | | | | rvc-qpr-dev am: 1252c1e8cd Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12345271 Change-Id: I83525ea10a50cbbffadb402ededb885e437eeae4
| * Merge "[WifiTrackerLib] Add null check to setOsuWifiEntry()" into rvc-qpr-devQuang Luong2020-08-121-1/+3
| |\
| | * [WifiTrackerLib] Add null check to setOsuWifiEntry()Quang Luong2020-08-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PasspointWifiEntry.setOsuWifiEntry() needs a null check for the passed in OsuWifiEntry. This flow happens if the user is on the network details page for a passpoint network and a corresponding OSU AP is also in range. If the user exits the range of the OSU AP or scan results fail to come in, then setOsuWifiEntry(null) will be called and cause an NPE. Bug: 163328661 Test: atest WifiTrackerLibTests Change-Id: I01790893a067489b671997a4fb4069ca4d3be8d3
* | | Merge "[WifiTrackerLib] Use WifiInfo MAC address if available" into ↵TreeHugger Robot2020-08-112-8/+20
|\| | | | | | | | | | | | | | | | | | | | | | | rvc-qpr-dev am: 6ee5e95fdd Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12337309 Change-Id: I741f3cdb4e2b58174a69155b37a1089d3bcf53e7
| * | Merge "[WifiTrackerLib] Use WifiInfo MAC address if available" into rvc-qpr-devTreeHugger Robot2020-08-112-8/+20
| |\ \
| | * | [WifiTrackerLib] Use WifiInfo MAC address if availableQuang Luong2020-08-072-8/+20
| | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Always use the mac address from WifiInfo if available so that we are always displaying the actual mac address of the connection instead of the address stored in the wificonfig, in case enhanced mac randomization is enabled. Bug: 160028657 Test: atest WifiTrackerLibTests Change-Id: I403957b2ba5a845ed5ddc51fe8b39a087f29456a (cherry picked from commit 6fd689db23cb2974fa1078d476fe94aa127cec24)
* | | Merge "[WifiTrackerLib] Use SSID as title for Osu entries with no friendly ↵TreeHugger Robot2020-08-101-9/+24
|\| | | | | | | | | | | | | | | | | | | | | | | name" into rvc-qpr-dev am: 5f0cfd6808 Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12329060 Change-Id: I6412c6ac193c03ae27b9d0f0a353626b2ef00cce
| * | [WifiTrackerLib] Use SSID as title for Osu entries with no friendly nameQuang Luong2020-08-101-9/+24
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | OsuProviders with null friendly name is a possible scenario that could crash Wifi Settings. If the friendly name is not available, default to the SSID and then to the server uri if needed. Bug: 160748340 Test: manual visual verification that SSID appears as title if friendly name is hardcoded as null. Change-Id: I8f2b1b7a5a2c12d1c1ad43a9e8f786016355c2c1 (cherry picked from commit f02e7c63519548630221badd760651d55bbb99cb) Merged-In: I8f2b1b7a5a2c12d1c1ad43a9e8f786016355c2c1
* | Merge "[WifiTrackerLib] Hide Connect button if there is no active SIM of the ↵TreeHugger Robot2020-08-071-2/+32
|\| | | | | | | | | | | | | | | carrier ID" into rvc-qpr-dev am: c6cf047d1d Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/opt/net/wifi/+/12168004 Change-Id: Ie7fd586d8ae9e49d961e23a4fa8d9526dee5c5ee
| * [WifiTrackerLib] Hide Connect button if there is no active SIM of the carrier IDArc Wang2020-07-221-2/+32
| | | | | | | | | | | | | | | | | | | | If users set a carrier ID for SIM dependent EAP method, when the SIM subscription of the carrier ID is not active, Connect button should be hide. Bug: 142792009 Test: atest com.android.wifitrackerlib.StandardWifiEntryTest Change-Id: Idb225a34b7bcd3a9c7d3e415fd0d8f69ba52bc8e
* | [WifiTrackerLib] Remove ClickableSpan when helpUriString is emptygovenliu2020-07-291-0/+5
|/ | | | | | | | | To prevent unexpected behavior on empty Span, return original string when the helpUriString parameter in linkifyAnnotation is empty. Bug: 161951681 Test: atest com.android.wifitrackerlib.UtilsTest Change-Id: Ib0fd7370a57e833cd04c258c25203a835e5168f1 Merged-In: I9ccb1494d46aca5a4736e9523426941e5599af19
* Merge changes I098b9210,I884b4bee into rvc-devTreeHugger Robot2020-06-184-71/+15
|\ | | | | | | | | | | * changes: [WifiTrackerLib] Implement Passpoint isMetered() and getMacAddress() [WifiTrackerLib] Cleanup obsolete methods and TODOs
| * [WifiTrackerLib] Implement Passpoint isMetered() and getMacAddress()Quang Luong2020-06-171-7/+15
| | | | | | | | | | | | | | | | | | Adds correct functionality for PasspointWifiEntry.isMetered() and getMacAddress(). Bug: 159074196 Test: atest WifiTrackerLibTests Change-Id: I098b9210fb49d2be5f892d3ede3e59dc399e381b
| * [WifiTrackerLib] Cleanup obsolete methods and TODOsQuang Luong2020-06-164-64/+0
| | | | | | | | | | | | | | | | | | Remove unused/obsolete methods and TODO comments that are no longer applicable. Bug: 159074196 Test: atest WifiTrackerLibTests Change-Id: I884b4beea8b6a8f58fe726a5998b8e261b0e48ab
* | [WifiTrackerLib] Cache NetworkInfo from NETWORK_STATE_CHANGEDQuang Luong2020-06-103-19/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | NetworkInfo from the last NETWORK_STATE_CHANGED broadcast should be used instead of relying on NetworkInfo from ConnectivityManager, which is not valid for a currently connecting network. The NetworkInfo from NETWORK_STATE_CHANGED will still be valid for a connecting network. Bug: 158337413 Test: build and verify connecting network in wifi picker has correct connecting status. Change-Id: I32bf312a4b01a48fc6a6b48a5d288e276b2231a5
* | [WifiTrackerLib] Passpoint R2 expiration handling in network detailsQuang Luong2020-06-103-3/+46
|/ | | | | | | | | | | | Allow Passpoint R2 remediation by tapping on "Connect" in the network details page, and display "Expired" in the display summary. Bug: 150384136 Test: manually install expired profile and verify behavior in network details page. Change-Id: I8058c02a7795de3f346e205e2d9d4da4ec9192bb
* [WifiTrackerLib] Passpoint R2 expiration handling in pickerQuang Luong2020-06-093-17/+85
| | | | | | | | | | | | Passpoint R2 subscriptions which are expired will now show "Tap to renew subscription and connect" in their wifi picker summaries. Tapping on these entries will open an OSU flow to renew the subscription. Bug: 150384136 Test: manually install an expired profile and verify OSU flow works from the picker Change-Id: I88e7b1f9607b7e4f68bf03d12999b1f9080c1efd
* Merge "[WifiTrackerLib] Settings APP crashes after clicking a Passpoint2.0 ↵Quang Luong2020-06-041-7/+0
|\ | | | | | | Wi-Fi network twice" into rvc-dev
| * [WifiTrackerLib] Settings APP crashes after clicking a Passpoint2.0 Wi-Fi ↵Arc Wang2020-06-031-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | network twice After the 1st click, WifiPickerTracker#getConnectedWifiEntry() will return the passpoint2.0 OsuWifiEntry, however, NetworkDetailsTracker only supports the key of a StandardWifiEntry or PasspointWifiEntry. NetworkDetailsTracker throws below exception when it gets a key of OsuWifiEntry. This change prevents a OsuWifiEntry to be returned by WifiPickerTracker#getConnectedWifiEntry(). After the 1st click, the OsuWifiEntry will disappear on WifiPicker and then it's online sign up screen shows. Bug: 158055954 Test: manual visual Click a OsuWifiEntry twice before it's online sign up screen shows. After users go back to Wi-Fi picker from the online sign up screen, the result may be: 1. If sign up failed, the OsuWifiEntry shows with the summary "Couldn't connect". 2. If sign up success, there is a connected/connecting PasspointWifiEntry. Change-Id: I89a16c51b001d16c1a5e2f4a8b0f0f942ce8ec72
* | [WifiTrackerLib] Ignore broadcast passpoint wificonfig in Saved NetworksQuang Luong2020-06-022-3/+1
|/ | | | | | | | | | | | Ignore WifiConfigurations for passpoint that are broadcasted through CONFIGURED_NETWORKS_CHANGED in the Saved Networks Page, since this will be mistakenly interpreted as an added saved network. Bug: 158043510 Test: manual visual verification of Saved Networks Page not showing the broadcasted passpoint wificonfig as a saved network. Change-Id: Icfd746c86bee3c7b06252f79977e5ba87ea30b6e
* [WifiTrackerLib] Show networks added through the network request APIQuang Luong2020-05-136-40/+278
| | | | | | | | | | | | Networks added through the network request API will show in the wifi picker as a connected network with "Connected via <app label>" in the summary text. Bug: 155690626 Test: manually adding network through shell cmd and verifying network shows up with correct summary text Change-Id: I616702eb7b34dbc63e6fddba553d1ad71d87377e
* [WifiTrackerLib] Fix Saved Networks page showing "Saved by <package>"Quang Luong2020-05-123-13/+28
| | | | | | | | | | | Fix Saved Networks mistakenly showing "Saved by <package>" for networks that do not have a valid app label to display. Bug: 156324411 Test: manual visual verification that the mistaken string does not appear in Saved Networks page Change-Id: Ife31f095bc318edc92be6b84575cdc938e185807
* [WifiTrackerLib] Use open wifi package name for app label if applicableQuang Luong2020-05-113-46/+28
| | | | | | | | | | | App label of an open wifi network should use the open wifi package name instead of the active scorer name. Bug: 153352576 Test: manual visual verification that connected open wifi network uses the open wifi package name instead of the active scorer name Change-Id: I1e5dd068a5e9086143b928e3f16fec86b23b89b3
* Merge "Show App name when carrier id not set" into rvc-devTreeHugger Robot2020-05-071-4/+12
|\
| * Show App name when carrier id not setNate Jiang2020-05-061-4/+12
| | | | | | | | | | | | | | | | Cherry Pick ag/11398998 and ag/11403417 Bug: 155697387 Test: atest WifiTrackerLibTests Change-Id: I25a18a6a537df2de9e002a6fcdb09ba652561882
* | Merge "[WifiTrackerLib] Return SPEED_NONE if ScoredNetwork has no speed ↵TreeHugger Robot2020-05-061-1/+3
|\ \ | | | | | | | | | info" into rvc-dev
| * | [WifiTrackerLib] Return SPEED_NONE if ScoredNetwork has no speed infoQuang Luong2020-05-061-1/+3
| |/ | | | | | | | | | | | | | | | | The speed value of a ScoredNetwork should be interpreted as SPEED_NONE if the value is 0, instead of being bucketed into SPEED_SLOW. Bug: 155846675 Test: build Change-Id: I6e234f6888c2283f90cf8b7aa8debe6325292505
* / [WifiTrackerLib] Make scanner run on single threadQuang Luong2020-05-041-7/+6
|/ | | | | | | | | | | | Scanner should run on single thread to prevent race condition where onStop() is called on the main thread while a msg is being processed on the worker thread. This would result in a looping msg being sent after the msg queue is cleared, which keeps the scan loop going even after onStop(). Bug: 155425309 Test: build Change-Id: Iecbab79b511bddf30515de27a60ff8eaf431d10e
* [WifiTrackerLib] Add speed label to network summaryQuang Luong2020-04-2910-74/+286
| | | | | | | | | Adds speed label (badging) to the network summary, indicating the network speed based on an rssi curve. Test: atest StandardWifiEntryTest, atest PasspointWifiEntryTest Bug: 152568815 Change-Id: I9c193aa3be0fd684312dad2dd51bb011d0db78c3
* Merge "Show Wi-Fi editor for authentication failures" into rvc-devTreeHugger Robot2020-04-282-0/+42
|\
| * Show Wi-Fi editor for authentication failuresArc Wang2020-04-282-0/+42
| | | | | | | | | | | | | | | | | | | | When the Wi-Fi network is disabled because of authentication failures, Wi-Fi picker should show editor before connecting or the network will always fail to connect. Bug: 112137755 Test: atest com.android.wifitrackerlib.StandardWifiEntryTest Change-Id: I6b9f737f8aea6ef60e92e043afd343e7b8a93ba7
* | Merge "Fix verbose logging ScanResults group problem" into rvc-devArc Wang2020-04-281-4/+4
|\ \
| * | Fix verbose logging ScanResults group problemArc Wang2020-04-271-4/+4
| |/ | | | | | | | | | | | | | | Wi-Fi 6GHZ is 802.11ax, it's frequency is 5925~7125 MHZ Bug: 154529628 Test: compile Change-Id: I3d9596a8e0ef1b8f9d25f2ed8c5d92627d802ca9
* | Merge "Add Wi-Fi network selection verbose logging" into rvc-devArc Wang2020-04-284-0/+55
|\ \
| * | Add Wi-Fi network selection verbose loggingArc Wang2020-04-274-0/+55
| |/ | | | | | | | | | | Bug: 154548505 Test: atest com.android.wifitrackerlib.UtilsTest Change-Id: Iaf21a44948663a4d4b2d5ab150a6d7c9a20f1011