summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Ni <yangni@google.com>2016-01-15 21:13:15 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-01-15 21:13:15 +0000
commit5ab545784d96d5fa2c6fb9304dda04c2593778ce (patch)
tree48fadcbba58b364b1a6a39f5b60e719d8811dfb4
parent2e2e7fb23ae9be56e2c8d17eac3295e99fe61adf (diff)
parent405f6d6e7c2f21aca8f4dfe7bbe42a8767690aac (diff)
downloadandroid_frameworks_support-5ab545784d96d5fa2c6fb9304dda04c2593778ce.tar.gz
android_frameworks_support-5ab545784d96d5fa2c6fb9304dda04c2593778ce.tar.bz2
android_frameworks_support-5ab545784d96d5fa2c6fb9304dda04c2593778ce.zip
Avoid absolute path loading .so after M
am: 405f6d6e7c * commit '405f6d6e7c2f21aca8f4dfe7bbe42a8767690aac': Avoid absolute path loading .so after M
-rw-r--r--v8/renderscript/Android.mk2
-rw-r--r--v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java17
2 files changed, 11 insertions, 8 deletions
diff --git a/v8/renderscript/Android.mk b/v8/renderscript/Android.mk
index 520c8a1893..d695f72ba6 100644
--- a/v8/renderscript/Android.mk
+++ b/v8/renderscript/Android.mk
@@ -24,7 +24,7 @@ include $(CLEAR_VARS)
LOCAL_CFLAGS += -std=c++11
LOCAL_MODULE := android-support-v8-renderscript
-LOCAL_SDK_VERSION := 22
+LOCAL_SDK_VERSION := 23
LOCAL_SRC_FILES := $(call all-java-files-under, java/src)
LOCAL_JAVA_LIBRARIES := android-support-annotations
diff --git a/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java b/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java
index 34e9dd886e..9c5e150744 100644
--- a/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java
+++ b/v8/renderscript/java/src/android/support/v8/renderscript/RenderScript.java
@@ -1343,9 +1343,10 @@ public class RenderScript {
sUseGCHooks = false;
}
try {
- // For API 9+, always use the absolute path of librsjni.so
- // Bug: 25226912
- if (rs.mNativeLibDir != null) {
+ // For API 9 - 22, always use the absolute path of librsjni.so
+ // http://b/25226912
+ if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.M &&
+ rs.mNativeLibDir != null) {
System.load(rs.mNativeLibDir + "/librsjni.so");
} else {
System.loadLibrary("rsjni");
@@ -1376,9 +1377,10 @@ public class RenderScript {
}
String rssupportPath = null;
- // For API 9+, always use the absolute path of libRSSupport.so
- // Bug: 25226912
- if (rs.mNativeLibDir != null) {
+ // For API 9 - 22, always use the absolute path of libRSSupport.so
+ // http://b/25226912
+ if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.M &&
+ rs.mNativeLibDir != null) {
rssupportPath = rs.mNativeLibDir + "/libRSSupport.so";
}
if (!rs.nLoadSO(useNative, dispatchAPI, rssupportPath)) {
@@ -1387,7 +1389,8 @@ public class RenderScript {
useNative = false;
}
try {
- if (rs.mNativeLibDir != null) {
+ if (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.M &&
+ rs.mNativeLibDir != null) {
System.load(rssupportPath);
} else {
System.loadLibrary("RSSupport");