summaryrefslogtreecommitdiff
path: root/ravenwood/junit-impl-src/android
diff options
context:
space:
mode:
author Makoto Onuki <omakoto@google.com> 2024-11-25 22:08:50 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2024-11-25 22:08:50 +0000
commite2f6a591c765e67d19a7b8cbe4b410638938e57a (patch)
tree9955338808b3f40b3f6a9406af5512046c58a540 /ravenwood/junit-impl-src/android
parent6cf18f06f2ae89d807fbec1d36a8530f14d20fd2 (diff)
parenta07975e72e50d17b8231cdab05e7cab104180da2 (diff)
Merge "Make the log format more realistic" into main
Diffstat (limited to 'ravenwood/junit-impl-src/android')
-rw-r--r--ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
index e730a292a9da..b3987f4987df 100644
--- a/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
+++ b/ravenwood/junit-impl-src/android/platform/test/ravenwood/RavenwoodRuntimeEnvironmentController.java
@@ -58,6 +58,7 @@ import android.provider.DeviceConfig_host;
import android.system.ErrnoException;
import android.system.Os;
import android.util.Log;
+import android.util.Log_ravenwood;
import android.view.DisplayAdjustments;
import androidx.test.platform.app.InstrumentationRegistry;
@@ -217,6 +218,9 @@ public class RavenwoodRuntimeEnvironmentController {
// Some process-wide initialization. (maybe redirect stdout/stderr)
RavenwoodCommonUtils.loadJniLibrary(LIBRAVENWOOD_INITIALIZER_NAME);
+ // Redirect stdout/stdin to the Log API.
+ RuntimeInit.redirectLogStreams();
+
dumpCommandLineArgs();
// We haven't initialized liblog yet, so directly write to System.out here.
@@ -230,6 +234,8 @@ public class RavenwoodRuntimeEnvironmentController {
// Make sure libravenwood_runtime is loaded.
System.load(RavenwoodCommonUtils.getJniLibraryPath(RAVENWOOD_NATIVE_RUNTIME_NAME));
+ Log_ravenwood.onRavenwoodRuntimeNativeReady();
+
// Do the basic set up for the android sysprops.
RavenwoodSystemProperties.initialize();
@@ -247,9 +253,6 @@ public class RavenwoodRuntimeEnvironmentController {
// Make sure libandroid_runtime is loaded.
RavenwoodNativeLoader.loadFrameworkNativeCode();
- // Redirect stdout/stdin to liblog.
- RuntimeInit.redirectLogStreams();
-
// Touch some references early to ensure they're <clinit>'ed
Objects.requireNonNull(Build.TYPE);
Objects.requireNonNull(Build.VERSION.SDK);