Track move of socket tagging from libcore to frameworks/base.
Change-Id: I989f7ecab7e4fd1cf21bbe0782e960dfe3b4c8e8
diff --git a/src/org/apache/http/impl/conn/SingleClientConnManager.java b/src/org/apache/http/impl/conn/SingleClientConnManager.java
index d770a35..26b14ee 100644
--- a/src/org/apache/http/impl/conn/SingleClientConnManager.java
+++ b/src/org/apache/http/impl/conn/SingleClientConnManager.java
@@ -31,8 +31,7 @@
package org.apache.http.impl.conn;
-import dalvik.system.BlockGuard;
-
+import dalvik.system.SocketTagger;
import java.io.IOException;
import java.net.Socket;
import java.util.concurrent.TimeUnit;
@@ -258,7 +257,7 @@
try {
final Socket socket = uniquePoolEntry.connection.getSocket();
if (socket != null) {
- BlockGuard.tagSocketFd(socket.getFileDescriptor$());
+ SocketTagger.get().tag(socket);
}
} catch (IOException iox) {
log.debug("Problem tagging socket.", iox);
@@ -300,7 +299,7 @@
// statistics from future users.
final Socket socket = uniquePoolEntry.connection.getSocket();
if (socket != null) {
- BlockGuard.untagSocketFd(socket.getFileDescriptor$());
+ SocketTagger.get().untag(socket);
}
// END android-changed
diff --git a/src/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java b/src/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
index 717acf0..a60eca7 100644
--- a/src/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
+++ b/src/org/apache/http/impl/conn/tsccm/ThreadSafeClientConnManager.java
@@ -30,8 +30,7 @@
package org.apache.http.impl.conn.tsccm;
-import dalvik.system.BlockGuard;
-
+import dalvik.system.SocketTagger;
import java.io.IOException;
import java.net.Socket;
import java.util.concurrent.TimeUnit;
@@ -182,7 +181,7 @@
try {
final Socket socket = entry.getConnection().getSocket();
if (socket != null) {
- BlockGuard.tagSocketFd(socket.getFileDescriptor$());
+ SocketTagger.get().tag(socket);
}
} catch (IOException iox) {
log.debug("Problem tagging socket.", iox);
@@ -217,7 +216,7 @@
final BasicPoolEntry entry = (BasicPoolEntry) hca.getPoolEntry();
final Socket socket = entry.getConnection().getSocket();
if (socket != null) {
- BlockGuard.untagSocketFd(socket.getFileDescriptor$());
+ SocketTagger.get().untag(socket);
}
// END android-changed