List of usage examples for android.test ActivityInstrumentationTestCase2 getActivity
@Override
public T getActivity()
From source file:sysnetlab.android.sdc.test.TestHelper.java
public static Activity launchSensorDataCollectorActivity(ActivityInstrumentationTestCase2<?> testCase) { Activity activity;//from w w w .ja v a 2s .c o m testCase.setActivityInitialTouchMode(true); activity = testCase.getActivity(); testCase.getInstrumentation().waitForIdleSync(); Assert.assertTrue("The activity must be a SensorDataCollectorActivity.", activity instanceof SensorDataCollectorActivity); return activity; }