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

Skip to content
Commit eb6f5ab9 authored by Sarah Chin's avatar Sarah Chin
Browse files

DataConnection fix race condition due to mApnSetting

The race condition occurs when DataConnection calls clearSettings on the
DC thread while the main thread calls toStringSimple on the main thread.
DC#clearSettings sets mApnSetting to null, and toStringSimple calls
getNetworkCapabilities, which checks whether mApnSetting is null or not.
Fix the race condition by making both clearSettings and toStringSimple
synchronized, so mApnSetting will be set to null and toStringSimple will
run afterwards instead of at the same time.

Test: atest DataConnectionTest
Fix: 195317191
Change-Id: I85ca70494f0b2663d3344f2a7c3e6e9a68a57ca1
Merged-In: I85ca70494f0b2663d3344f2a7c3e6e9a68a57ca1
(cherry picked from commit 1b3b4827)
parent ce516b37
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