Skip to content
Commit c53c72ee authored by Caitlin Shkuratov's avatar Caitlin Shkuratov
Browse files

[Status Bar] Fetch WifiManager.isWifiEnabled in the background.

Note: The `initialValue =` in #logDiffsForTable and #stateIn can't call
suspending functions, so they're updated to just be `false`. To make up
for that, an #onStart is added that will fetch the value and the flow is
updated to SharingStarted.Eagerly so that the value is immediately
fetched. This ensures that
WifiRepositoryImplTest#isWifiEnabled_initiallyGetsWifiManagerValue still
passes.

Fixes: 270039915
Test: toggle wifi on/off > verify wifi icon responds appropriately
Test: turn wifi on > restart device > verify isWifiEnabled is true on
start (verified via logging)
Test: turn wifi off > restart device > verify isWifiEnabled is false on
start (verified via logging)
Test: atest WifiRepositoryImplTest

Change-Id: Ifd577a0ae2c495a9d96619851021a37c4bff3cd7
parent e6ac1838
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