Fix 2 instances of buggy double check locking on non-volatile fields.
Bug caught by Error Prone: http://errorprone.info/bugpattern/DoubleCheckedLocking Bug: 27723540 Change-Id: I0b0c06ce4ae1ffb668e8ab3a7fe07706df173f18
This commit is contained in:
@@ -68,7 +68,7 @@ class NetworkStatsObservers {
|
||||
private final AtomicInteger mNextDataUsageRequestId = new AtomicInteger();
|
||||
|
||||
// Lazily instantiated when an observer is registered.
|
||||
private Handler mHandler;
|
||||
private volatile Handler mHandler;
|
||||
|
||||
/**
|
||||
* Creates a wrapper that contains the caller context and a normalized request.
|
||||
|
||||
Reference in New Issue
Block a user