Loading core/api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -29284,7 +29284,6 @@ package android.os { field public static final String HARDWARE; field public static final String HOST; field public static final String ID; field public static final boolean IS_DEBUGGABLE; field public static final String MANUFACTURER; field public static final String MODEL; field @NonNull public static final String ODM_SKU; core/api/module-lib-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,10 @@ package android.os { method public final void markVintfStability(); } public class Build { method public static boolean isDebuggable(); } public static class Build.VERSION { field public static final int FIRST_SDK_INT; } Loading core/api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1022,6 +1022,7 @@ package android.os { public class Build { method public static boolean is64BitAbi(String); method public static boolean isDebuggable(); field public static final boolean IS_EMULATOR; } Loading core/java/android/os/Build.java +15 −0 Original line number Diff line number Diff line Loading @@ -1309,10 +1309,25 @@ public class Build { * Debuggable builds allow users to gain root access via local shell, attach debuggers to any * application regardless of whether they have the "debuggable" attribute set, or downgrade * selinux into "permissive" mode in particular. * @hide */ public static final boolean IS_DEBUGGABLE = SystemProperties.getInt("ro.debuggable", 0) == 1; /** * Returns true if the device is running a debuggable build such as "userdebug" or "eng". * * Debuggable builds allow users to gain root access via local shell, attach debuggers to any * application regardless of whether they have the "debuggable" attribute set, or downgrade * selinux into "permissive" mode in particular. * @hide */ @TestApi @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static boolean isDebuggable() { return IS_DEBUGGABLE; } /** {@hide} */ public static final boolean IS_ENG = "eng".equals(TYPE); /** {@hide} */ Loading services/core/java/com/android/server/ConnectivityService.java +1 −1 Original line number Diff line number Diff line Loading @@ -7677,7 +7677,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } void addRequestReassignment(@NonNull final RequestReassignment reassignment) { if (Build.IS_DEBUGGABLE) { if (Build.isDebuggable()) { // The code is never supposed to add two reassignments of the same request. Make // sure this stays true, but without imposing this expensive check on all // reassignments on all user devices. Loading Loading
core/api/current.txt +0 −1 Original line number Diff line number Diff line Loading @@ -29284,7 +29284,6 @@ package android.os { field public static final String HARDWARE; field public static final String HOST; field public static final String ID; field public static final boolean IS_DEBUGGABLE; field public static final String MANUFACTURER; field public static final String MODEL; field @NonNull public static final String ODM_SKU;
core/api/module-lib-current.txt +4 −0 Original line number Diff line number Diff line Loading @@ -117,6 +117,10 @@ package android.os { method public final void markVintfStability(); } public class Build { method public static boolean isDebuggable(); } public static class Build.VERSION { field public static final int FIRST_SDK_INT; } Loading
core/api/test-current.txt +1 −0 Original line number Diff line number Diff line Loading @@ -1022,6 +1022,7 @@ package android.os { public class Build { method public static boolean is64BitAbi(String); method public static boolean isDebuggable(); field public static final boolean IS_EMULATOR; } Loading
core/java/android/os/Build.java +15 −0 Original line number Diff line number Diff line Loading @@ -1309,10 +1309,25 @@ public class Build { * Debuggable builds allow users to gain root access via local shell, attach debuggers to any * application regardless of whether they have the "debuggable" attribute set, or downgrade * selinux into "permissive" mode in particular. * @hide */ public static final boolean IS_DEBUGGABLE = SystemProperties.getInt("ro.debuggable", 0) == 1; /** * Returns true if the device is running a debuggable build such as "userdebug" or "eng". * * Debuggable builds allow users to gain root access via local shell, attach debuggers to any * application regardless of whether they have the "debuggable" attribute set, or downgrade * selinux into "permissive" mode in particular. * @hide */ @TestApi @SystemApi(client = SystemApi.Client.MODULE_LIBRARIES) public static boolean isDebuggable() { return IS_DEBUGGABLE; } /** {@hide} */ public static final boolean IS_ENG = "eng".equals(TYPE); /** {@hide} */ Loading
services/core/java/com/android/server/ConnectivityService.java +1 −1 Original line number Diff line number Diff line Loading @@ -7677,7 +7677,7 @@ public class ConnectivityService extends IConnectivityManager.Stub } void addRequestReassignment(@NonNull final RequestReassignment reassignment) { if (Build.IS_DEBUGGABLE) { if (Build.isDebuggable()) { // The code is never supposed to add two reassignments of the same request. Make // sure this stays true, but without imposing this expensive check on all // reassignments on all user devices. Loading