Merge "Move some constants from TrafficStatsConstants to NetworkStackConstants" am: 5c520a3650 am: 348a73f1f0

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

Change-Id: Ideb5a5abbd074a8c905861e902977c442317fc02
This commit is contained in:
Aaron Huang
2021-04-01 16:45:22 +00:00
committed by Automerger Merge Worker

View File

@@ -36,7 +36,7 @@ import android.text.TextUtils;
import android.util.Pair;
import com.android.internal.util.IndentingPrintWriter;
import com.android.internal.util.TrafficStatsConstants;
import com.android.net.module.util.NetworkStackConstants;
import libcore.io.IoUtils;
@@ -446,7 +446,7 @@ public class NetworkDiagnostics {
int sockType, int protocol, long writeTimeout, long readTimeout, int dstPort)
throws ErrnoException, IOException {
final int oldTag = TrafficStats.getAndSetThreadStatsTag(
TrafficStatsConstants.TAG_SYSTEM_PROBE);
NetworkStackConstants.TAG_SYSTEM_PROBE);
try {
mFileDescriptor = Os.socket(mAddressFamily, sockType, protocol);
} finally {
@@ -745,7 +745,7 @@ public class NetworkDiagnostics {
if (ensureMeasurementNecessary()) return;
// 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()) {
sendDoTProbe(sslSocket);