diff options
author | 2022-05-03 20:41:53 +0000 | |
---|---|---|
committer | 2022-05-03 20:41:53 +0000 | |
commit | ec1a8509b5e086ad038867b9aa4ce27673be81e9 (patch) | |
tree | 65d798d68105e7044d198d3737db4204387c4d32 /runtime/hidden_api_test.cc | |
parent | da34af5bdd9718d8ecc543b33c65f625b3d339ad (diff) |
Revert "Add support for max-target-s"
Revert "Add support to max-target-s to generate_hiddenapi_lists"
Revert submission 1931011-max-target-s
Reason for revert: Seems to cause build breakage
Reverted Changes:
I2b513f93a:Add support to max-target-s to generate_hiddenapi_...
Ifdd7b7a71:Add support for max-target-s
I06d05840e:Add support for max-target-s
Change-Id: I9769d2a4e2caef1d50a1ea71e7d9dace2c42071e
Diffstat (limited to 'runtime/hidden_api_test.cc')
-rw-r--r-- | runtime/hidden_api_test.cc | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/runtime/hidden_api_test.cc b/runtime/hidden_api_test.cc index e204c57b28..f5cd15ef4f 100644 --- a/runtime/hidden_api_test.cc +++ b/runtime/hidden_api_test.cc @@ -235,7 +235,6 @@ TEST_F(HiddenApiTest, CheckGetActionFromRuntimeFlags) { runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kJustWarn); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); @@ -249,7 +248,6 @@ TEST_F(HiddenApiTest, CheckGetActionFromRuntimeFlags) { SetChangeIdState(kHideMaxtargetsdkQHiddenApis, false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); @@ -263,7 +261,6 @@ TEST_F(HiddenApiTest, CheckGetActionFromRuntimeFlags) { SetChangeIdState(kHideMaxtargetsdkQHiddenApis, false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); @@ -272,8 +269,6 @@ TEST_F(HiddenApiTest, CheckGetActionFromRuntimeFlags) { SetChangeIdState(kHideMaxtargetsdkQHiddenApis, true); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); @@ -286,7 +281,6 @@ TEST_F(HiddenApiTest, CheckGetActionFromRuntimeFlags) { SetChangeIdState(kHideMaxtargetsdkQHiddenApis, false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); @@ -300,7 +294,6 @@ TEST_F(HiddenApiTest, CheckGetActionFromRuntimeFlags) { SetChangeIdState(kHideMaxtargetsdkQHiddenApis, true); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); @@ -314,19 +307,6 @@ TEST_F(HiddenApiTest, CheckGetActionFromRuntimeFlags) { SetChangeIdState(kHideMaxtargetsdkQHiddenApis, true); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), true); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); - - runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); - runtime_->SetTargetSdkVersion( - static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetS().GetMaxAllowedSdkVersion()) + 1); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); - ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), true); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), true); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); |