Skip to content
Snippets Groups Projects
Commit b0b4612d authored by Eric Rahm's avatar Eric Rahm Committed by Android Build Cherrypicker Worker
Browse files

Remove unused getRenderScript

`getRenderScript` is never actually used, now that `RenderScript` is
deprecated we can go ahead and remove it.

Bug: 266947193
Test: m SmartCamera
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:80c54ee85c4c8863ccf55b1d49b313499622ae04)
Merged-In: Id38295ebf0d240f34e162471c53ff266262b2f0e
Change-Id: Id38295ebf0d240f34e162471c53ff266262b2f0e
parent 8941e34d
No related branches found
No related tags found
No related merge requests found
......@@ -16,15 +16,12 @@
package androidx.media.filterfw;
import android.annotation.TargetApi;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.content.pm.ConfigurationInfo;
import android.os.Build;
import android.os.Handler;
import android.os.Looper;
import android.renderscript.RenderScript;
import android.util.Log;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
......@@ -116,9 +113,6 @@ public class MffContext {
/** Flag whether camera streaming is supported in this context. */
private boolean mCameraStreamingSupport;
/** RenderScript base master class. */
private RenderScript mRenderScript;
/**
* Creates a new MffContext with the default configuration.
*
......@@ -200,9 +194,7 @@ public class MffContext {
mCameraStreamer.stop();
mCameraStreamer.tearDown();
}
if (Build.VERSION.SDK_INT >= 11) {
maybeDestroyRenderScript();
}
stopRunners(false);
waitUntilStopped();
tearDown();
......@@ -301,14 +293,6 @@ public class MffContext {
return mCameraStreamingSupport;
}
@TargetApi(11)
public final RenderScript getRenderScript() {
if (mRenderScript == null) {
mRenderScript = RenderScript.create(mApplicationContext);
}
return mRenderScript;
}
final void assertOpenGLSupported() {
if (!isOpenGLSupported()) {
throw new RuntimeException("Attempting to use OpenGL ES 2 in a context that does not "
......@@ -459,12 +443,4 @@ public class MffContext {
return (context instanceof Activity) ? (Activity) context : null;
}
@TargetApi(11)
private void maybeDestroyRenderScript() {
if (mRenderScript != null) {
mRenderScript.destroy();
mRenderScript = null;
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment