summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2012-10-12 14:30:23 -0700
committerJason Sams <jsams@google.com>2012-10-12 14:30:23 -0700
commit4b429417ba9fc0bf5e10f4dda1cf65f8eb473029 (patch)
tree75349dcaa011927a53b8ac8cce68205739f82a74 /tests
parent3add43ab0e26c9fd44d4dea683092807229eaa59 (diff)
downloadframeworks_base-4b429417ba9fc0bf5e10f4dda1cf65f8eb473029.zip
frameworks_base-4b429417ba9fc0bf5e10f4dda1cf65f8eb473029.tar.gz
frameworks_base-4b429417ba9fc0bf5e10f4dda1cf65f8eb473029.tar.bz2
Fix crash in ImageProcessing blend test
The blend test would use a stale context when running all tests. bug 7327728 Change-Id: I5802b9b382d8893419efe86d33fdfeeb27729e31
Diffstat (limited to 'tests')
-rw-r--r--tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Blend.java6
-rw-r--r--tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java1
2 files changed, 5 insertions, 2 deletions
diff --git a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Blend.java b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Blend.java
index 2920824..2303fc3 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Blend.java
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/Blend.java
@@ -52,8 +52,10 @@ public class Blend extends TestBase {
new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {
currentIntrinsic = pos;
- runTest();
- act.updateDisplay();
+ if (mRS != null) {
+ runTest();
+ act.updateDisplay();
+ }
}
public void onNothingSelected(AdapterView parent) {
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 8009daa..bb3f2f3 100644
--- a/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java
+++ b/tests/RenderScriptTests/ImageProcessing/src/com/android/rs/image/TestBase.java
@@ -123,6 +123,7 @@ public class TestBase {
public void destroy() {
mRS.destroy();
+ mRS = null;
}
public void updateBitmap(Bitmap b) {