Skip to content

Commit

Permalink
Fixes handling of applications without packages in resources (empty-p…
Browse files Browse the repository at this point in the history
…ackage)
  • Loading branch information
kiber-io committed Jun 20, 2024
1 parent f0d40d4 commit 84d7f8a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/java/com/reandroid/apk/ApkModule.java
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ private void ensureLoadedManifestLinked() {
}
packageBlock = tableBlock.pickOne(manifestBlock.guessCurrentPackageId());
if(packageBlock == null) {
packageBlock = tableBlock.pickOne();
packageBlock = tableBlock.pickOrEmptyPackage();
}
if(packageBlock != null) {
manifestBlock.setPackageBlock(packageBlock);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/reandroid/apk/ApkModuleXmlEncoder.java
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private void encodeManifestXml(File mainDirectory) {
if(packageId != null){
packageBlock = tableBlock.pickOne(packageId);
}else {
packageBlock = tableBlock.pickOne();
packageBlock = tableBlock.pickOrEmptyPackage();
}
if(packageBlock != null){
tableBlock.setCurrentPackage(packageBlock);
Expand Down

0 comments on commit 84d7f8a

Please sign in to comment.