mirror of
https://github.com/revanced/smali.git
synced 2025-05-03 08:04:28 +02:00
Write the header for annotation and array encoded values
This commit is contained in:
parent
8721a614f5
commit
257fa2dfca
@ -81,6 +81,7 @@ public class DexFile {
|
|||||||
case ValueType.ANNOTATION:
|
case ValueType.ANNOTATION:
|
||||||
AnnotationEncodedValue annotationEncodedValue = (AnnotationEncodedValue)encodedValue;
|
AnnotationEncodedValue annotationEncodedValue = (AnnotationEncodedValue)encodedValue;
|
||||||
Collection<? extends AnnotationElement> annotationElements = annotationEncodedValue.getElements();
|
Collection<? extends AnnotationElement> annotationElements = annotationEncodedValue.getElements();
|
||||||
|
writer.writeEncodedValueHeader(valueType, 0);
|
||||||
writer.writeUleb128(typePool.getIndex(annotationEncodedValue.getType()));
|
writer.writeUleb128(typePool.getIndex(annotationEncodedValue.getType()));
|
||||||
writer.writeUleb128(annotationElements.size());
|
writer.writeUleb128(annotationElements.size());
|
||||||
for (AnnotationElement element: annotationElements) {
|
for (AnnotationElement element: annotationElements) {
|
||||||
@ -91,6 +92,7 @@ public class DexFile {
|
|||||||
case ValueType.ARRAY:
|
case ValueType.ARRAY:
|
||||||
ArrayEncodedValue arrayEncodedValue = (ArrayEncodedValue)encodedValue;
|
ArrayEncodedValue arrayEncodedValue = (ArrayEncodedValue)encodedValue;
|
||||||
Collection<? extends EncodedValue> elements = arrayEncodedValue.getValue();
|
Collection<? extends EncodedValue> elements = arrayEncodedValue.getValue();
|
||||||
|
writer.writeEncodedValueHeader(valueType, 0);
|
||||||
writer.writeUleb128(elements.size());
|
writer.writeUleb128(elements.size());
|
||||||
for (EncodedValue element: elements) {
|
for (EncodedValue element: elements) {
|
||||||
writeEncodedValue(writer, element);
|
writeEncodedValue(writer, element);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user