From 60f0d9848da47d08c78aa09a241c2d07ee4b9fb0 Mon Sep 17 00:00:00 2001 From: KDGDev Date: Sat, 19 Jan 2013 21:55:40 +0400 Subject: [PATCH] Optimized, not need function --- .../src/main/java/brut/androlib/ApkDecoder.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) 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 8b8f3d8b..6ebe348b 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 @@ -101,7 +101,8 @@ public class ApkDecoder { JarFile jf = new JarFile(mApkFile.getAbsoluteFile()); JarEntry je = jf.getJarEntry("resources.arsc"); if (je != null) { - setCompressionType(je.getMethod()); + int compression = je.getMethod(); + mCompressResources = (compression != ZipEntry.STORED) && (compression == ZipEntry.DEFLATED); } jf.close(); @@ -294,12 +295,6 @@ public class ApkDecoder { private boolean getCompressionType() { return mCompressResources; } - - private void setCompressionType(int compression) { - - // check for deflate vs stored - mCompressResources = (compression == ZipEntry.STORED) ? false : (compression == ZipEntry.DEFLATED); - } private final Androlib mAndrolib;