diff --git a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java index d81e3f5922..3cd727044a 100644 --- a/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java +++ b/brut.apktool/apktool-lib/src/main/java/brut/androlib/res/ResourcesDecoder.java @@ -243,9 +243,6 @@ public ResTable decodeResources(File outDir) throws AndrolibException { break; } mResTable.initApkInfo(mApkInfo, outDir); - if (mConfig.frameworkTag != null) { - mApkInfo.usesFramework.tag = mConfig.frameworkTag; - } } return mResTable; } 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 37e2287ebf..09939fa175 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 @@ -291,7 +291,7 @@ public boolean getSparseResources() { } private boolean isFrameworkApk() { - for (ResPackage pkg : listMainPackages()) { + for (ResPackage pkg : mMainPackages) { if (pkg.getId() > 0 && pkg.getId() < 64) { return true; } @@ -301,9 +301,7 @@ private boolean isFrameworkApk() { public void initApkInfo(ApkInfo apkInfo, File outDir) throws AndrolibException { apkInfo.isFrameworkApk = isFrameworkApk(); - if (!listFramePackages().isEmpty()) { - apkInfo.usesFramework = getUsesFramework(); - } + apkInfo.usesFramework = getUsesFramework(); if (!mApkInfo.getSdkInfo().isEmpty()) { updateSdkInfoFromResources(outDir); } @@ -312,18 +310,15 @@ public void initApkInfo(ApkInfo apkInfo, File outDir) throws AndrolibException { } private UsesFramework getUsesFramework() { - Set pkgs = listFramePackages(); - - Integer[] ids = new Integer[pkgs.size()]; + UsesFramework info = new UsesFramework(); + Integer[] ids = new Integer[mFramePackages.size()]; int i = 0; - for (ResPackage pkg : pkgs) { + for (ResPackage pkg : mFramePackages) { ids[i++] = pkg.getId(); } Arrays.sort(ids); - - UsesFramework info = new UsesFramework(); info.ids = Arrays.asList(ids); - + info.tag = mConfig.frameworkTag; return info; }