• Home
  • Raw
  • Download

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::MaxTargetS()), false); in TEST_F()
238 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
239 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
240 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
241 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
242 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), false); in TEST_F()
244 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
246 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion())); in TEST_F()
249 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
250 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
251 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
252 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
253 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
254 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
255 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
256 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
258 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
260 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetO().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
263 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
264 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
265 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
266 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
267 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
268 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
269 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
270 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
272 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
273 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
274 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
275 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
276 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
277 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
278 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
279 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
281 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
283 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetP().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
286 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
287 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
288 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
289 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
290 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
291 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
292 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
293 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
295 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
297 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetQ().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
300 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
301 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
302 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
303 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
304 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
305 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
306 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
307 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
309 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
311 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetR().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
314 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
315 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
316 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), false); in TEST_F()
317 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), true); in TEST_F()
318 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
319 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
320 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
321 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
323 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
325 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetS().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
326 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Sdk()), false); in TEST_F()
327 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Unsupported()), false); in TEST_F()
328 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetS()), true); in TEST_F()
329 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetR()), true); in TEST_F()
330 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
331 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
332 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
333 ASSERT_EQ(ShouldDenyAccess(hiddenapi::ApiList::Blocked()), true); in TEST_F()
339 runtime_->SetHiddenApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
341 static_cast<uint32_t>(hiddenapi::ApiList::MaxTargetR().GetMaxAllowedSdkVersion()) + 1); in TEST_F()
344 runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kEnabled); in TEST_F()
347 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false); in TEST_F()
349 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false); in TEST_F()
351 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), true); in TEST_F()
353 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), true); in TEST_F()
355 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), true); in TEST_F()
357 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), true); in TEST_F()
359 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), true); in TEST_F()
362 runtime_->SetTestApiEnforcementPolicy(hiddenapi::EnforcementPolicy::kDisabled); in TEST_F()
365 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Sdk()), false); in TEST_F()
367 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Unsupported()), false); in TEST_F()
369 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetR()), false); in TEST_F()
371 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
373 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
375 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
377 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), false); 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()), false); in TEST_F()
389 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetQ()), false); in TEST_F()
391 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetP()), false); in TEST_F()
393 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::MaxTargetO()), false); in TEST_F()
395 ShouldDenyAccess(hiddenapi::ApiList::TestApi() | hiddenapi::ApiList::Blocked()), false); in TEST_F()
642 TestLocation(data_location_path, hiddenapi::Domain::kApplication); in TEST_F()
649 TestLocation(system_location_path, hiddenapi::Domain::kApplication); in TEST_F()
657 TestLocation(system_ext_location_path, hiddenapi::Domain::kApplication); in TEST_F()
666 TestLocation(system_ext_location_path, hiddenapi::Domain::kApplication); in TEST_F()
674 TestLocation(system_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
682 TestLocation(system_ext_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
693 TestLocation(system_ext_framework_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
700 TestLocation(data_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
708 TestLocation(system_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
716 TestLocation(system_ext_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
726 TestLocation(system_ext_multi_location_path, hiddenapi::Domain::kApplication); in TEST_F()
735 TestLocation(system_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
745 TestLocation(system_ext_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()
756 TestLocation(system_ext_framework_multi_location_path, hiddenapi::Domain::kPlatform); in TEST_F()