Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: extract nextChunk() out of readLibraryType #3126

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,11 @@ private ResPackage readTablePackage() throws IOException, AndrolibException {
mPkg = new ResPackage(mResTable, id, name);

nextChunk();
boolean flag = true;
while (flag) {

chunkLoop:
for (;;) {
switch (mHeader.type) {
case ARSCHeader.XML_TYPE_TYPE:
case ARSCHeader.XML_TYPE_SPEC_TYPE:
readTableTypeSpec();
break;
Expand All @@ -147,8 +149,7 @@ private ResPackage readTablePackage() throws IOException, AndrolibException {
readStagedAliasSpec();
break;
default:
flag = false;
break;
break chunkLoop;
}
}

Expand All @@ -168,9 +169,7 @@ private void readLibraryType() throws AndrolibException, IOException {
LOGGER.info(String.format("Decoding Shared Library (%s), pkgId: %d", packageName, packageId));
}

while(nextChunk().type == ARSCHeader.XML_TYPE_TYPE) {
readTableTypeSpec();
}
nextChunk();
}

private void readStagedAliasSpec() throws IOException {
Expand Down