Skip to content

Commit 31322fb

Browse files
committed
Merge pull request #56 from Leanplum/feature/fix-manifest
fix(ManifestParser) handle XML_TEXT_TAG (0x00100104).
1 parent 2868515 commit 31322fb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

AndroidSDK/src/com/leanplum/internal/LeanplumManifestParser.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ class LeanplumManifestParser {
5353
private static final int END_TAG = 0x00100103;
5454
private static final int START_NAMESPACE_TAG = 0x00100100;
5555
private static final int END_NAMESPACE_TAG = 0x00100101;
56+
private static final int XML_TEXT_TAG = 0x00100104;
5657
private static final String SPACES = " ";
5758

5859
/**
@@ -108,10 +109,10 @@ static String decompressXml(byte[] xml) {
108109
indent++;
109110
} else if (tag0 == END_TAG) { // END_TAG.
110111
indent--;
111-
off += 6 * 4; // Skip over 6 words of END_TAG data
112+
off += 6 * 4; // Skip over 6 words of END_TAG data.
112113
String name = compXmlString(xml, sitOff, stOff, nameSi);
113114
out += SPACES.substring(0, Math.min(indent * 2, SPACES.length())) + "</" + name + ">";
114-
} else if (tag0 == START_NAMESPACE_TAG) { // START_NAMESPACE_TAG
115+
} else if (tag0 == START_NAMESPACE_TAG) { // START_NAMESPACE_TAG.
115116
// Sometimes here can be nested group of START_NAMESPACE_TAG and END_NAMESPACE_TAG. We
116117
// should parse all of them.
117118
// Increase START_NAMESPACE_TAG counter.
@@ -127,6 +128,8 @@ static String decompressXml(byte[] xml) {
127128
}
128129
// If here is more START_NAMESPACE_TAG then skip over 6 words of START_NAMESPACE_TAG.
129130
off += 4 * 6;
131+
} else if (tag0 == XML_TEXT_TAG) { // XML_TEXT_TAG.
132+
off += 4 * 7;// Skip over 7 words of XML_TEXT_TAG data.
130133
} else {
131134
break;
132135
}

0 commit comments

Comments
 (0)