Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

[SB][Wifi] Save WifiEntry.level to local variable to avoid crashes.

WifiEntry.level can be changed at any time, even mid-SysUI method.
WifiRepository checks the level's validity before creating a
WifiNetworkModel.Active instance, and WifiNetworkModel.Active *also*
checks the level's validity. This means that it's possible for the level
to be valid when the repository checks it, then become invalid before we
create WifiNetworkModel.Active, which then causes a crash.

This CL saves the level to a local variable so that it can't change
between the repo checking it and creating the model.

This CL also updates WifiNetworkModel's min & max level constants to
match WifiTrackerLib, now that we're fully migrated over.

Fixes: 362384551
Flag: EXEMPT bugfix
Test: atest WifiRepositoryImplTest WifiNetworkModelTest
Change-Id: Iefcadcf4b8ca76cf96ded27f599e42966f112c94
parent 5f1c1da0
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment