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

Commit a5043fb4 authored by Ashish Sharma's avatar Ashish Sharma Committed by Android (Google) Code Review
Browse files

Merge "Fix the race condition for b/11458382"

parents c0b53515 c13b9450
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -464,22 +464,22 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
            private NetworkStatsCollection mUidTagComplete;

            private NetworkStatsCollection getUidComplete() {
                if (mUidComplete == null) {
                synchronized (mStatsLock) {
                    if (mUidComplete == null) {
                        mUidComplete = mUidRecorder.getOrLoadCompleteLocked();
                    }
                }
                    return mUidComplete;
                }
            }

            private NetworkStatsCollection getUidTagComplete() {
                if (mUidTagComplete == null) {
                synchronized (mStatsLock) {
                    if (mUidTagComplete == null) {
                        mUidTagComplete = mUidTagRecorder.getOrLoadCompleteLocked();
                    }
                }
                    return mUidTagComplete;
                }
            }

            @Override
            public NetworkStats getSummaryForNetwork(