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

Commit f5e2e975 authored by Ian Rogers's avatar Ian Rogers Committed by Android (Google) Code Review
Browse files

Merge "Fix 2 instances of buggy double check locking on non-volatile fields."

parents 5f4f5a70 4509b940
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -378,7 +378,7 @@ public class EventBus extends BroadcastReceiver {

    // Used for initializing the default bus
    private static final Object sLock = new Object();
    private static EventBus sDefaultBus;
    private static volatile EventBus sDefaultBus;

    // The handler to post all events
    private Handler mHandler;
+1 −1
Original line number Diff line number Diff line
@@ -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.