Skip to content
Commit 258483bf authored by Weng Su's avatar Weng Su
Browse files

Cache Wi-Fi state in worker thread

- The WifiManager.getWifiState() is a blocking API, It may not be
  suitable for use on the UI thread.

- To avoid blocking the UI thread, we should cache the Wi-Fi state
  from the WIFI_STATE_CHANGED broadcast to return immediately.

Bug: 226039078
Test: manual test
make RunSettingsLibRoboTests ROBOTEST_FILTER=WifiStateWorkerTest

Change-Id: Ia0443824975f01099e52f777c15468f30285f4c1
parent f0af0661
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment