Lines Matching refs:dex_file
119 std::unique_ptr<const DexFile> dex_file(dex_loader.OpenDex( in OpenDex() local
122 if (dex_file.get() == nullptr) { in OpenDex()
125 } else if (!dex_file->IsStandardDexFile()) { in OpenDex()
130 return dex_file; in OpenDex()
167 const dex::ClassDef& FindClass(const char* desc, const DexFile& dex_file) { in FindClass() argument
168 const dex::TypeId* type_id = dex_file.FindTypeId(desc); in FindClass()
170 const dex::ClassDef* found = dex_file.FindClassDef(dex_file.GetIndexForTypeId(*type_id)); in FindClass()
178 const DexFile& dex_file) { in GetFieldHiddenFlags() argument
179 ClassAccessor accessor(dex_file, class_def, /* parse hiddenapi flags */ true); in GetFieldHiddenFlags()
187 const dex::FieldId& fid = dex_file.GetFieldId(field.GetIndex()); in GetFieldHiddenFlags()
188 if (strcmp(name, dex_file.GetFieldName(fid)) == 0) { in GetFieldHiddenFlags()
197 << dex_file.GetClassDescriptor(class_def); in GetFieldHiddenFlags()
205 const DexFile& dex_file) { in GetMethodHiddenFlags() argument
206 ClassAccessor accessor(dex_file, class_def, /* parse hiddenapi flags */ true); in GetMethodHiddenFlags()
214 const dex::MethodId& mid = dex_file.GetMethodId(method.GetIndex()); in GetMethodHiddenFlags()
215 if (strcmp(name, dex_file.GetMethodName(mid)) == 0) { in GetMethodHiddenFlags()
226 << dex_file.GetClassDescriptor(class_def); in GetMethodHiddenFlags()
230 hiddenapi::ApiList GetIFieldHiddenFlags(const DexFile& dex_file) { in GetIFieldHiddenFlags() argument
231 return GetFieldHiddenFlags("ifield", kAccPublic, FindClass("LMain;", dex_file), dex_file); in GetIFieldHiddenFlags()
234 hiddenapi::ApiList GetSFieldHiddenFlags(const DexFile& dex_file) { in GetSFieldHiddenFlags() argument
235 return GetFieldHiddenFlags("sfield", kAccPrivate, FindClass("LMain;", dex_file), dex_file); in GetSFieldHiddenFlags()
238 hiddenapi::ApiList GetIMethodHiddenFlags(const DexFile& dex_file) { in GetIMethodHiddenFlags() argument
240 "imethod", 0, /* expected_native= */ false, FindClass("LMain;", dex_file), dex_file); in GetIMethodHiddenFlags()
243 hiddenapi::ApiList GetSMethodHiddenFlags(const DexFile& dex_file) { in GetSMethodHiddenFlags() argument
247 FindClass("LMain;", dex_file), in GetSMethodHiddenFlags()
248 dex_file); in GetSMethodHiddenFlags()
251 hiddenapi::ApiList GetINMethodHiddenFlags(const DexFile& dex_file) { in GetINMethodHiddenFlags() argument
255 FindClass("LMain;", dex_file), in GetINMethodHiddenFlags()
256 dex_file); in GetINMethodHiddenFlags()
259 hiddenapi::ApiList GetSNMethodHiddenFlags(const DexFile& dex_file) { in GetSNMethodHiddenFlags() argument
263 FindClass("LMain;", dex_file), in GetSNMethodHiddenFlags()
264 dex_file); in GetSNMethodHiddenFlags()
274 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
275 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
276 ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetIFieldHiddenFlags(*dex_file)); in TEST_F()
285 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
286 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
287 ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetIFieldHiddenFlags(*dex_file)); in TEST_F()
296 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
297 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
298 ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetIFieldHiddenFlags(*dex_file)); in TEST_F()
307 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
308 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
309 ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetIFieldHiddenFlags(*dex_file)); in TEST_F()
317 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
318 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
326 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
327 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
335 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
336 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
345 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
346 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
347 ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetSFieldHiddenFlags(*dex_file)); in TEST_F()
356 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
357 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
358 ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetSFieldHiddenFlags(*dex_file)); in TEST_F()
367 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
368 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
369 ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetSFieldHiddenFlags(*dex_file)); in TEST_F()
378 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
379 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
380 ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetSFieldHiddenFlags(*dex_file)); in TEST_F()
388 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
389 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
397 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
398 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
406 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
407 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
416 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
417 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
418 ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetIMethodHiddenFlags(*dex_file)); in TEST_F()
427 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
428 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
429 ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetIMethodHiddenFlags(*dex_file)); in TEST_F()
438 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
439 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
440 ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetIMethodHiddenFlags(*dex_file)); in TEST_F()
449 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
450 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
451 ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetIMethodHiddenFlags(*dex_file)); in TEST_F()
459 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
460 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
468 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
469 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
477 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
478 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
487 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
488 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
489 ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetSMethodHiddenFlags(*dex_file)); in TEST_F()
498 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
499 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
500 ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetSMethodHiddenFlags(*dex_file)); in TEST_F()
509 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
510 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
511 ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetSMethodHiddenFlags(*dex_file)); in TEST_F()
520 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
521 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
522 ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetSMethodHiddenFlags(*dex_file)); in TEST_F()
530 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
531 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
539 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
540 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
548 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
549 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
558 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
559 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
560 ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetINMethodHiddenFlags(*dex_file)); in TEST_F()
569 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
570 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
571 ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetINMethodHiddenFlags(*dex_file)); in TEST_F()
580 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
581 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
582 ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetINMethodHiddenFlags(*dex_file)); in TEST_F()
591 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
592 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
593 ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetINMethodHiddenFlags(*dex_file)); in TEST_F()
601 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
602 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
610 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
611 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
619 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
620 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
629 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
630 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
631 ASSERT_EQ(hiddenapi::ApiList::Whitelist(), GetSNMethodHiddenFlags(*dex_file)); in TEST_F()
640 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
641 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
642 ASSERT_EQ(hiddenapi::ApiList::Greylist(), GetSNMethodHiddenFlags(*dex_file)); in TEST_F()
651 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
652 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
653 ASSERT_EQ(hiddenapi::ApiList::GreylistMaxO(), GetSNMethodHiddenFlags(*dex_file)); in TEST_F()
662 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
663 ASSERT_NE(dex_file.get(), nullptr); in TEST_F()
664 ASSERT_EQ(hiddenapi::ApiList::Blacklist(), GetSNMethodHiddenFlags(*dex_file)); in TEST_F()
672 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
673 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
681 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
682 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()
690 auto dex_file = RunHiddenapiEncode(flags_csv, {}, dex); in TEST_F() local
691 ASSERT_EQ(dex_file.get(), nullptr); in TEST_F()