Lines Matching refs:hiddenapi

34 using hiddenapi::detail::MemberSignature;
35 using hiddenapi::detail::ShouldDenyAccessToMemberImpl;
104 hiddenapi::Domain expected_domain, in CheckAllDexFilesInDomain()
108 hiddenapi::AccessContext context(loader, dex_file.get()); in CheckAllDexFilesInDomain()
184 bool ShouldDenyAccess(hiddenapi::ApiList list) REQUIRES_SHARED(Locks::mutator_lock_) { in ShouldDenyAccess()
190 /* access_method= */ hiddenapi::AccessMethod::kNone); in ShouldDenyAccess()
193 void TestLocation(const std::string& location, hiddenapi::Domain expected_domain) { in TestLocation()
234 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kJustWarn); in TEST_F()
235 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
236 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
237 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
238 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
239 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
240 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
241 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), false); in TEST_F()
243 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
245 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion())); in TEST_F()
248 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
249 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
250 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
251 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
252 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
253 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
254 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
256 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
258 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
261 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
262 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
263 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
264 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
265 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
266 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
267 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
269 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
270 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
271 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
272 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
273 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
274 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
276 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
278 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetP().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
281 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
282 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
283 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
284 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
285 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
286 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
287 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
289 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
291 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetQ().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
294 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
295 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
296 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
297 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
298 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
299 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
300 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
302 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
304 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetR().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
307 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
308 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
309 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), true); in TEST_F()
310 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
311 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
312 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
313 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
319 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
321 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetR().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
324 runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
327 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false); in TEST_F()
329 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false); in TEST_F()
331 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), true); in TEST_F()
333 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
335 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
337 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
339 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), true); in TEST_F()
342 runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kDisabled); in TEST_F()
345 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false); in TEST_F()
347 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false); in TEST_F()
349 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
351 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
353 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
355 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
357 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), false); in TEST_F()
360 runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
363 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false); in TEST_F()
365 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false); in TEST_F()
367 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
369 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
371 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
373 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
375 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), false); in TEST_F()
622 TestLocation(data_location_path, hiddenapi::Domain::kApplication); in TEST_F()
629 TestLocation(system_location_path, hiddenapi::Domain::kApplication); in TEST_F()
637 TestLocation(system_ext_location_path, hiddenapi::Domain::kApplication); in TEST_F()
646 TestLocation(system_ext_location_path, hiddenapi::Domain::kApplication); in TEST_F()
654 TestLocation(system_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
662 TestLocation(system_ext_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
673 TestLocation(system_ext_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
680 TestLocation(data_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
688 TestLocation(system_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
696 TestLocation(system_ext_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
706 TestLocation(system_ext_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
715 TestLocation(system_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
725 TestLocation(system_ext_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
736 TestLocation(system_ext_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()