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

Commit bfc4589d authored by Junyu Lai's avatar Junyu Lai Committed by Gerrit Code Review
Browse files

Merge "Update interface quota limit when network stats updated"

parents 5bdafbf9 41c13c9a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1026,6 +1026,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
            // READ_NETWORK_USAGE_HISTORY permission above.

            synchronized (mNetworkPoliciesSecondLock) {
                updateNetworkRulesNL();
                updateNetworkEnabledNL();
                updateNotificationsNL();
            }
+5 −2
Original line number Diff line number Diff line
@@ -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,9 +888,10 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
            mUidTagRecorder.maybePersistLocked(currentTime);
        }

        // re-arm global alert
        if (oldGlobalAlertBytes != mGlobalAlertBytes) {
            registerGlobalAlert();
        }
    }

    @Override
    public DataUsageRequest registerUsageCallback(String callingPackage,