Skip to content

Commit

Permalink
move AndrolidExceptions to the package brut.androlib.exceptions (rena…
Browse files Browse the repository at this point in the history
…med from brut.androlib.err) (#3088)
  • Loading branch information
sv99 authored Jun 10, 2023
1 parent 92f70bb commit 168aa1a
Show file tree
Hide file tree
Showing 53 changed files with 73 additions and 80 deletions.
7 changes: 4 additions & 3 deletions brut.apktool/apktool-cli/src/main/java/brut/apktool/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@
package brut.apktool;

import brut.androlib.*;
import brut.androlib.err.CantFindFrameworkResException;
import brut.androlib.err.InFileNotFoundException;
import brut.androlib.err.OutDirExistsException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.CantFindFrameworkResException;
import brut.androlib.exceptions.InFileNotFoundException;
import brut.androlib.exceptions.OutDirExistsException;
import brut.androlib.options.BuildOptions;
import brut.common.BrutException;
import brut.directory.DirectoryException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
*/
package brut.androlib;

import brut.androlib.exceptions.AndrolibException;
import brut.androlib.meta.MetaInfo;
import brut.androlib.meta.UsesFramework;
import brut.androlib.options.BuildOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@
*/
package brut.androlib;

import brut.androlib.err.InFileNotFoundException;
import brut.androlib.err.OutDirExistsException;
import brut.androlib.err.UndefinedResObjectException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.InFileNotFoundException;
import brut.androlib.exceptions.OutDirExistsException;
import brut.androlib.exceptions.UndefinedResObjectException;
import brut.androlib.meta.MetaInfo;
import brut.androlib.meta.PackageInfo;
import brut.androlib.meta.UsesFramework;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib.err;

import brut.androlib.AndrolibException;
package brut.androlib.exceptions;

public class AXmlDecodingException extends AndrolibException {
public AXmlDecodingException(String message, Throwable cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib;
package brut.androlib.exceptions;

import brut.common.BrutException;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib.err;

import brut.androlib.AndrolibException;
package brut.androlib.exceptions;

public class CantFind9PatchChunkException extends AndrolibException {
public CantFind9PatchChunkException(String message, Throwable cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib.err;

import brut.androlib.AndrolibException;
package brut.androlib.exceptions;

public class CantFindFrameworkResException extends AndrolibException {
public CantFindFrameworkResException(int id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib.err;

import brut.androlib.AndrolibException;
package brut.androlib.exceptions;

public class InFileNotFoundException extends AndrolibException {
public InFileNotFoundException() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib.err;

import brut.androlib.AndrolibException;
package brut.androlib.exceptions;

public class OutDirExistsException extends AndrolibException {
public OutDirExistsException() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib.err;

import brut.androlib.AndrolibException;
package brut.androlib.exceptions;

public class RawXmlEncounteredException extends AndrolibException {
public RawXmlEncounteredException(String message, Throwable cause) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package brut.androlib.err;

import brut.androlib.AndrolibException;
package brut.androlib.exceptions;

public class UndefinedResObjectException extends AndrolibException {
public UndefinedResObjectException(String message) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
*/
package brut.androlib.res;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.options.BuildOptions;
import brut.androlib.err.CantFindFrameworkResException;
import brut.androlib.exceptions.CantFindFrameworkResException;
import brut.androlib.meta.MetaInfo;
import brut.androlib.meta.PackageInfo;
import brut.androlib.meta.VersionInfo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package brut.androlib.res.data;

import brut.androlib.AndrolibException;
import brut.androlib.err.UndefinedResObjectException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.UndefinedResObjectException;
import brut.androlib.res.data.value.ResFileValue;
import brut.androlib.res.data.value.ResValueFactory;
import brut.androlib.res.xml.ResValuesXmlSerializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package brut.androlib.res.data;

import brut.androlib.AndrolibException;
import brut.androlib.err.UndefinedResObjectException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.UndefinedResObjectException;
import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.value.ResValue;

public class ResResource {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package brut.androlib.res.data;

import brut.androlib.AndrolibException;
import brut.androlib.err.UndefinedResObjectException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.UndefinedResObjectException;
import brut.androlib.meta.VersionInfo;
import brut.androlib.res.AndrolibResources;
import brut.androlib.res.data.value.ResValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package brut.androlib.res.data;

import brut.androlib.AndrolibException;
import brut.androlib.err.UndefinedResObjectException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.UndefinedResObjectException;
import java.util.*;

public class ResType {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package brut.androlib.res.data;

import brut.androlib.AndrolibException;
import brut.androlib.err.UndefinedResObjectException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.UndefinedResObjectException;
import java.util.*;

public final class ResTypeSpec {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResResource;
import brut.androlib.res.xml.ResValuesXmlSerializable;
import brut.util.Duo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResPackage;
import brut.androlib.res.data.ResResource;
import brut.androlib.res.xml.ResValuesXmlSerializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResResource;
import brut.androlib.res.xml.ResValuesXmlSerializable;
import brut.util.Duo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package brut.androlib.res.data.value;

import android.util.TypedValue;
import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;

public class ResDimenValue extends ResIntValue {
public ResDimenValue(int value, String rawValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;

public class ResEmptyValue extends ResScalarValue {
protected final int mValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResResSpec;
import brut.androlib.res.data.ResResource;
import brut.util.Duo;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;

public class ResFileValue extends ResIntBasedValue {
private final String mPath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResResource;
import brut.util.Duo;
import org.xmlpull.v1.XmlSerializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package brut.androlib.res.data.value;

import android.util.TypedValue;
import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;

public class ResFractionValue extends ResIntValue {
public ResFractionValue(int value, String rawValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package brut.androlib.res.data.value;

import android.util.TypedValue;
import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;

public class ResIntValue extends ResScalarValue {
protected final int mValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResResource;
import brut.androlib.res.xml.ResValuesXmlSerializable;
import brut.androlib.res.xml.ResXmlEncoders;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.err.UndefinedResObjectException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.UndefinedResObjectException;
import brut.androlib.res.data.ResPackage;
import brut.androlib.res.data.ResResSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResResource;
import brut.androlib.res.xml.ResValuesXmlSerializable;
import brut.androlib.res.xml.ResXmlEncodable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResResource;
import brut.androlib.res.xml.ResXmlEncoders;
import org.xmlpull.v1.XmlSerializer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
*/
package brut.androlib.res.data.value;

import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResResSpec;
import brut.androlib.res.data.ResResource;
import brut.androlib.res.xml.ResValuesXmlSerializable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package brut.androlib.res.data.value;

import android.util.TypedValue;
import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResPackage;
import brut.androlib.res.data.ResTypeSpec;
import brut.util.Duo;
Expand Down Expand Up @@ -107,7 +107,7 @@ public ResBagValue bagFactory(int parent, Duo<Integer, ResScalarValue>[] items,
if (ResTypeSpec.RES_TYPE_NAME_ATTR.equals(resTypeName)) {
return new ResAttr(parentVal, 0, null, null, null);
}

if (resTypeName.startsWith(ResTypeSpec.RES_TYPE_NAME_STYLES)) {
return new ResStyleValue(parentVal, items, this);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
package brut.androlib.res.decoder;

import android.util.TypedValue;
import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.*;
import brut.androlib.res.data.value.*;
import brut.util.Duo;
Expand All @@ -31,7 +31,6 @@
import java.io.InputStream;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import android.content.res.XmlResourceParser;
import android.util.TypedValue;
import brut.androlib.AndrolibException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.res.data.ResID;
import brut.androlib.res.xml.ResXmlEncoders;
import brut.util.ExtDataInput;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
*/
package brut.androlib.res.decoder;

import brut.androlib.AndrolibException;
import brut.androlib.err.CantFind9PatchChunkException;
import brut.androlib.exceptions.AndrolibException;
import brut.androlib.exceptions.CantFind9PatchChunkException;
import brut.util.ExtDataInput;
import org.apache.commons.io.IOUtils;

Expand Down
Loading

0 comments on commit 168aa1a

Please sign in to comment.