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

Commit c13b9450 authored by Ashish Sharma's avatar Ashish Sharma
Browse files

Fix the race condition for b/11458382

Change-Id: I862da57a70283a2afd5d67751aec87fb808760d2
parent b7e786c1
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(