diff options
| author | 2024-09-05 13:56:36 +0000 | |
|---|---|---|
| committer | 2024-09-05 14:02:42 +0000 | |
| commit | 6114e164d9a8a4c910195f88f7e96c313c13c389 (patch) | |
| tree | 2936a1c78a3d1eb6a24c480f2817b3aa7b3aefe9 /libs/androidfw/misc.cpp | |
| parent | 5f1c1da0593beea1ab1c8cad42832eac5431fde4 (diff) | |
[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
Diffstat (limited to 'libs/androidfw/misc.cpp')
0 files changed, 0 insertions, 0 deletions