From 65501f8094e5671b13c1697db93700aea4b3ad29 Mon Sep 17 00:00:00 2001 From: Jeff Sharkey Date: Tue, 27 Jun 2017 11:01:36 -0600 Subject: [PATCH] Only require that system UIDs tag their sockets. Apps with a normal UID are typically isolated enough to not require socket tagging; we're mostly interested in tracking down internal UIDs that have lots of code sharing the same UID. Also fix up everyone doing manual string checks of Build.TYPE, since we now have first-class fields for those. Bug: 38126076 Test: builds, boots Change-Id: I3a40348196bd8459289f2b9355d9783a07f1e7dd --- core/java/android/net/NetworkIdentity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/android/net/NetworkIdentity.java b/core/java/android/net/NetworkIdentity.java index 0775bdaaf3..acd7b56027 100644 --- a/core/java/android/net/NetworkIdentity.java +++ b/core/java/android/net/NetworkIdentity.java @@ -157,7 +157,7 @@ public class NetworkIdentity implements Comparable { * Scrub given IMSI on production builds. */ public static String scrubSubscriberId(String subscriberId) { - if ("eng".equals(Build.TYPE)) { + if (Build.IS_ENG) { return subscriberId; } else if (subscriberId != null) { // TODO: parse this as MCC+MNC instead of hard-coding