From 3b05e4d74c57c2987de3ef93a355dcf39066fb55 Mon Sep 17 00:00:00 2001 From: Mathieu Chartier Date: Mon, 9 Sep 2019 13:05:31 -0700 Subject: [PATCH] Rename profileSystemServer to shouldProfileSystemServer Makes it clearer and addresses previous CR comment. Bug: 139883463 Test: make Change-Id: I7c1a1d99cf307b89ee8f2c5c906168d196b35d0e --- core/java/com/android/internal/os/ZygoteInit.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 432c130f316cd..9ca90e0294047 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -460,7 +460,7 @@ public class ZygoteInit { ZygoteHooks.gcAndFinalize(); } - private static boolean profileSystemServer() { + private static boolean shouldProfileSystemServer() { boolean defaultValue = SystemProperties.getBoolean("dalvik.vm.profilesystemserver", /*default=*/ false); // Can't use DeviceConfig since it's not initialized at this point. @@ -492,7 +492,7 @@ public class ZygoteInit { } // Capturing profiles is only supported for debug or eng builds since selinux normally // prevents it. - if (profileSystemServer() && (Build.IS_USERDEBUG || Build.IS_ENG)) { + if (shouldProfileSystemServer() && (Build.IS_USERDEBUG || Build.IS_ENG)) { try { Log.d(TAG, "Preparing system server profile"); prepareSystemServerProfile(systemServerClasspath); @@ -765,8 +765,7 @@ public class ZygoteInit { Zygote.applyDebuggerSystemProperty(parsedArgs); Zygote.applyInvokeWithSystemProperty(parsedArgs); - if (profileSystemServer()) { - + if (shouldProfileSystemServer()) { parsedArgs.mRuntimeFlags |= Zygote.PROFILE_SYSTEM_SERVER; }