diff options
| author | 2018-11-16 14:21:47 +0000 | |
|---|---|---|
| committer | 2018-11-16 14:21:47 +0000 | |
| commit | 54c7da9c50ee85ade636605cd6ea18b4c2bc69fa (patch) | |
| tree | 57e1a23dcc0beba8e98841b8cf063f6153b08c9b /runtime/dex/dex_file_annotations.cc | |
| parent | d94653399e2f9f06bbdf629f2affbf9a4fa73b8f (diff) | |
| parent | 2bb2fbd2879d0a6d9ebf7acff817079dde89b417 (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/dex/dex_file_annotations.cc')
| -rw-r--r-- | runtime/dex/dex_file_annotations.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/runtime/dex/dex_file_annotations.cc b/runtime/dex/dex_file_annotations.cc index 15398672b2..6434828298 100644 --- a/runtime/dex/dex_file_annotations.cc +++ b/runtime/dex/dex_file_annotations.cc @@ -22,6 +22,7 @@ #include "art_field-inl.h" #include "art_method-inl.h" +#include "base/sdk_version.h" #include "class_linker-inl.h" #include "class_root.h" #include "dex/dex_file-inl.h" @@ -129,8 +130,7 @@ ObjPtr<mirror::Object> CreateAnnotationMember(const ClassData& klass, bool IsVisibilityCompatible(uint32_t actual, uint32_t expected) { if (expected == DexFile::kDexVisibilityRuntime) { - int32_t sdk_version = Runtime::Current()->GetTargetSdkVersion(); - if (sdk_version > 0 && sdk_version <= 23) { + if (IsSdkVersionSetAndAtMost(Runtime::Current()->GetTargetSdkVersion(), SdkVersion::kM)) { return actual == DexFile::kDexVisibilityRuntime || actual == DexFile::kDexVisibilityBuild; } } |