Merge "Update interface quota limit when network stats updated"
This commit is contained in:
@@ -1026,6 +1026,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
|
||||
// READ_NETWORK_USAGE_HISTORY permission above.
|
||||
|
||||
synchronized (mNetworkPoliciesSecondLock) {
|
||||
updateNetworkRulesNL();
|
||||
updateNetworkEnabledNL();
|
||||
updateNotificationsNL();
|
||||
}
|
||||
|
||||
@@ -873,6 +873,8 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
+ mPersistThreshold);
|
||||
}
|
||||
|
||||
final long oldGlobalAlertBytes = mGlobalAlertBytes;
|
||||
|
||||
// update and persist if beyond new thresholds
|
||||
final long currentTime = mClock.millis();
|
||||
synchronized (mStatsLock) {
|
||||
@@ -886,8 +888,9 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
mUidTagRecorder.maybePersistLocked(currentTime);
|
||||
}
|
||||
|
||||
// re-arm global alert
|
||||
registerGlobalAlert();
|
||||
if (oldGlobalAlertBytes != mGlobalAlertBytes) {
|
||||
registerGlobalAlert();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user