Apply temporary workaround for callers of hidden Runtime API.
This change **WILL** be reverted after the android N release.
bug: 26217329
Change-Id: Ibfea944752dc69b10cf7d7b052189b09bbe4ab21
diff --git a/ojluni/src/main/java/java/lang/Runtime.java b/ojluni/src/main/java/java/lang/Runtime.java
index 47a9adc..8ed2ad0 100755
--- a/ojluni/src/main/java/java/lang/Runtime.java
+++ b/ojluni/src/main/java/java/lang/Runtime.java
@@ -926,6 +926,20 @@
loadLibrary0(VMStack.getCallingClassLoader(), libname);
}
+ /**
+ * Temporarily preserved for backward compatibility. Applications call this
+ * method using reflection.
+ *
+ * **** THIS METHOD WILL BE REMOVED IN A FUTURE ANDROID VERSION ****
+ *
+ * http://b/26217329
+ *
+ * @hide
+ */
+ public void loadLibrary(String libname, ClassLoader classLoader) {
+ loadLibrary0(classLoader, libname);
+ }
+
synchronized void loadLibrary0(ClassLoader loader, String libname) {
if (libname.indexOf((int)File.separatorChar) != -1) {
throw new UnsatisfiedLinkError(