diff options
author | David Brazdil <dbrazdil@google.com> | 2018-11-16 14:21:47 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-11-16 14:21:47 +0000 |
commit | 54c7da9c50ee85ade636605cd6ea18b4c2bc69fa (patch) | |
tree | 57e1a23dcc0beba8e98841b8cf063f6153b08c9b /runtime/hidden_api_test.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/hidden_api_test.cc')
-rw-r--r-- | runtime/hidden_api_test.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/runtime/hidden_api_test.cc b/runtime/hidden_api_test.cc index 627d9a7e1c..314d878c66 100644 --- a/runtime/hidden_api_test.cc +++ b/runtime/hidden_api_test.cc @@ -16,6 +16,7 @@ #include "hidden_api.h" +#include "base/sdk_version.h" #include "common_runtime_test.h" #include "jni/jni_internal.h" #include "proxy_test.h" @@ -112,14 +113,14 @@ TEST_F(HiddenApiTest, CheckGetActionFromRuntimeFlags) { ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::kBlacklist), false); runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); - runtime_->SetTargetSdkVersion(static_cast<int32_t>(hiddenapi::detail::SdkCodes::kVersionO_MR1)); + runtime_->SetTargetSdkVersion(static_cast<uint32_t>(SdkVersion::kO_MR1)); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::kWhitelist), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::kLightGreylist), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::kDarkGreylist), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::kBlacklist), true); runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); - runtime_->SetTargetSdkVersion(static_cast<int32_t>(hiddenapi::detail::SdkCodes::kVersionP)); + runtime_->SetTargetSdkVersion(static_cast<uint32_t>(SdkVersion::kP)); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::kWhitelist), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::kLightGreylist), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::kDarkGreylist), true); |