Skip to content
Snippets Groups Projects
Commit 6d0bdd19 authored by Junyu Lai's avatar Junyu Lai
Browse files

Add synchronized block when accessing global variables

This is catched by errorprone where global variables accessing
is not protected by the declared lock, which could lead to a
potiential race problem where these variables are changed but
cannot be seen for the invocation.

This is also safe since:
  1. The method called inside mDefaultNetworks is already holding
     the same lock.
  2. Multiple global variables are protected by this synchronized
     block.

Test: TH
Fix: 181642673
Change-Id: I58e7f124de1f0291e9323ab0b9cf8f52cec32818
parent 1eeeb15f
No related branches found
No related tags found
No related merge requests found
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