mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-05 17:45:52 +01:00
fix: remove declared exceptions that aren't thrown
This commit is contained in:
parent
4d11c13e44
commit
f4c2f9bc50
@ -228,7 +228,7 @@ public class ApkDecoder {
|
||||
}
|
||||
}
|
||||
|
||||
public void setTargetSdkVersion() throws AndrolibException, IOException {
|
||||
public void setTargetSdkVersion() throws AndrolibException {
|
||||
if (mResTable == null) {
|
||||
mResTable = mAndrolib.getResTable(mApkFile);
|
||||
}
|
||||
@ -247,7 +247,7 @@ public class ApkDecoder {
|
||||
mForceDelete = forceDelete;
|
||||
}
|
||||
|
||||
public void setFrameworkTag(String tag) throws AndrolibException {
|
||||
public void setFrameworkTag(String tag) {
|
||||
mAndrolib.apkOptions.frameworkTag = tag;
|
||||
}
|
||||
|
||||
@ -437,21 +437,21 @@ public class ApkDecoder {
|
||||
meta.versionInfo = info;
|
||||
}
|
||||
|
||||
private void putUnknownInfo(MetaInfo meta) throws AndrolibException {
|
||||
private void putUnknownInfo(MetaInfo meta) {
|
||||
meta.unknownFiles = mAndrolib.mResUnknownFiles.getUnknownFiles();
|
||||
}
|
||||
|
||||
private void putFileCompressionInfo(MetaInfo meta) throws AndrolibException {
|
||||
private void putFileCompressionInfo(MetaInfo meta) {
|
||||
if (mUncompressedFiles != null && !mUncompressedFiles.isEmpty()) {
|
||||
meta.doNotCompress = mUncompressedFiles;
|
||||
}
|
||||
}
|
||||
|
||||
private void putSparseResourcesInfo(MetaInfo meta) throws AndrolibException {
|
||||
private void putSparseResourcesInfo(MetaInfo meta) {
|
||||
meta.sparseResources = mResTable.getSparseResources();
|
||||
}
|
||||
|
||||
private void putSharedLibraryInfo(MetaInfo meta) throws AndrolibException {
|
||||
private void putSharedLibraryInfo(MetaInfo meta) {
|
||||
meta.sharedLibrary = mResTable.getSharedLibrary();
|
||||
}
|
||||
|
||||
|
@ -92,8 +92,7 @@ final public class AndrolibResources {
|
||||
return pkg;
|
||||
}
|
||||
|
||||
public ResPackage selectPkgWithMostResSpecs(ResPackage[] pkgs)
|
||||
throws AndrolibException {
|
||||
public ResPackage selectPkgWithMostResSpecs(ResPackage[] pkgs) {
|
||||
int id = 0;
|
||||
int value = 0;
|
||||
int index = 0;
|
||||
|
@ -17,20 +17,25 @@
|
||||
package brut.androlib.res.decoder;
|
||||
|
||||
import android.util.TypedValue;
|
||||
import brut.androlib.Androlib;
|
||||
import brut.androlib.AndrolibException;
|
||||
import brut.androlib.res.data.*;
|
||||
import brut.androlib.res.data.value.*;
|
||||
import brut.util.Duo;
|
||||
import brut.androlib.res.data.ResTable;
|
||||
import brut.util.ExtDataInput;
|
||||
import com.google.common.io.LittleEndianDataInputStream;
|
||||
import java.io.*;
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.commons.io.input.CountingInputStream;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.EOFException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
public class ARSCDecoder {
|
||||
public static ARSCData decode(InputStream arscStream, boolean findFlagsOffsets, boolean keepBroken)
|
||||
throws AndrolibException {
|
||||
@ -468,7 +473,7 @@ public class ARSCDecoder {
|
||||
colorMode, isInvalid, size);
|
||||
}
|
||||
|
||||
private char[] unpackLanguageOrRegion(byte in0, byte in1, char base) throws AndrolibException {
|
||||
private char[] unpackLanguageOrRegion(byte in0, byte in1, char base) {
|
||||
// check high bit, if so we have a packed 3 letter code
|
||||
if (((in0 >> 7) & 1) == 1) {
|
||||
int first = in1 & 0x1F;
|
||||
@ -482,7 +487,7 @@ public class ARSCDecoder {
|
||||
return new char[] { (char) in0, (char) in1 };
|
||||
}
|
||||
|
||||
private String readScriptOrVariantChar(int length) throws AndrolibException, IOException {
|
||||
private String readScriptOrVariantChar(int length) throws IOException {
|
||||
StringBuilder string = new StringBuilder(16);
|
||||
|
||||
while(length-- != 0) {
|
||||
|
@ -517,8 +517,7 @@ public class AXmlResourceParser implements XmlResourceParser {
|
||||
|
||||
// ///////////////////////////////// dummies
|
||||
@Override
|
||||
public void setInput(InputStream stream, String inputEncoding)
|
||||
throws XmlPullParserException {
|
||||
public void setInput(InputStream stream, String inputEncoding) {
|
||||
open(stream);
|
||||
}
|
||||
|
||||
@ -538,12 +537,12 @@ public class AXmlResourceParser implements XmlResourceParser {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEmptyElementTag() throws XmlPullParserException {
|
||||
public boolean isEmptyElementTag() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isWhitespace() throws XmlPullParserException {
|
||||
public boolean isWhitespace() {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user