summaryrefslogtreecommitdiff
path: root/runtime/entrypoints/entrypoint_utils.cc
diff options
context:
space:
mode:
authorDavid Brazdil <dbrazdil@google.com>2018-11-16 14:21:47 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-11-16 14:21:47 +0000
commit54c7da9c50ee85ade636605cd6ea18b4c2bc69fa (patch)
tree57e1a23dcc0beba8e98841b8cf063f6153b08c9b /runtime/entrypoints/entrypoint_utils.cc
parentd94653399e2f9f06bbdf629f2affbf9a4fa73b8f (diff)
parent2bb2fbd2879d0a6d9ebf7acff817079dde89b417 (diff)
Merge changes Idc6e518c,Ia1cc0506
* changes: Create SdkVersion enum, migrate users to it Runtime flags only for fast/slow hiddenapi path
Diffstat (limited to 'runtime/entrypoints/entrypoint_utils.cc')
-rw-r--r--runtime/entrypoints/entrypoint_utils.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/entrypoints/entrypoint_utils.cc b/runtime/entrypoints/entrypoint_utils.cc
index 12136bf476..19498f386c 100644
--- a/runtime/entrypoints/entrypoint_utils.cc
+++ b/runtime/entrypoints/entrypoint_utils.cc
@@ -20,6 +20,7 @@
#include "art_method-inl.h"
#include "base/enums.h"
#include "base/mutex.h"
+#include "base/sdk_version.h"
#include "class_linker-inl.h"
#include "dex/dex_file-inl.h"
#include "entrypoints/entrypoint_utils-inl.h"
@@ -64,9 +65,9 @@ JValue InvokeProxyInvocationHandler(ScopedObjectAccessAlreadyRunnable& soa, cons
soa.Self()->AssertThreadSuspensionIsAllowable();
jobjectArray args_jobj = nullptr;
const JValue zero;
- int32_t target_sdk_version = Runtime::Current()->GetTargetSdkVersion();
+ uint32_t target_sdk_version = Runtime::Current()->GetTargetSdkVersion();
// Do not create empty arrays unless needed to maintain Dalvik bug compatibility.
- if (args.size() > 0 || (target_sdk_version > 0 && target_sdk_version <= 21)) {
+ if (args.size() > 0 || IsSdkVersionSetAndAtMost(target_sdk_version, SdkVersion::kL)) {
args_jobj = soa.Env()->NewObjectArray(args.size(), WellKnownClasses::java_lang_Object, nullptr);
if (args_jobj == nullptr) {
CHECK(soa.Self()->IsExceptionPending());