diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java index ecf52c9d..a3f5f722 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkDecoder.java @@ -225,10 +225,7 @@ public class ApkDecoder { } public void setFrameworkTag(String tag) throws AndrolibException { - mFrameTag = tag; - if (mResTable != null) { - getResTable().setFrameTag(tag); - } + mAndrolib.apkOptions.frameworkTag = tag; } public void setKeepBrokenResources(boolean keepBrokenResources) { @@ -237,7 +234,6 @@ public class ApkDecoder { public void setFrameworkDir(String dir) { mAndrolib.apkOptions.frameworkFolderLocation = dir; - mFrameworkDir = dir; } public ResTable getResTable() throws AndrolibException { @@ -250,7 +246,6 @@ public class ApkDecoder { } AndrolibResources.sKeepBroken = mKeepBrokenResources; mResTable = mAndrolib.getResTable(mApkFile, hasResources); - mResTable.setFrameTag(mFrameTag); } return mResTable; } @@ -344,8 +339,8 @@ public class ApkDecoder { Map uses = new LinkedHashMap(); uses.put("ids", ids); - if (mFrameTag != null) { - uses.put("tag", mFrameTag); + if (mAndrolib.apkOptions.frameworkTag != null) { + uses.put("tag", mAndrolib.apkOptions.frameworkTag); } meta.put("usesFramework", uses); @@ -405,8 +400,6 @@ public class ApkDecoder { private short mDecodeSources = DECODE_SOURCES_SMALI; private short mDecodeResources = DECODE_RESOURCES_FULL; private String mDebugLinePrefix = "a=0;// "; - private String mFrameTag; - private String mFrameworkDir = null; private boolean mDebug = false; private boolean mForceDelete = false; private boolean mKeepBrokenResources = false; diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTable.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTable.java index 2117abe1..411a2672 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTable.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/data/ResTable.java @@ -33,7 +33,6 @@ public class ResTable { private final Set mMainPackages = new LinkedHashSet(); private final Set mFramePackages = new LinkedHashSet(); - private String mFrameTag; private String mPackageRenamed; private String mPackageOriginal; private int mPackageId; @@ -72,7 +71,7 @@ public class ResTable { return pkg; } if (mAndRes != null) { - return mAndRes.loadFrameworkPkg(this, id, mFrameTag); + return mAndRes.loadFrameworkPkg(this, id, mAndRes.apkOptions.frameworkTag); } throw new UndefinedResObject(String.format("package: id=%d", id)); } @@ -143,10 +142,6 @@ public class ResTable { } } - public void setFrameTag(String tag) { - mFrameTag = tag; - } - public void setAnalysisMode(boolean mode) { mAnalysisMode = mode; }