Loading Ravenwood.bp +3 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,9 @@ android_ravenwood_libgroup { "mockito-ravenwood-prebuilt", "inline-mockito-ravenwood-prebuilt", ], jni_libs: [ "libandroid_runtime", ], } android_ravenwood_libgroup { Loading core/java/android/util/Log.java +5 −2 Original line number Diff line number Diff line Loading @@ -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}) Loading ravenwood/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ java_library { ], libs: [ "framework-minus-apex.ravenwood", "ravenwood-junit", ], visibility: ["//visibility:private"], } Loading ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodUtils.java +6 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -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); Loading ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/nativesubstitution/Log_host.java +7 −0 Original line number Diff line number Diff line Loading @@ -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 Loading
Ravenwood.bp +3 −0 Original line number Diff line number Diff line Loading @@ -197,6 +197,9 @@ android_ravenwood_libgroup { "mockito-ravenwood-prebuilt", "inline-mockito-ravenwood-prebuilt", ], jni_libs: [ "libandroid_runtime", ], } android_ravenwood_libgroup { Loading
core/java/android/util/Log.java +5 −2 Original line number Diff line number Diff line Loading @@ -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}) Loading
ravenwood/Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,7 @@ java_library { ], libs: [ "framework-minus-apex.ravenwood", "ravenwood-junit", ], visibility: ["//visibility:private"], } Loading
ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodUtils.java +6 −2 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -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); Loading
ravenwood/runtime-helper-src/framework/com/android/platform/test/ravenwood/nativesubstitution/Log_host.java +7 −0 Original line number Diff line number Diff line Loading @@ -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