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

Commit 7440b1ee authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Start loading libandroid_runtime.so" into main

parents 3b0ac192 50276f07
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -197,6 +197,9 @@ android_ravenwood_libgroup {
        "mockito-ravenwood-prebuilt",
        "inline-mockito-ravenwood-prebuilt",
    ],
    jni_libs: [
        "libandroid_runtime",
    ],
}

android_ravenwood_libgroup {
+5 −2
Original line number Diff line number Diff line
@@ -72,8 +72,11 @@ import java.net.UnknownHostException;
 * a positive value may be considered as a successful invocation.
 */
@android.ravenwood.annotation.RavenwoodKeepWholeClass
@android.ravenwood.annotation.RavenwoodNativeSubstitutionClass(
        "com.android.platform.test.ravenwood.nativesubstitution.Log_host")
@android.ravenwood.annotation.RavenwoodClassLoadHook(
        "com.android.platform.test.ravenwood.runtimehelper.ClassLoadHook.onClassLoaded")
// Uncomment the following annotation to switch to the Java substitution version.
//@android.ravenwood.annotation.RavenwoodNativeSubstitutionClass(
//        "com.android.platform.test.ravenwood.nativesubstitution.Log_host")
public final class Log {
    /** @hide */
    @IntDef({ASSERT, ERROR, WARN, INFO, DEBUG, VERBOSE})
+1 −0
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ java_library {
    ],
    libs: [
        "framework-minus-apex.ravenwood",
        "ravenwood-junit",
    ],
    visibility: ["//visibility:private"],
}
+6 −2
Original line number Diff line number Diff line
@@ -73,9 +73,9 @@ public class RavenwoodUtils {
                    return;
                }
            }
            throw new UnsatisfiedLinkError("Library " + libname + " no found in "
            throw new UnsatisfiedLinkError("Library " + libname + " not found in "
                    + "java.library.path: " + path);
        } catch (Exception e) {
        } catch (Throwable e) {
            dumpFiles(System.out);
            throw e;
        }
@@ -96,6 +96,10 @@ public class RavenwoodUtils {
                    listFiles(out, gparent, "");
                }
            }

            var gparent = new File("../..").getCanonicalFile();
            out.println("# ../..=" + gparent);
            listFiles(out, gparent, "");
        } catch (Throwable th) {
            out.println("Error: " + th.toString());
            th.printStackTrace(out);
+7 −0
Original line number Diff line number Diff line
@@ -22,6 +22,13 @@ import com.android.internal.os.RuntimeInit;

import java.io.PrintStream;

/**
 * Ravenwood "native substitution" class for {@link android.util.Log}.
 *
 * {@link android.util.Log} already uses the actual native code and doesn't use this class.
 * In order to switch to this Java implementation, uncomment the @RavenwoodNativeSubstitutionClass
 * annotation on {@link android.util.Log}.
 */
public class Log_host {

    public static boolean isLoggable(String tag, @Level int level) {
Loading