summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2011-08-18 09:58:32 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-18 09:58:32 -0700
commit0197d825f15844e51b91a0006d411ecb06350641 (patch)
tree39cba2dbf0dc23d0792ddfd331af24b1a647a24c
parentd1106fc9bff66ac4f93f9d6291f0d0136bb544e7 (diff)
parent36bd9844f88cd0eb90e94b45bf5b4aa27d4d5628 (diff)
downloadframeworks_base-0197d825f15844e51b91a0006d411ecb06350641.zip
frameworks_base-0197d825f15844e51b91a0006d411ecb06350641.tar.gz
frameworks_base-0197d825f15844e51b91a0006d411ecb06350641.tar.bz2
Merge "core/java NetworkManagement: Don't untag sockets willy-nilly"
-rw-r--r--core/java/com/android/server/NetworkManagementSocketTagger.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/java/com/android/server/NetworkManagementSocketTagger.java b/core/java/com/android/server/NetworkManagementSocketTagger.java
index 23af37e..9f6ab31 100644
--- a/core/java/com/android/server/NetworkManagementSocketTagger.java
+++ b/core/java/com/android/server/NetworkManagementSocketTagger.java
@@ -115,7 +115,8 @@ public final class NetworkManagementSocketTagger extends SocketTagger {
private void unTagSocketFd(FileDescriptor fd) throws IOException {
int fdNum = fd.getInt$();
- if (fdNum == -1) return;
+ final SocketTags options = threadSocketTags.get();
+ if (fdNum == -1 || (options.statsTag == -1 && options.statsUid == -1)) return;
String cmd = "u " + fdNum;
internalModuleCtrl(cmd);
}