Merge "Correct registerNativeAllocation type" am: fe015a098c
am: 90e8135f1e
Change-Id: Ie379dc6782f77e051d7d3eb56ad8661bb3c33ee7
This commit is contained in:
@@ -16,12 +16,6 @@
|
|||||||
|
|
||||||
package android.renderscript;
|
package android.renderscript;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
|
||||||
|
|
||||||
import android.annotation.UnsupportedAppUsage;
|
import android.annotation.UnsupportedAppUsage;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.res.AssetManager;
|
import android.content.res.AssetManager;
|
||||||
@@ -32,6 +26,12 @@ import android.os.Trace;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.Surface;
|
import android.view.Surface;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.nio.ByteBuffer;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||||
|
|
||||||
// TODO: Clean up the whitespace that separates methods in this class.
|
// TODO: Clean up the whitespace that separates methods in this class.
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -114,8 +114,9 @@ public class RenderScript {
|
|||||||
Class<?> vm_runtime = Class.forName("dalvik.system.VMRuntime");
|
Class<?> vm_runtime = Class.forName("dalvik.system.VMRuntime");
|
||||||
Method get_runtime = vm_runtime.getDeclaredMethod("getRuntime");
|
Method get_runtime = vm_runtime.getDeclaredMethod("getRuntime");
|
||||||
sRuntime = get_runtime.invoke(null);
|
sRuntime = get_runtime.invoke(null);
|
||||||
registerNativeAllocation = vm_runtime.getDeclaredMethod("registerNativeAllocation", Integer.TYPE);
|
registerNativeAllocation =
|
||||||
registerNativeFree = vm_runtime.getDeclaredMethod("registerNativeFree", Integer.TYPE);
|
vm_runtime.getDeclaredMethod("registerNativeAllocation", Long.TYPE);
|
||||||
|
registerNativeFree = vm_runtime.getDeclaredMethod("registerNativeFree", Long.TYPE);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
Log.e(LOG_TAG, "Error loading GC methods: " + e);
|
Log.e(LOG_TAG, "Error loading GC methods: " + e);
|
||||||
throw new RSRuntimeException("Error loading GC methods: " + e);
|
throw new RSRuntimeException("Error loading GC methods: " + e);
|
||||||
|
|||||||
Reference in New Issue
Block a user