summaryrefslogtreecommitdiff
path: root/ravenwood/junit-src
diff options
context:
space:
mode:
Diffstat (limited to 'ravenwood/junit-src')
-rw-r--r--ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodAwareTestRunnerBase.java2
-rw-r--r--ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java8
2 files changed, 5 insertions, 5 deletions
diff --git a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodAwareTestRunnerBase.java b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodAwareTestRunnerBase.java
index 7c72f6bd8619..31a14164bd51 100644
--- a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodAwareTestRunnerBase.java
+++ b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodAwareTestRunnerBase.java
@@ -74,7 +74,7 @@ abstract class RavenwoodAwareTestRunnerBase extends Runner implements Filterable
}
@Override
- public Description getDescription() {
+ public final Description getDescription() {
return getRealRunner().getDescription();
}
diff --git a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
index 773dba1b4620..3d6ac0f37050 100644
--- a/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
+++ b/ravenwood/junit-src/android/platform/test/ravenwood/RavenwoodRule.java
@@ -24,6 +24,8 @@ import android.app.Instrumentation;
import android.content.Context;
import android.platform.test.annotations.DisabledOnRavenwood;
+import androidx.test.platform.app.InstrumentationRegistry;
+
import com.android.ravenwood.common.RavenwoodCommonUtils;
import org.junit.rules.TestRule;
@@ -219,8 +221,7 @@ public final class RavenwoodRule implements TestRule {
*/
@Deprecated
public Context getContext() {
- return Objects.requireNonNull(mConfiguration.mInstContext,
- "Context is only available during @Test execution");
+ return InstrumentationRegistry.getInstrumentation().getContext();
}
/**
@@ -230,8 +231,7 @@ public final class RavenwoodRule implements TestRule {
*/
@Deprecated
public Instrumentation getInstrumentation() {
- return Objects.requireNonNull(mConfiguration.mInstrumentation,
- "Instrumentation is only available during @Test execution");
+ return InstrumentationRegistry.getInstrumentation();
}
@Override