summaryrefslogtreecommitdiffstats
path: root/test-runner/src/android/test
diff options
context:
space:
mode:
authorMathew Inwood <mathewi@google.com>2013-10-22 17:39:37 +0100
committerMathew Inwood <mathewi@google.com>2013-10-22 17:39:37 +0100
commit1804e258fa8f8eb3d5d04e6e773c2f7cb026d9e0 (patch)
tree61f5f56c7a0506ea32280102defaf13c8fe9959e /test-runner/src/android/test
parente9293c1a1f9ac72b1ff1c47d41465eee39d44c1b (diff)
downloadframeworks_base-1804e258fa8f8eb3d5d04e6e773c2f7cb026d9e0.zip
frameworks_base-1804e258fa8f8eb3d5d04e6e773c2f7cb026d9e0.tar.gz
frameworks_base-1804e258fa8f8eb3d5d04e6e773c2f7cb026d9e0.tar.bz2
Set mServiceCreated to false when onDestroy().
If tests call shutdownService() themselves, we should not call onDestroy() again from tearDown(). Set mServiceCreated to false when we call onDestroy to prevent this. Change-Id: I618cb770cb43072273abdd2fdffd3390911203a1
Diffstat (limited to 'test-runner/src/android/test')
-rw-r--r--test-runner/src/android/test/ServiceTestCase.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/test-runner/src/android/test/ServiceTestCase.java b/test-runner/src/android/test/ServiceTestCase.java
index d8ced38..ad90fc6 100644
--- a/test-runner/src/android/test/ServiceTestCase.java
+++ b/test-runner/src/android/test/ServiceTestCase.java
@@ -263,6 +263,7 @@ public abstract class ServiceTestCase<T extends Service> extends AndroidTestCase
}
if (mServiceCreated) {
mService.onDestroy();
+ mServiceCreated = false;
}
}