Loading core/java/android/net/NetworkIdentity.java +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> { * 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 Loading core/java/android/os/StrictMode.java +10 −11 Original line number Diff line number Diff line Loading @@ -125,9 +125,6 @@ public final class StrictMode { private static final String TAG = "StrictMode"; private static final boolean LOG_V = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean IS_USER_BUILD = "user".equals(Build.TYPE); private static final boolean IS_ENG_BUILD = "eng".equals(Build.TYPE); /** * Boolean system property to disable strict mode checks outright. * Set this to 'true' to force disable; 'false' has no effect on other Loading Loading @@ -1191,7 +1188,7 @@ public final class StrictMode { // For debug builds, log event loop stalls to dropbox for analysis. // Similar logic also appears in ActivityThread.java for system apps. if (!doFlashes && (IS_USER_BUILD || suppress)) { if (!doFlashes && (Build.IS_USER || suppress)) { setCloseGuardEnabled(false); return false; } Loading @@ -1199,7 +1196,7 @@ public final class StrictMode { // Eng builds have flashes on all the time. The suppression property // overrides this, so we force the behavior only after the short-circuit // check above. if (IS_ENG_BUILD) { if (Build.IS_ENG) { doFlashes = true; } Loading @@ -1208,7 +1205,7 @@ public final class StrictMode { StrictMode.DETECT_DISK_READ | StrictMode.DETECT_NETWORK; if (!IS_USER_BUILD) { if (!Build.IS_USER) { threadPolicyMask |= StrictMode.PENALTY_DROPBOX; } if (doFlashes) { Loading @@ -1219,23 +1216,25 @@ public final class StrictMode { // VM Policy controls CloseGuard, detection of Activity leaks, // and instance counting. if (IS_USER_BUILD) { if (Build.IS_USER) { setCloseGuardEnabled(false); } else { VmPolicy.Builder policyBuilder = new VmPolicy.Builder().detectAll(); if (!IS_ENG_BUILD) { if (!Build.IS_ENG) { // Activity leak detection causes too much slowdown for userdebug because of the // GCs. policyBuilder = policyBuilder.disable(DETECT_VM_ACTIVITY_LEAKS); } policyBuilder = policyBuilder.penaltyDropBox(); if (IS_ENG_BUILD) { if (Build.IS_ENG) { policyBuilder.penaltyLog(); } // All core system components need to tag their sockets to aid // system health investigations if (android.os.Process.myUid() < android.os.Process.FIRST_APPLICATION_UID) { policyBuilder.detectUntaggedSockets(); policyBuilder.enable(DETECT_VM_UNTAGGED_SOCKET); } else { policyBuilder.disable(DETECT_VM_UNTAGGED_SOCKET); } setVmPolicy(policyBuilder.build()); setCloseGuardEnabled(vmClosableObjectLeaksEnabled()); Loading Loading @@ -2294,7 +2293,7 @@ public final class StrictMode { * @hide */ public static Span enterCriticalSpan(String name) { if (IS_USER_BUILD) { if (Build.IS_USER) { return NO_OP_SPAN; } if (name == null || name.isEmpty()) { Loading core/java/android/util/BootTimingsTraceLog.java +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ import java.util.Deque; */ public class BootTimingsTraceLog { // Debug boot time for every step if it's non-user build. private static final boolean DEBUG_BOOT_TIME = !"user".equals(Build.TYPE); private static final boolean DEBUG_BOOT_TIME = !Build.IS_USER; private final Deque<Pair<String, Long>> mStartTimes = DEBUG_BOOT_TIME ? new ArrayDeque<>() : null; private final String mTag; Loading core/java/android/view/InputEventConsistencyVerifier.java +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import android.util.Log; * @hide */ public final class InputEventConsistencyVerifier { private static final boolean IS_ENG_BUILD = "eng".equals(Build.TYPE); private static final boolean IS_ENG_BUILD = Build.IS_ENG; private static final String EVENT_TYPE_KEY = "KeyEvent"; private static final String EVENT_TYPE_TRACKBALL = "TrackballEvent"; Loading core/java/android/view/accessibility/AccessibilityCache.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public final class AccessibilityCache { private static final boolean DEBUG = false; private static final boolean CHECK_INTEGRITY = "eng".equals(Build.TYPE); private static final boolean CHECK_INTEGRITY = Build.IS_ENG; /** * {@link AccessibilityEvent} types that are critical for the cache to stay up to date Loading Loading
core/java/android/net/NetworkIdentity.java +1 −1 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ public class NetworkIdentity implements Comparable<NetworkIdentity> { * 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 Loading
core/java/android/os/StrictMode.java +10 −11 Original line number Diff line number Diff line Loading @@ -125,9 +125,6 @@ public final class StrictMode { private static final String TAG = "StrictMode"; private static final boolean LOG_V = Log.isLoggable(TAG, Log.VERBOSE); private static final boolean IS_USER_BUILD = "user".equals(Build.TYPE); private static final boolean IS_ENG_BUILD = "eng".equals(Build.TYPE); /** * Boolean system property to disable strict mode checks outright. * Set this to 'true' to force disable; 'false' has no effect on other Loading Loading @@ -1191,7 +1188,7 @@ public final class StrictMode { // For debug builds, log event loop stalls to dropbox for analysis. // Similar logic also appears in ActivityThread.java for system apps. if (!doFlashes && (IS_USER_BUILD || suppress)) { if (!doFlashes && (Build.IS_USER || suppress)) { setCloseGuardEnabled(false); return false; } Loading @@ -1199,7 +1196,7 @@ public final class StrictMode { // Eng builds have flashes on all the time. The suppression property // overrides this, so we force the behavior only after the short-circuit // check above. if (IS_ENG_BUILD) { if (Build.IS_ENG) { doFlashes = true; } Loading @@ -1208,7 +1205,7 @@ public final class StrictMode { StrictMode.DETECT_DISK_READ | StrictMode.DETECT_NETWORK; if (!IS_USER_BUILD) { if (!Build.IS_USER) { threadPolicyMask |= StrictMode.PENALTY_DROPBOX; } if (doFlashes) { Loading @@ -1219,23 +1216,25 @@ public final class StrictMode { // VM Policy controls CloseGuard, detection of Activity leaks, // and instance counting. if (IS_USER_BUILD) { if (Build.IS_USER) { setCloseGuardEnabled(false); } else { VmPolicy.Builder policyBuilder = new VmPolicy.Builder().detectAll(); if (!IS_ENG_BUILD) { if (!Build.IS_ENG) { // Activity leak detection causes too much slowdown for userdebug because of the // GCs. policyBuilder = policyBuilder.disable(DETECT_VM_ACTIVITY_LEAKS); } policyBuilder = policyBuilder.penaltyDropBox(); if (IS_ENG_BUILD) { if (Build.IS_ENG) { policyBuilder.penaltyLog(); } // All core system components need to tag their sockets to aid // system health investigations if (android.os.Process.myUid() < android.os.Process.FIRST_APPLICATION_UID) { policyBuilder.detectUntaggedSockets(); policyBuilder.enable(DETECT_VM_UNTAGGED_SOCKET); } else { policyBuilder.disable(DETECT_VM_UNTAGGED_SOCKET); } setVmPolicy(policyBuilder.build()); setCloseGuardEnabled(vmClosableObjectLeaksEnabled()); Loading Loading @@ -2294,7 +2293,7 @@ public final class StrictMode { * @hide */ public static Span enterCriticalSpan(String name) { if (IS_USER_BUILD) { if (Build.IS_USER) { return NO_OP_SPAN; } if (name == null || name.isEmpty()) { Loading
core/java/android/util/BootTimingsTraceLog.java +1 −1 Original line number Diff line number Diff line Loading @@ -29,7 +29,7 @@ import java.util.Deque; */ public class BootTimingsTraceLog { // Debug boot time for every step if it's non-user build. private static final boolean DEBUG_BOOT_TIME = !"user".equals(Build.TYPE); private static final boolean DEBUG_BOOT_TIME = !Build.IS_USER; private final Deque<Pair<String, Long>> mStartTimes = DEBUG_BOOT_TIME ? new ArrayDeque<>() : null; private final String mTag; Loading
core/java/android/view/InputEventConsistencyVerifier.java +1 −1 Original line number Diff line number Diff line Loading @@ -30,7 +30,7 @@ import android.util.Log; * @hide */ public final class InputEventConsistencyVerifier { private static final boolean IS_ENG_BUILD = "eng".equals(Build.TYPE); private static final boolean IS_ENG_BUILD = Build.IS_ENG; private static final String EVENT_TYPE_KEY = "KeyEvent"; private static final String EVENT_TYPE_TRACKBALL = "TrackballEvent"; Loading
core/java/android/view/accessibility/AccessibilityCache.java +1 −1 Original line number Diff line number Diff line Loading @@ -40,7 +40,7 @@ public final class AccessibilityCache { private static final boolean DEBUG = false; private static final boolean CHECK_INTEGRITY = "eng".equals(Build.TYPE); private static final boolean CHECK_INTEGRITY = Build.IS_ENG; /** * {@link AccessibilityEvent} types that are critical for the cache to stay up to date Loading