diff --git a/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/MffContext.java b/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/MffContext.java index 6bd6c18f1c0a46b19b6bca73825064c867805b0d..8fd44d2df975c33751b5b196d115b53c3a7d2efc 100644 --- a/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/MffContext.java +++ b/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/MffContext.java @@ -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; - } - } - }