| 46 | static_assert(std::is_trivially_copyable<dex::TypeIndex>::value, "TypeIndex not trivial"); |
| 47 | |
| 48 | void DexFile::UnHideAccessFlags(ClassDataItemIterator& class_it) { |
| 49 | uint8_t* data = const_cast<uint8_t*>(class_it.DataPointer()); |
| 50 | uint32_t new_flag = class_it.GetMemberAccessFlags(); |
| 51 | bool is_method = class_it.IsAtMethod(); |
| 52 | // Go back 1 uleb to start. |
| 53 | data = ReverseSearchUnsignedLeb128(data); |
| 54 | if (is_method) { |
| 55 | // Methods have another uleb field before the access flags |
| 56 | data = ReverseSearchUnsignedLeb128(data); |
| 57 | } |
| 58 | DCHECK_EQ(HiddenApiAccessFlags::RemoveFromDex(DecodeUnsignedLeb128WithoutMovingCursor(data)), |
| 59 | new_flag); |
| 60 | UpdateUnsignedLeb128(data, new_flag); |
| 61 | } |
| 62 | |
| 63 | uint32_t DexFile::CalculateChecksum() const { |
| 64 | return CalculateChecksum(Begin(), Size()); |
nothing calls this directly
no test coverage detected