Merge "Add synchronized block when accessing global variables" into main
This commit is contained in:
@@ -517,11 +517,12 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
break;
|
||||
}
|
||||
case MSG_NOTIFY_NETWORK_STATUS: {
|
||||
synchronized (mStatsLock) {
|
||||
// If no cached states, ignore.
|
||||
if (mLastNetworkStateSnapshots == null) break;
|
||||
// TODO (b/181642673): Protect mDefaultNetworks from concurrent accessing.
|
||||
handleNotifyNetworkStatus(
|
||||
mDefaultNetworks, mLastNetworkStateSnapshots, mActiveIface);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case MSG_PERFORM_POLL_REGISTER_ALERT: {
|
||||
|
||||
Reference in New Issue
Block a user