Fix one of the breakages of ConnectivityServiceTest in master.
Change-Id: I31c7a019383fa589beb1572486700e54edfb97e8
This commit is contained in:
parent
3999ca3d84
commit
35e18d0049
1 changed files with 6 additions and 0 deletions
|
|
@ -591,6 +591,12 @@ public class ConnectivityServiceTest extends AndroidTestCase {
|
|||
public void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
// InstrumentationTestRunner prepares a looper, but AndroidJUnitRunner does not.
|
||||
// http://b/25897652 .
|
||||
if (Looper.myLooper() == null) {
|
||||
Looper.prepare();
|
||||
}
|
||||
|
||||
mServiceContext = new MockContext(getContext());
|
||||
mService = new WrappedConnectivityService(mServiceContext,
|
||||
mock(INetworkManagementService.class),
|
||||
|
|
|
|||
Loading…
Reference in a new issue