Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b074578 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix RAVENWOOD_VERBOSE for liblog" into main

parents 94a09b33 4f9e4f06
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -165,6 +165,17 @@ public class RavenwoodRuntimeEnvironmentController {
        RavenwoodSystemProperties.initialize(RAVENWOOD_BUILD_PROP);
        setSystemProperties(null);

        // Do this after loading RAVENWOOD_NATIVE_RUNTIME_NAME (which backs Os.setenv()),
        // before loadFrameworkNativeCode() (which uses $ANDROID_LOG_TAGS).
        if (RAVENWOOD_VERBOSE_LOGGING) {
            RavenwoodCommonUtils.log(TAG, "Force enabling verbose logging");
            try {
                Os.setenv("ANDROID_LOG_TAGS", "*:v", true);
            } catch (ErrnoException e) {
                throw new RuntimeException(e);
            }
        }

        // Make sure libandroid_runtime is loaded.
        RavenwoodNativeLoader.loadFrameworkNativeCode();

@@ -175,15 +186,6 @@ public class RavenwoodRuntimeEnvironmentController {
        Objects.requireNonNull(Build.TYPE);
        Objects.requireNonNull(Build.VERSION.SDK);

        if (RAVENWOOD_VERBOSE_LOGGING) {
            RavenwoodCommonUtils.log(TAG, "Force enabling verbose logging");
            try {
                Os.setenv("ANDROID_LOG_TAGS", "*:v", true);
            } catch (ErrnoException e) {
                // Shouldn't happen.
            }
        }

        System.setProperty(RAVENWOOD_VERSION_JAVA_SYSPROP, "1");
        // This will let AndroidJUnit4 use the original runner.
        System.setProperty("android.junit.runner",