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();