Use TargetSdkLevel in CalculateVerificationInfo

We were using api_level=0 (meaning most recent api) for calculating
the verification information of a single method dynamically. This
might in the future lead to problems if we condition more of
verification on the API level. To prevent this future problem we will
instead use TargetSdkVersion as the API level.

Test: ./test.py --host

Change-Id: Ie87e0b1b6b07b43d2dc84101cb7764cc4087aca9
diff --git a/runtime/verifier/method_verifier.cc b/runtime/verifier/method_verifier.cc
index ff44828..0cdf010 100644
--- a/runtime/verifier/method_verifier.cc
+++ b/runtime/verifier/method_verifier.cc
@@ -5351,7 +5351,10 @@
                                       /* verify_to_dump= */ false,
                                       /* allow_thread_suspension= */ false,
                                       /* fill_register_lines= */ true,
-                                      /* api_level = */ 0));
+                                      // Just use the verifier at the current skd-version.
+                                      // This might affect what soft-verifier errors are reported.
+                                      // Callers can then filter out relevant errors if needed.
+                                      Runtime::Current()->GetTargetSdkVersion()));
   verifier->Verify();
   if (VLOG_IS_ON(verifier)) {
     verifier->DumpFailures(VLOG_STREAM(verifier));