Merge "Rename setUidForeground to noteUidForeground" am: b5a5e6ce75 am: 5cf65dbef4 am: 5543650bc2

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2018717

Change-Id: I04612669cde5eea0fef581ab4bcf9274ffe4b57c
This commit is contained in:
Lorenzo Colitti
2022-03-16 00:37:29 +00:00
committed by Automerger Merge Worker
4 changed files with 5 additions and 5 deletions

View File

@@ -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();
}

View File

@@ -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);

View File

@@ -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;

View File

@@ -4094,7 +4094,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);
}