Fix one of the breakages of ConnectivityServiceTest in master.
Change-Id: I31c7a019383fa589beb1572486700e54edfb97e8
This commit is contained in:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user