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

Skip to content
Commit 3f94640e authored by Narayan Kamath's avatar Narayan Kamath
Browse files

Fix a few synchronization issues in WifiMonitor.

- Guard all field accesses in WifiMonitorSingleton with
  a lock.
- WifiMonitorSingleton is now responsible for dispatching
  events to a given monitor (or all monitors if it can't
  find a matching monitor).
- Individual WifiMonitors are now responsible for dispatching
  events sent to them. This makes WifiMonitorThread a dumb
  object. All it does is wait for events and feed them back
  into the WifiMonitorSingleton.
- Also fixes a bug where we weren't telling the WifiMonitor
  that we're disconnected and another where we don't check whether
  a monitor is connected or not before asking it to dispatch
  an event.
- Also, replaces a few uses of entrySet() with a values() iterator
  when the keys are never used. The performance of both methods
  is identical for a HashMap, but the latter is a bit more concise
  and easier to read.

Change-Id: I7ce00174a78c72836666d25ccc5e6e9e687c2570
parent 9ddfa0e2
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