mirror of
https://github.com/revanced/Apktool.git
synced 2024-09-01 20:15:14 +02:00
aapt2: Add a flag to determine if sparse resources or not
This commit is contained in:
parent
e02c5f2b2f
commit
88987e60b3
@ -345,6 +345,7 @@ public class ApkDecoder {
|
||||
putPackageInfo(meta);
|
||||
putVersionInfo(meta);
|
||||
putSharedLibraryInfo(meta);
|
||||
putSparseResourcesInfo(meta);
|
||||
}
|
||||
putUnknownInfo(meta);
|
||||
putFileCompressionInfo(meta);
|
||||
@ -421,6 +422,10 @@ public class ApkDecoder {
|
||||
}
|
||||
}
|
||||
|
||||
private void putSparseResourcesInfo(MetaInfo meta) throws AndrolibException {
|
||||
meta.sparseResources = mResTable.getSparseResources();
|
||||
}
|
||||
|
||||
private void putSharedLibraryInfo(MetaInfo meta) throws AndrolibException {
|
||||
meta.sharedLibrary = mResTable.getSharedLibrary();
|
||||
}
|
||||
|
@ -39,6 +39,7 @@ public class ResTable {
|
||||
private int mPackageId;
|
||||
private boolean mAnalysisMode = false;
|
||||
private boolean mSharedLibrary = false;
|
||||
private boolean mSparseResources = false;
|
||||
|
||||
private Map<String, String> mSdkInfo = new LinkedHashMap<>();
|
||||
private VersionInfo mVersionInfo = new VersionInfo();
|
||||
@ -170,6 +171,10 @@ public class ResTable {
|
||||
mSharedLibrary = flag;
|
||||
}
|
||||
|
||||
public void setSparseResources(boolean flag) {
|
||||
mSparseResources = flag;
|
||||
}
|
||||
|
||||
public void clearSdkInfo() {
|
||||
mSdkInfo.clear();
|
||||
}
|
||||
@ -213,4 +218,8 @@ public class ResTable {
|
||||
public boolean getSharedLibrary() {
|
||||
return mSharedLibrary;
|
||||
}
|
||||
|
||||
public boolean getSparseResources() {
|
||||
return mSparseResources;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user