diff options
author | Alan Stokes <alanstokes@google.com> | 2019-11-12 16:51:56 +0000 |
---|---|---|
committer | Alan Stokes <alanstokes@google.com> | 2019-11-13 11:33:14 +0000 |
commit | 75b1ff39a208a3fc44c7890deba657790b1b281c (patch) | |
tree | 4c57bdee883931d1ca4122cad72e6847d38f2323 /tests/DynamicCodeLoggerIntegrationTests | |
parent | b6dab8f8a556045442b4a6e16a1dae2ff269179d (diff) |
Minor test improvements.
Don't use deprecated InstrumentationRegistry.
Fix 'class can be static' warning.
Test: atest DynamicCodeLoggerIntegrationTests
Change-Id: I2c6c6666f9c5df1e013bd233a0f1ac16cf149728
Diffstat (limited to 'tests/DynamicCodeLoggerIntegrationTests')
-rw-r--r-- | tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java b/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java index db2f659c655b..883c172e4990 100644 --- a/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java +++ b/tests/DynamicCodeLoggerIntegrationTests/src/com/android/server/pm/dex/DynamicCodeLoggerIntegrationTests.java @@ -27,8 +27,8 @@ import android.os.SystemClock; import android.util.EventLog; import android.util.EventLog.Event; -import androidx.test.InstrumentationRegistry; import androidx.test.filters.LargeTest; +import androidx.test.platform.app.InstrumentationRegistry; import dalvik.system.DexClassLoader; @@ -91,7 +91,7 @@ public final class DynamicCodeLoggerIntegrationTests { @BeforeClass public static void setUpAll() { - sContext = InstrumentationRegistry.getTargetContext(); + sContext = InstrumentationRegistry.getInstrumentation().getTargetContext(); sMyUid = android.os.Process.myUid(); } @@ -331,7 +331,7 @@ public final class DynamicCodeLoggerIntegrationTests { // Abstract out the logic for running a native code loading test multiple times if needed and // leaving time for audit messages to reach the log. - private abstract class TestNativeCodeWithRetries { + private abstract static class TestNativeCodeWithRetries { String mExpectedContentHash; String mExpectedNameHash; |