[MS22] Move NetworkManagementSocketTagger into the module

This is heavily used by TrafficStats, and no other modules
are using it. Hence it should be moved to the module as well.

Test: TH
Bug: 204830222

Change-Id: I7ea1ccb916e796c786c29d53e4ecf3970a8af6dd
This commit is contained in:
Junyu Lai
2021-12-27 13:56:00 +00:00
parent 886bf03a2d
commit b7d0199763
2 changed files with 11 additions and 6 deletions

View File

@@ -25,15 +25,21 @@ filegroup {
name: "framework-connectivity-netstats-internal-sources",
srcs: [
"src/android/app/usage/*.java",
"src/android/net/DataUsage*.*",
"src/android/net/INetworkStats*.*",
"src/android/net/NetworkIdentity*.java",
"src/android/net/DataUsageRequest.*",
"src/android/net/INetworkStatsService.aidl",
"src/android/net/INetworkStatsSession.aidl",
"src/android/net/NetworkIdentity.java",
"src/android/net/NetworkIdentitySet.java",
"src/android/net/NetworkStateSnapshot.*",
"src/android/net/NetworkStats*.*",
"src/android/net/NetworkStats.*",
"src/android/net/NetworkStatsAccess.*",
"src/android/net/NetworkStatsCollection.*",
"src/android/net/NetworkStatsHistory.*",
"src/android/net/NetworkTemplate.*",
"src/android/net/TrafficStats.java",
"src/android/net/UnderlyingNetworkInfo.*",
"src/android/net/netstats/**/*.*",
"src/com/android/server/NetworkManagementSocketTagger.java",
],
path: "src",
visibility: [

View File

@@ -18,7 +18,6 @@ package com.android.server;
import android.os.StrictMode;
import android.util.Log;
import android.util.Slog;
import dalvik.system.SocketTagger;
@@ -122,7 +121,7 @@ public final class NetworkManagementSocketTagger extends SocketTagger {
public static void resetKernelUidStats(int uid) {
int errno = native_deleteTagData(0, uid);
if (errno < 0) {
Slog.w(TAG, "problem clearing counters for uid " + uid + " : errno " + errno);
Log.w(TAG, "problem clearing counters for uid " + uid + " : errno " + errno);
}
}