commit | 338ad60f19c88b32e13c973b1be7c1a6dc003046 | [log] [tgz] |
---|---|---|
author | Philip P. Moltmann <moltmann@google.com> | Wed May 02 10:09:53 2018 -0700 |
committer | Philip P. Moltmann <moltmann@google.com> | Wed May 02 10:21:58 2018 -0700 |
tree | 057c04fc0d2b9d18333cd3c849a8fbbd3d2722cc | |
parent | a8266e2df1957adfa83283707bfdc821c591f5c3 [diff] |
Check for API 28, now that is defined. Test: atest CtsInlineMockingTestCases Fixes: 79147345 Change-Id: Ia556ac0efd55f30c993110cc0296d59e0cff9123 Merged-In: I4b87888458ff658d5b968d44d1a68af57c66cd68
diff --git a/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/JvmtiAgent.java b/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/JvmtiAgent.java index 5cd79d1..34c5c48 100644 --- a/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/JvmtiAgent.java +++ b/dexmaker-mockito-inline/src/main/java/com/android/dx/mockito/inline/JvmtiAgent.java
@@ -51,9 +51,8 @@ * @throws IOException If jvmti could not be enabled or agent could not be loaded */ JvmtiAgent() throws IOException { - // TODO (moltmann@google.com): Replace with proper check for >= P - if (!Build.VERSION.CODENAME.equals("P")) { - throw new IOException("Requires Android P. Build is " + Build.VERSION.CODENAME); + if (Build.VERSION.SDK_INT < 28) { + throw new IOException("Requires API 28. API is " + Build.VERSION.SDK_INT); } ClassLoader cl = JvmtiAgent.class.getClassLoader();