Merge "Rename setUidForeground to noteUidForeground" am: 8d52f75d38
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2018717 Change-Id: Iacdcfd8549d652ef56fd7d0c63dd88cc890b12b3
This commit is contained in:
@@ -1061,9 +1061,9 @@ public class NetworkStatsManager {
|
|||||||
@RequiresPermission(anyOf = {
|
@RequiresPermission(anyOf = {
|
||||||
NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK,
|
NetworkStack.PERMISSION_MAINLINE_NETWORK_STACK,
|
||||||
android.Manifest.permission.NETWORK_STACK})
|
android.Manifest.permission.NETWORK_STACK})
|
||||||
public void setUidForeground(int uid, boolean uidForeground) {
|
public void noteUidForeground(int uid, boolean uidForeground) {
|
||||||
try {
|
try {
|
||||||
mService.setUidForeground(uid, uidForeground);
|
mService.noteUidForeground(uid, uidForeground);
|
||||||
} catch (RemoteException e) {
|
} catch (RemoteException e) {
|
||||||
throw e.rethrowFromSystemServer();
|
throw e.rethrowFromSystemServer();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ interface INetworkStatsService {
|
|||||||
in INetworkStatsProvider provider);
|
in INetworkStatsProvider provider);
|
||||||
|
|
||||||
/** Mark given UID as being in foreground for stats purposes. */
|
/** 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. */
|
/** Advise persistence threshold; may be overridden internally. */
|
||||||
void advisePersistThreshold(long thresholdBytes);
|
void advisePersistThreshold(long thresholdBytes);
|
||||||
|
|||||||
@@ -1194,7 +1194,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@VisibleForTesting
|
@VisibleForTesting
|
||||||
public void setUidForeground(int uid, boolean uidForeground) {
|
public void noteUidForeground(int uid, boolean uidForeground) {
|
||||||
PermissionUtils.enforceNetworkStackPermission(mContext);
|
PermissionUtils.enforceNetworkStackPermission(mContext);
|
||||||
synchronized (mStatsLock) {
|
synchronized (mStatsLock) {
|
||||||
final int set = uidForeground ? SET_FOREGROUND : SET_DEFAULT;
|
final int set = uidForeground ? SET_FOREGROUND : SET_DEFAULT;
|
||||||
|
|||||||
Reference in New Issue
Block a user