summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorNick Korostelev <nkorsote@google.com>2014-11-18 16:21:14 -0800
committerNick Korostelev <nkorsote@google.com>2014-11-18 16:21:14 -0800
commite7741e1328c3e4df86ecf544ba608fd33bae97be (patch)
tree4e37e0a91ffd6d5237612a68c704f999d10ae695 /tools
parentba36cea7aa2566c2ba197aca9cd53d6377611356 (diff)
downloadandroid_development-e7741e1328c3e4df86ecf544ba608fd33bae97be.tar.gz
android_development-e7741e1328c3e4df86ecf544ba608fd33bae97be.tar.bz2
android_development-e7741e1328c3e4df86ecf544ba608fd33bae97be.zip
Cleaned up usages of deprecated APIs
Change-Id: I754293e52aa7c313d894f27cfecd083ae63d6445
Diffstat (limited to 'tools')
-rw-r--r--tools/emulator/test-apps/SmokeTests/src/com/android/emulator/smoketests/sms/SmsTest.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/tools/emulator/test-apps/SmokeTests/src/com/android/emulator/smoketests/sms/SmsTest.java b/tools/emulator/test-apps/SmokeTests/src/com/android/emulator/smoketests/sms/SmsTest.java
index 2e18cc4bc..6b99ea547 100644
--- a/tools/emulator/test-apps/SmokeTests/src/com/android/emulator/smoketests/sms/SmsTest.java
+++ b/tools/emulator/test-apps/SmokeTests/src/com/android/emulator/smoketests/sms/SmsTest.java
@@ -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;