Replace IS_DEBUGGABLE with isDebuggable module API

Introduce a Build.isDebuggable() getter instead of the IS_DEBUGGABLE
static member.

Also make it module API as APK modules now have access to module APIs in
S, but also TestApi so it can be tested.

Test: m
Fixes: 182345786
Change-Id: I25d0848aee758792bbaba8ab73b5dd997a7250b3
This commit is contained in:
Remi NGUYEN VAN
2021-04-07 19:40:31 +09:00
parent 9bc214cd77
commit 10c379a8f2

View File

@@ -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.