diff options
author | Evan Millar <emillar@google.com> | 2010-06-01 13:55:50 -0700 |
---|---|---|
committer | Evan Millar <emillar@google.com> | 2010-06-01 13:55:50 -0700 |
commit | 71be4b5ed994030171fb3bd3f08fbc8c43c47567 (patch) | |
tree | bd8e9a421ab626adc21f61db0bcc4175cae65f67 /test-runner/src | |
parent | 0e42b29eb0b279ad64c55890efd3fb533493224e (diff) | |
download | frameworks_base-71be4b5ed994030171fb3bd3f08fbc8c43c47567.zip frameworks_base-71be4b5ed994030171fb3bd3f08fbc8c43c47567.tar.gz frameworks_base-71be4b5ed994030171fb3bd3f08fbc8c43c47567.tar.bz2 |
Bring ServiceTestCase in line with current Service APIs and remove unnecessary asserts.
-Updated onStart() call to onStartCommand()
-Removed asserts that disallowed starting an already bound service and vice versa, since
that is a valid Service usage pattern.
Change-Id: I79804aef5319a590c74fca54fc990954f7c3fdaa
Diffstat (limited to 'test-runner/src')
-rw-r--r-- | test-runner/src/android/test/ServiceTestCase.java | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/test-runner/src/android/test/ServiceTestCase.java b/test-runner/src/android/test/ServiceTestCase.java index fcb9d55..d9262f6 100644 --- a/test-runner/src/android/test/ServiceTestCase.java +++ b/test-runner/src/android/test/ServiceTestCase.java @@ -147,9 +147,6 @@ public abstract class ServiceTestCase<T extends Service> extends AndroidTestCase * @param intent The Intent as if supplied to {@link android.content.Context#startService}. */ protected void startService(Intent intent) { - assertFalse(mServiceStarted); - assertFalse(mServiceBound); - if (!mServiceAttached) { setupService(); } @@ -159,7 +156,7 @@ public abstract class ServiceTestCase<T extends Service> extends AndroidTestCase mService.onCreate(); mServiceCreated = true; } - mService.onStart(intent, mServiceId); + mService.onStartCommand(intent, 0, mServiceId); mServiceStarted = true; } @@ -183,9 +180,6 @@ public abstract class ServiceTestCase<T extends Service> extends AndroidTestCase * @return Return an IBinder for making further calls into the Service. */ protected IBinder bindService(Intent intent) { - assertFalse(mServiceStarted); - assertFalse(mServiceBound); - if (!mServiceAttached) { setupService(); } |