mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-06 10:05:54 +01:00
only store renamed-manifest-package if the apk requires the change
This commit is contained in:
parent
f6a61ba1b4
commit
501a6df677
@ -318,10 +318,15 @@ public class ApkDecoder {
|
||||
private void putPackageInfo(Map<String, Object> meta)
|
||||
throws AndrolibException {
|
||||
String renamed = getResTable().getPackageRenamed();
|
||||
String original = getResTable().getPackageOriginal();
|
||||
int id = getResTable().getPackageId();
|
||||
|
||||
HashMap<String, String> packages = new HashMap<String, String>();
|
||||
packages.put("rename-manifest-package", renamed);
|
||||
|
||||
// only put rename-manifest-package into apktool.yml, if the change will be required
|
||||
if (!renamed.equalsIgnoreCase(original)) {
|
||||
packages.put("rename-manifest-package", renamed);
|
||||
}
|
||||
packages.put("forced-package-id", String.valueOf(id));
|
||||
meta.put("packageInfo", packages);
|
||||
}
|
||||
|
@ -181,7 +181,6 @@ final public class AndrolibResources {
|
||||
mPackageOriginal = resPackage.getName();
|
||||
mPackageRenamed = resTable.getPackageRenamed();
|
||||
|
||||
|
||||
resTable.setPackageId(resPackage.getId());
|
||||
resTable.setPackageOriginal(mPackageOriginal);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user