Don't use hidden API

AndroidTestCase#getTestContext() is decorated with @hide. Instead, use
InstrumentationTestCase#getContext(). This gives us the same functionality
[i.e. the ability to load a test-only XML resource] without using a hidden
API.

Change-Id: I866234e227d975bac62c12e6a2e8efe90de0261c
This commit is contained in:
Todd Kennedy 2011-04-05 14:40:10 -07:00
parent e553c6ec0b
commit 3659fdf5af
1 changed files with 3 additions and 2 deletions

View File

@ -21,6 +21,7 @@ import com.android.email.activity.setup.AccountSettingsUtils.Provider;
import android.content.Context;
import android.test.AndroidTestCase;
import android.test.InstrumentationTestCase;
import android.test.suitebuilder.annotation.SmallTest;
/**
@ -30,14 +31,14 @@ import android.test.suitebuilder.annotation.SmallTest;
* runtest -c com.android.email.activity.setup.AccountSettingsUtilsTests email
*/
@SmallTest
public class AccountSettingsUtilsTests extends AndroidTestCase {
public class AccountSettingsUtilsTests extends InstrumentationTestCase {
private Context mTestContext;
@Override
protected void setUp() throws Exception {
super.setUp();
mTestContext = getTestContext();
mTestContext = getInstrumentation().getContext();
}
/**