Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1804e258 authored by Mathew Inwood's avatar Mathew Inwood
Browse files

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
parent e9293c1a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -263,6 +263,7 @@ public abstract class ServiceTestCase<T extends Service> extends AndroidTestCase
        }
        if (mServiceCreated) {
            mService.onDestroy();
            mServiceCreated = false;
        }
    }