summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2012-09-23 10:59:35 -0700
committerJason Sams <jsams@google.com>2012-09-23 10:59:35 -0700
commited0b4f961f04ebf12cf900f4ce2d94e4473bf40b (patch)
tree0179400caaa80ddef1c650a9bfb92dd038364ea5 /tests
parentc4b16f1acb3b81c7bdee36b48de01cd5d7a96d5b (diff)
downloadframeworks_base-ed0b4f961f04ebf12cf900f4ce2d94e4473bf40b.zip
frameworks_base-ed0b4f961f04ebf12cf900f4ce2d94e4473bf40b.tar.gz
frameworks_base-ed0b4f961f04ebf12cf900f4ce2d94e4473bf40b.tar.bz2
Force destroy scripts in imageProcessing.
bug 7216044 Change-Id: I6292513c08e75269e79d2210de898ef28931c986
Diffstat (limited to 'tests')
-rw-r--r--tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java3
-rw-r--r--tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java4
2 files changed, 7 insertions, 0 deletions
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
index 5311399..c171a64 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/ImageProcessingActivity.java
@@ -133,6 +133,9 @@ public class ImageProcessingActivity extends Activity
void changeTest(int testID) {
+ if (mTest != null) {
+ mTest.destroy();
+ }
switch(testID) {
case 0:
mTest = new LevelsV4(false, false);
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java
index 3a6241d..6885181 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java
@@ -108,6 +108,10 @@ public class TestBase {
mRS.finish();
}
+ public void destroy() {
+ mRS.destroy();
+ }
+
public void updateBitmap(Bitmap b) {
mOutPixelsAllocation.copyTo(b);
}