mirror of
https://github.com/iBotPeaches/Apktool.git
synced 2024-11-26 22:10:37 +00:00
clean up tab intendation (#3707)
This commit is contained in:
parent
111a95f369
commit
03a7c67082
@ -119,7 +119,7 @@ public class TypedValue {
|
||||
/** Identifies the end of plain integer values. */
|
||||
public static final int TYPE_LAST_INT = 0x1f;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
/** Complex data: bit location of unit information. */
|
||||
public static final int COMPLEX_UNIT_SHIFT = 0;
|
||||
@ -182,7 +182,7 @@ public class TypedValue {
|
||||
*/
|
||||
public static final int COMPLEX_MANTISSA_MASK = 0xffffff;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* {@link #TYPE_NULL} data indicating the value was not specified.
|
||||
@ -207,7 +207,7 @@ public class TypedValue {
|
||||
*/
|
||||
public static final int DENSITY_NONE = 0xffff;
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
/* ------------------------------------------------------------ */
|
||||
|
||||
/**
|
||||
* The type held by this value, as defined by the constants here. This tells
|
||||
|
@ -17,7 +17,7 @@
|
||||
package brut.androlib.exceptions;
|
||||
|
||||
public class CantFind9PatchChunkException extends AndrolibException {
|
||||
public CantFind9PatchChunkException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
public CantFind9PatchChunkException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
}
|
||||
|
@ -17,18 +17,18 @@
|
||||
package brut.androlib.exceptions;
|
||||
|
||||
public class CantFindFrameworkResException extends AndrolibException {
|
||||
public CantFindFrameworkResException(int id) {
|
||||
mPkgId = id;
|
||||
}
|
||||
public CantFindFrameworkResException(int id) {
|
||||
mPkgId = id;
|
||||
}
|
||||
|
||||
public int getPkgId() {
|
||||
return mPkgId;
|
||||
}
|
||||
public int getPkgId() {
|
||||
return mPkgId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return String.format("Can't find framework resources for package of id: %d", this.getPkgId());
|
||||
}
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return String.format("Can't find framework resources for package of id: %d", this.getPkgId());
|
||||
}
|
||||
|
||||
private final int mPkgId;
|
||||
private final int mPkgId;
|
||||
}
|
||||
|
@ -17,6 +17,6 @@
|
||||
package brut.androlib.exceptions;
|
||||
|
||||
public class InFileNotFoundException extends AndrolibException {
|
||||
public InFileNotFoundException() {
|
||||
}
|
||||
public InFileNotFoundException() {
|
||||
}
|
||||
}
|
||||
|
@ -17,6 +17,6 @@
|
||||
package brut.androlib.exceptions;
|
||||
|
||||
public class OutDirExistsException extends AndrolibException {
|
||||
public OutDirExistsException() {
|
||||
}
|
||||
public OutDirExistsException() {
|
||||
}
|
||||
}
|
||||
|
@ -17,7 +17,7 @@
|
||||
package brut.androlib.exceptions;
|
||||
|
||||
public class UndefinedResObjectException extends AndrolibException {
|
||||
public UndefinedResObjectException(String message) {
|
||||
super(message);
|
||||
}
|
||||
public UndefinedResObjectException(String message) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
@ -469,12 +469,12 @@ public class ARSCDecoder {
|
||||
}
|
||||
|
||||
private ResIntBasedValue readValue() throws IOException, AndrolibException {
|
||||
short size = mIn.readShort();
|
||||
short size = mIn.readShort();
|
||||
if (size < 8) {
|
||||
return null;
|
||||
}
|
||||
|
||||
mIn.skipCheckByte((byte) 0); // zero
|
||||
mIn.skipCheckByte((byte) 0); // zero
|
||||
byte type = mIn.readByte();
|
||||
int data = mIn.readInt();
|
||||
|
||||
|
@ -262,8 +262,8 @@ public class StringBlock {
|
||||
val = array[offset];
|
||||
offset += 1;
|
||||
if ((val & 0x80) != 0) {
|
||||
int low = (array[offset] & 0xFF);
|
||||
length = ((val & 0x7F) << 8) + low;
|
||||
int low = (array[offset] & 0xFF);
|
||||
length = ((val & 0x7F) << 8) + low;
|
||||
offset += 1;
|
||||
} else {
|
||||
length = val;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -31,26 +31,26 @@ public class StringBlockWithSurrogatePairInUtf8Test {
|
||||
|
||||
@Test
|
||||
public void decodeTwoOctets() {
|
||||
final String actual0 = new StringBlock(new byte[] { (byte) 0xC2, (byte) 0x80}, true).decodeString(0, 2);
|
||||
final String actual0 = new StringBlock(new byte[] {(byte) 0xC2, (byte) 0x80}, true).decodeString(0, 2);
|
||||
assertEquals("Incorrect decoding", "\u0080", actual0);
|
||||
|
||||
final String actual1 = new StringBlock(new byte[] { (byte) 0xDF, (byte) 0xBF}, true).decodeString(0, 2);
|
||||
final String actual1 = new StringBlock(new byte[] {(byte) 0xDF, (byte) 0xBF}, true).decodeString(0, 2);
|
||||
assertEquals("Incorrect decoding", "\u07FF", actual1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void decodeThreeOctets() {
|
||||
final String actual0 = new StringBlock(new byte[] { (byte) 0xE0, (byte) 0xA0, (byte) 0x80}, true).decodeString(0, 3);
|
||||
final String actual0 = new StringBlock(new byte[] {(byte) 0xE0, (byte) 0xA0, (byte) 0x80}, true).decodeString(0, 3);
|
||||
assertEquals("Incorrect decoding", "\u0800", actual0);
|
||||
|
||||
final String actual1 = new StringBlock(new byte[] { (byte) 0xEF, (byte) 0xBF, (byte) 0xBF}, true).decodeString(0, 3);
|
||||
final String actual1 = new StringBlock(new byte[] {(byte) 0xEF, (byte) 0xBF, (byte) 0xBF}, true).decodeString(0, 3);
|
||||
assertEquals("Incorrect decoding", "\uFFFF", actual1);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void decodeSurrogatePair_when_givesAsThreeOctetsFromInvalidRangeOfUtf8() {
|
||||
// See: https://github.com/iBotPeaches/Apktool/issues/2299
|
||||
final String actual = new StringBlock(new byte[] { (byte) 0xED, (byte) 0xA0, (byte) 0xBD, (byte) 0xED, (byte) 0xB4, (byte) 0x86}, true).decodeString(0, 6);
|
||||
final String actual = new StringBlock(new byte[] {(byte) 0xED, (byte) 0xA0, (byte) 0xBD, (byte) 0xED, (byte) 0xB4, (byte) 0x86}, true).decodeString(0, 6);
|
||||
assertEquals("Incorrect decoding", "\uD83D\uDD06", actual);
|
||||
|
||||
// See: https://github.com/iBotPeaches/Apktool/issues/2546
|
||||
@ -74,7 +74,7 @@ public class StringBlockWithSurrogatePairInUtf8Test {
|
||||
// \u10FFFF is encoded in UTF-8 as "0xDBFF 0xDFFF" (4-byte encoding),
|
||||
// but when used in Android resources which are encoded in UTF-8, 3-byte encoding is used,
|
||||
// so each of these is encoded as 3-bytes
|
||||
final String actual = new StringBlock(new byte[] { (byte) 0xED, (byte) 0xAF, (byte) 0xBF, (byte) 0xED, (byte) 0xBF, (byte) 0xBF}, true).decodeString(0, 6);
|
||||
final String actual = new StringBlock(new byte[] {(byte) 0xED, (byte) 0xAF, (byte) 0xBF, (byte) 0xED, (byte) 0xBF, (byte) 0xBF}, true).decodeString(0, 6);
|
||||
assertEquals("Incorrect decoding", "\uDBFF\uDFFF", actual);
|
||||
}
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ public class OS {
|
||||
}
|
||||
|
||||
public static void rmfile(String file) {
|
||||
File del = new File(file);
|
||||
File del = new File(file);
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
del.delete();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user