Cleaned up usages of deprecated APIs

Change-Id: I754293e52aa7c313d894f27cfecd083ae63d6445
This commit is contained in:
Nick Korostelev
2014-11-18 16:21:14 -08:00
parent ba36cea7aa
commit e7741e1328

View File

@@ -21,7 +21,7 @@ import android.net.Uri;
import android.database.Cursor;
import android.os.Bundle;
import android.os.HandlerThread;
import android.support.test.InjectContext;
import android.support.test.InstrumentationRegistry;
import org.junit.Assert;
import static junit.framework.Assert.assertEquals;
@@ -42,8 +42,6 @@ public class SmsTest {
public final static String BODY = "test sms";
private final static int SMS_POLL_TIME_MS = 10 * 1000;
private final static int SIXY_SECONDS_OF_LOOPS = 6;
@InjectContext
public Context mContext;
/**
* Verify that an SMS has been received with the correct number and body
@@ -63,7 +61,7 @@ public class SmsTest {
}
private Cursor getSmsCursor() throws java.lang.InterruptedException {
ContentResolver r = mContext.getContentResolver();
ContentResolver r = InstrumentationRegistry.getTargetContext().getContentResolver();
Uri message = Uri.parse("content://sms/");
Cursor c;