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

Commit b5a5e6ce authored by Lorenzo Colitti's avatar Lorenzo Colitti Committed by Gerrit Code Review
Browse files

Merge "Rename setUidForeground to noteUidForeground"

parents 6a8f8912 5a10845f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1061,9 +1061,9 @@ public class NetworkStatsManager {
    @RequiresPermission(anyOf = {
            NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK,
            android.Manifest.permission.NETWORK_STACK})
    public void setUidForeground(int uid, boolean uidForeground) {
    public void noteUidForeground(int uid, boolean uidForeground) {
        try {
            mService.setUidForeground(uid, uidForeground);
            mService.noteUidForeground(uid, uidForeground);
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
+1 −1
Original line number Diff line number Diff line
@@ -91,7 +91,7 @@ interface INetworkStatsService {
            in INetworkStatsProvider provider);

    /** Mark given UID as being in foreground for stats purposes. */
    void setUidForeground(int uid, boolean uidForeground);
    void noteUidForeground(int uid, boolean uidForeground);

    /** Advise persistence threshold; may be overridden internally. */
    void advisePersistThreshold(long thresholdBytes);
+1 −1
Original line number Diff line number Diff line
@@ -1194,7 +1194,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
    }

    @VisibleForTesting
    public void setUidForeground(int uid, boolean uidForeground) {
    public void noteUidForeground(int uid, boolean uidForeground) {
        PermissionUtils.enforceNetworkStackPermission(mContext);
        synchronized (mStatsLock) {
            final int set = uidForeground ? SET_FOREGROUND : SET_DEFAULT;
+1 −1
Original line number Diff line number Diff line
@@ -4124,7 +4124,7 @@ public class NetworkPolicyManagerService extends INetworkPolicyManager.Stub {
                    "updateNetworkStats: " + uid + "/" + (uidForeground ? "F" : "B"));
        }
        try {
            mNetworkStats.setUidForeground(uid, uidForeground);
            mNetworkStats.noteUidForeground(uid, uidForeground);
        } finally {
            Trace.traceEnd(Trace.TRACE_TAG_NETWORK);
        }