Lines Matching refs:hiddenapi
34 using hiddenapi::detail::MemberSignature;
35 using hiddenapi::detail::ShouldDenyAccessToMemberImpl;
110 hiddenapi::Domain expected_domain, in CheckAllDexFilesInDomain()
114 hiddenapi::AccessContext context(loader, dex_file.get()); in CheckAllDexFilesInDomain()
190 bool ShouldDenyAccess(hiddenapi::ApiList list) REQUIRES_SHARED(Locks::mutator_lock_) { in ShouldDenyAccess()
196 /* access_method= */ hiddenapi::AccessMethod::kNone); in ShouldDenyAccess()
199 void TestLocation(const std::string& location, hiddenapi::Domain expected_domain) { in TestLocation()
270 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kJustWarn); in TEST_F()
271 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
272 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
273 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
274 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
275 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
276 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
277 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
278 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), false); in TEST_F()
280 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
282 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion())); in TEST_F()
285 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
286 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
287 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
288 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
289 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
290 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
291 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
292 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
294 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
296 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
299 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
300 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
301 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
302 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
303 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
304 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
305 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
306 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
308 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
309 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
310 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
311 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
312 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
313 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
314 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
315 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
317 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
319 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetP().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
322 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
323 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
324 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
325 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
326 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
327 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
328 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
329 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
331 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
333 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetQ().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
336 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
337 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
338 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
339 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
340 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
341 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
342 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
343 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
345 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
347 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetR().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
350 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
351 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
352 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
353 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), true); in TEST_F()
354 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
355 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
356 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
357 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
359 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
361 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetS().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
362 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
363 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
364 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), true); in TEST_F()
365 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), true); in TEST_F()
366 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
367 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
368 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
369 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
375 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
377 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetR().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
380 runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
383 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false); in TEST_F()
385 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false); in TEST_F()
387 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), true); in TEST_F()
389 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
391 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
393 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
395 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), true); in TEST_F()
398 runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kDisabled); in TEST_F()
401 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false); in TEST_F()
403 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false); in TEST_F()
405 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
407 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
409 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
411 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
413 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), false); in TEST_F()
416 runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
419 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false); in TEST_F()
421 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false); in TEST_F()
423 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
425 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
427 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
429 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
431 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), false); in TEST_F()
678 TestLocation(data_location_path, hiddenapi::Domain::kApplication); in TEST_F()
685 TestLocation(system_location_path, hiddenapi::Domain::kApplication); in TEST_F()
693 TestLocation(system_ext_location_path, hiddenapi::Domain::kApplication); in TEST_F()
702 TestLocation(system_ext_location_path, hiddenapi::Domain::kApplication); in TEST_F()
710 TestLocation(system_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
718 TestLocation(system_ext_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
729 TestLocation(system_ext_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
736 TestLocation(data_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
744 TestLocation(system_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
752 TestLocation(system_ext_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
762 TestLocation(system_ext_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
771 TestLocation(system_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
781 TestLocation(system_ext_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
792 TestLocation(system_ext_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()