summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArc Wang <arcwang@google.com>2020-06-03 14:53:04 +0800
committerArc Wang <arcwang@google.com>2020-06-03 14:53:04 +0800
commit9dadaed712f71eba424cb75d2921d72d76f15391 (patch)
tree49619fe17c3fb6bd833bd50300c92783131bc699
parente536cd115bddb9ea5fa38c8ceaf495b3ece78c3d (diff)
[WifiTrackerLib] Settings APP crashes after clicking a Passpoint2.0 Wi-Fi 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
-rw-r--r--libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiPickerTracker.java7
1 files changed, 0 insertions, 7 deletions
diff --git a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiPickerTracker.java b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiPickerTracker.java
index 734779a2d..5686cd727 100644
--- a/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiPickerTracker.java
+++ b/libs/WifiTrackerLib/src/com/android/wifitrackerlib/WifiPickerTracker.java
@@ -320,13 +320,6 @@ public class WifiPickerTracker extends BaseWifiTracker {
|| connectedState == CONNECTED_STATE_CONNECTING;
}).findAny().orElse(null /* other */);
}
- if (mConnectedWifiEntry == null) {
- mConnectedWifiEntry = mOsuWifiEntryCache.values().stream().filter(entry -> {
- final @WifiEntry.ConnectedState int connectedState = entry.getConnectedState();
- return connectedState == CONNECTED_STATE_CONNECTED
- || connectedState == CONNECTED_STATE_CONNECTING;
- }).findAny().orElse(null /* other */);
- }
if (mConnectedWifiEntry == null && mNetworkRequestEntry != null
&& mNetworkRequestEntry.getConnectedState() != CONNECTED_STATE_DISCONNECTED) {
mConnectedWifiEntry = mNetworkRequestEntry;