Move TrafficStats tags for the network stack constants
As per API council feedback, these constants should live in a place that is private to the network stack, only with a range defined in system API. Bug: 129433383 Test: m Change-Id: I84a90f84a9af6fef4667ee4d512ebd0413222086 (cherry picked from commit 79a6330650ca04bd7a08afbd63f8016a3b30bc72)
This commit is contained in:
@@ -33,6 +33,7 @@ import android.text.TextUtils;
|
|||||||
import android.util.Pair;
|
import android.util.Pair;
|
||||||
|
|
||||||
import com.android.internal.util.IndentingPrintWriter;
|
import com.android.internal.util.IndentingPrintWriter;
|
||||||
|
import com.android.internal.util.TrafficStatsConstants;
|
||||||
|
|
||||||
import libcore.io.IoUtils;
|
import libcore.io.IoUtils;
|
||||||
|
|
||||||
@@ -381,7 +382,8 @@ public class NetworkDiagnostics {
|
|||||||
protected void setupSocket(
|
protected void setupSocket(
|
||||||
int sockType, int protocol, long writeTimeout, long readTimeout, int dstPort)
|
int sockType, int protocol, long writeTimeout, long readTimeout, int dstPort)
|
||||||
throws ErrnoException, IOException {
|
throws ErrnoException, IOException {
|
||||||
final int oldTag = TrafficStats.getAndSetThreadStatsTag(TrafficStats.TAG_SYSTEM_PROBE);
|
final int oldTag = TrafficStats.getAndSetThreadStatsTag(
|
||||||
|
TrafficStatsConstants.TAG_SYSTEM_PROBE);
|
||||||
try {
|
try {
|
||||||
mFileDescriptor = Os.socket(mAddressFamily, sockType, protocol);
|
mFileDescriptor = Os.socket(mAddressFamily, sockType, protocol);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user