private int mergeApiLevels() { int maxApi = -1; for (int i = 0; i < dexes.length; i++) { int dexMinApi = dexes[i].getTableOfContents().apiLevel; if (maxApi < dexMinApi) { maxApi = dexMinApi; } } return maxApi; }
public DexIndexPrinter(File file) throws IOException { this.dex = new Dex(file); this.tableOfContents = dex.getTableOfContents(); }
public DexIndexPrinter(File file) throws IOException { this.dex = new Dex(file); this.tableOfContents = dex.getTableOfContents(); }
/** * Compute sizes for merging a and b. */ public WriterSizes(Dex a, Dex b) { plus(a.getTableOfContents(), false); plus(b.getTableOfContents(), false); fourByteAlign(); }
/** * Compute sizes for merging several dexes. */ public WriterSizes(Dex[] dexes) { for (int i = 0; i < dexes.length; i++) { plus(dexes[i].getTableOfContents(), false); } fourByteAlign(); }
/** * Compute sizes for merging several dexes. */ public WriterSizes(Dex[] dexes) { for (int i = 0; i < dexes.length; i++) { plus(dexes[i].getTableOfContents(), false); } fourByteAlign(); }
private void transformStaticValues(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().encodedArrays; if (section.exists()) { Dex.Section staticValuesIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformStaticValues(staticValuesIn, indexMap); } } }
private void transformAnnotationDirectories(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationsDirectories; if (section.exists()) { Dex.Section directoryIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationDirectory(directoryIn, indexMap); } } }
private void transformStaticValues(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().encodedArrays; if (section.exists()) { Dex.Section staticValuesIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformStaticValues(staticValuesIn, indexMap); } } }
private void transformAnnotationSets(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSets; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSet(indexMap, setIn); } } }
private void transformAnnotationSetRefLists(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSetRefLists; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSetRefList(indexMap, setIn); } } }
private void transformStaticValues(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().encodedArrays; if (section.exists()) { Dex.Section staticValuesIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformStaticValues(staticValuesIn, indexMap); } } }
private void transformAnnotationSets(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSets; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSet(indexMap, setIn); } } }
private void transformAnnotationSets(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSets; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSet(indexMap, setIn); } } }
private void transformAnnotationDirectories(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationsDirectories; if (section.exists()) { Dex.Section directoryIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationDirectory(directoryIn, indexMap); } } }
private void transformAnnotationSetRefLists(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSetRefLists; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSetRefList(indexMap, setIn); } } }
private void transformAnnotationSetRefLists(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationSetRefLists; if (section.exists()) { Dex.Section setIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationSetRefList(indexMap, setIn); } } }
private void transformAnnotationDirectories(Dex in, IndexMap indexMap) { TableOfContents.Section section = in.getTableOfContents().annotationsDirectories; if (section.exists()) { Dex.Section directoryIn = in.open(section.off); for (int i = 0; i < section.size; i++) { transformAnnotationDirectory(directoryIn, indexMap); } } }
private List<UnsortedValue> readUnsortedValues(Dex source, IndexMap indexMap) { TableOfContents.Section section = getSection(source.getTableOfContents()); if (!section.exists()) { return Collections.emptyList(); } List<UnsortedValue> result = new ArrayList<UnsortedValue>(); Dex.Section in = source.open(section.off); for (int i = 0; i < section.size; i++) { int offset = in.getPosition(); T value = read(in, indexMap, 0); result.add(new UnsortedValue(source, indexMap, value, i, offset)); } return result; }
private List<UnsortedValue> readUnsortedValues(Dex source, IndexMap indexMap) { TableOfContents.Section section = getSection(source.getTableOfContents()); if (!section.exists()) { return Collections.emptyList(); } List<UnsortedValue> result = new ArrayList<UnsortedValue>(); Dex.Section in = source.open(section.off); for (int i = 0; i < section.size; i++) { int offset = in.getPosition(); T value = read(in, indexMap, 0); result.add(new UnsortedValue(source, indexMap, value, i, offset)); } return result; }