Move some constants from TrafficStatsConstants to NetworkStackConstants
Keep the constants are only used by framework in TrafficStatsConstants
and move the others to NetworkStackConstants which is in libs/net.
Bug: 182349970
Test: FrameworksNetTests
NetworkStackTests
TetheringTests
Change-Id: Ib667c115e5f1e01237d88b77bba753363da309cc
This commit is contained in:
@@ -36,7 +36,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 com.android.net.module.util.NetworkStackConstants;
|
||||||
|
|
||||||
import libcore.io.IoUtils;
|
import libcore.io.IoUtils;
|
||||||
|
|
||||||
@@ -446,7 +446,7 @@ public class NetworkDiagnostics {
|
|||||||
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(
|
final int oldTag = TrafficStats.getAndSetThreadStatsTag(
|
||||||
TrafficStatsConstants.TAG_SYSTEM_PROBE);
|
NetworkStackConstants.TAG_SYSTEM_PROBE);
|
||||||
try {
|
try {
|
||||||
mFileDescriptor = Os.socket(mAddressFamily, sockType, protocol);
|
mFileDescriptor = Os.socket(mAddressFamily, sockType, protocol);
|
||||||
} finally {
|
} finally {
|
||||||
@@ -745,7 +745,7 @@ public class NetworkDiagnostics {
|
|||||||
if (ensureMeasurementNecessary()) return;
|
if (ensureMeasurementNecessary()) return;
|
||||||
|
|
||||||
// No need to restore the tag, since this thread is only used for this measurement.
|
// No need to restore the tag, since this thread is only used for this measurement.
|
||||||
TrafficStats.getAndSetThreadStatsTag(TrafficStatsConstants.TAG_SYSTEM_PROBE);
|
TrafficStats.getAndSetThreadStatsTag(NetworkStackConstants.TAG_SYSTEM_PROBE);
|
||||||
|
|
||||||
try (SSLSocket sslSocket = setupSSLSocket()) {
|
try (SSLSocket sslSocket = setupSSLSocket()) {
|
||||||
sendDoTProbe(sslSocket);
|
sendDoTProbe(sslSocket);
|
||||||
|
|||||||
Reference in New Issue
Block a user