Add decompiled APK source code (JADX)

- 28,932 files
- Full Java source code
- Smali files
- Resources

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-02-18 14:52:23 -08:00
parent cc210a65ea
commit f9d20bb3fc
26991 changed files with 2541449 additions and 0 deletions

View File

@@ -0,0 +1,135 @@
package com.google.zxing.common;
import java.util.Arrays;
/* loaded from: classes3.dex */
public final class BitArray implements Cloneable {
public int[] bits;
public int size;
public int getSize() {
return this.size;
}
public BitArray() {
this.size = 0;
this.bits = new int[1];
}
public BitArray(int[] iArr, int i) {
this.bits = iArr;
this.size = i;
}
public int getSizeInBytes() {
return (this.size + 7) / 8;
}
public final void ensureCapacity(int i) {
if (i > (this.bits.length << 5)) {
int[] makeArray = makeArray(i);
int[] iArr = this.bits;
System.arraycopy(iArr, 0, makeArray, 0, iArr.length);
this.bits = makeArray;
}
}
public boolean get(int i) {
return ((1 << (i & 31)) & this.bits[i / 32]) != 0;
}
public void appendBit(boolean z) {
ensureCapacity(this.size + 1);
if (z) {
int[] iArr = this.bits;
int i = this.size;
int i2 = i / 32;
iArr[i2] = (1 << (i & 31)) | iArr[i2];
}
this.size++;
}
public void appendBits(int i, int i2) {
if (i2 < 0 || i2 > 32) {
throw new IllegalArgumentException("Num bits must be between 0 and 32");
}
ensureCapacity(this.size + i2);
while (i2 > 0) {
boolean z = true;
if (((i >> (i2 - 1)) & 1) != 1) {
z = false;
}
appendBit(z);
i2--;
}
}
public void appendBitArray(BitArray bitArray) {
int i = bitArray.size;
ensureCapacity(this.size + i);
for (int i2 = 0; i2 < i; i2++) {
appendBit(bitArray.get(i2));
}
}
public void xor(BitArray bitArray) {
if (this.size != bitArray.size) {
throw new IllegalArgumentException("Sizes don't match");
}
int i = 0;
while (true) {
int[] iArr = this.bits;
if (i >= iArr.length) {
return;
}
iArr[i] = iArr[i] ^ bitArray.bits[i];
i++;
}
}
public void toBytes(int i, byte[] bArr, int i2, int i3) {
for (int i4 = 0; i4 < i3; i4++) {
int i5 = 0;
for (int i6 = 0; i6 < 8; i6++) {
if (get(i)) {
i5 |= 1 << (7 - i6);
}
i++;
}
bArr[i2 + i4] = (byte) i5;
}
}
public static int[] makeArray(int i) {
return new int[(i + 31) / 32];
}
public boolean equals(Object obj) {
if (!(obj instanceof BitArray)) {
return false;
}
BitArray bitArray = (BitArray) obj;
return this.size == bitArray.size && Arrays.equals(this.bits, bitArray.bits);
}
public int hashCode() {
return (this.size * 31) + Arrays.hashCode(this.bits);
}
public String toString() {
int i = this.size;
StringBuilder sb = new StringBuilder(i + (i / 8) + 1);
for (int i2 = 0; i2 < this.size; i2++) {
if ((i2 & 7) == 0) {
sb.append(' ');
}
sb.append(get(i2) ? 'X' : '.');
}
return sb.toString();
}
/* renamed from: clone, reason: merged with bridge method [inline-methods] */
public BitArray m858clone() {
return new BitArray((int[]) this.bits.clone(), this.size);
}
}

View File

@@ -0,0 +1,118 @@
package com.google.zxing.common;
import java.util.Arrays;
/* loaded from: classes3.dex */
public final class BitMatrix implements Cloneable {
public final int[] bits;
public final int height;
public final int rowSize;
public final int width;
public int getHeight() {
return this.height;
}
public int getWidth() {
return this.width;
}
public BitMatrix(int i) {
this(i, i);
}
public BitMatrix(int i, int i2) {
if (i <= 0 || i2 <= 0) {
throw new IllegalArgumentException("Both dimensions must be greater than 0");
}
this.width = i;
this.height = i2;
int i3 = (i + 31) / 32;
this.rowSize = i3;
this.bits = new int[i3 * i2];
}
public BitMatrix(int i, int i2, int i3, int[] iArr) {
this.width = i;
this.height = i2;
this.rowSize = i3;
this.bits = iArr;
}
public boolean get(int i, int i2) {
return ((this.bits[(i2 * this.rowSize) + (i / 32)] >>> (i & 31)) & 1) != 0;
}
public void set(int i, int i2) {
int i3 = (i2 * this.rowSize) + (i / 32);
int[] iArr = this.bits;
iArr[i3] = (1 << (i & 31)) | iArr[i3];
}
public void clear() {
int length = this.bits.length;
for (int i = 0; i < length; i++) {
this.bits[i] = 0;
}
}
public void setRegion(int i, int i2, int i3, int i4) {
if (i2 < 0 || i < 0) {
throw new IllegalArgumentException("Left and top must be nonnegative");
}
if (i4 <= 0 || i3 <= 0) {
throw new IllegalArgumentException("Height and width must be at least 1");
}
int i5 = i3 + i;
int i6 = i4 + i2;
if (i6 > this.height || i5 > this.width) {
throw new IllegalArgumentException("The region must fit inside the matrix");
}
while (i2 < i6) {
int i7 = this.rowSize * i2;
for (int i8 = i; i8 < i5; i8++) {
int[] iArr = this.bits;
int i9 = (i8 / 32) + i7;
iArr[i9] = iArr[i9] | (1 << (i8 & 31));
}
i2++;
}
}
public boolean equals(Object obj) {
if (!(obj instanceof BitMatrix)) {
return false;
}
BitMatrix bitMatrix = (BitMatrix) obj;
return this.width == bitMatrix.width && this.height == bitMatrix.height && this.rowSize == bitMatrix.rowSize && Arrays.equals(this.bits, bitMatrix.bits);
}
public int hashCode() {
int i = this.width;
return (((((((i * 31) + i) * 31) + this.height) * 31) + this.rowSize) * 31) + Arrays.hashCode(this.bits);
}
public String toString() {
return toString("X ", " ");
}
public String toString(String str, String str2) {
return buildToString(str, str2, "\n");
}
public final String buildToString(String str, String str2, String str3) {
StringBuilder sb = new StringBuilder(this.height * (this.width + 1));
for (int i = 0; i < this.height; i++) {
for (int i2 = 0; i2 < this.width; i2++) {
sb.append(get(i2, i) ? str : str2);
}
sb.append(str3);
}
return sb.toString();
}
/* renamed from: clone, reason: merged with bridge method [inline-methods] */
public BitMatrix m859clone() {
return new BitMatrix(this.width, this.height, this.rowSize, (int[]) this.bits.clone());
}
}

View File

@@ -0,0 +1,82 @@
package com.google.zxing.common;
import com.google.zxing.FormatException;
import java.util.HashMap;
import java.util.Map;
/* loaded from: classes3.dex */
public enum CharacterSetECI {
Cp437(new int[]{0, 2}, new String[0]),
ISO8859_1(new int[]{1, 3}, "ISO-8859-1"),
ISO8859_2(4, "ISO-8859-2"),
ISO8859_3(5, "ISO-8859-3"),
ISO8859_4(6, "ISO-8859-4"),
ISO8859_5(7, "ISO-8859-5"),
ISO8859_6(8, "ISO-8859-6"),
ISO8859_7(9, "ISO-8859-7"),
ISO8859_8(10, "ISO-8859-8"),
ISO8859_9(11, "ISO-8859-9"),
ISO8859_10(12, "ISO-8859-10"),
ISO8859_11(13, "ISO-8859-11"),
ISO8859_13(15, "ISO-8859-13"),
ISO8859_14(16, "ISO-8859-14"),
ISO8859_15(17, "ISO-8859-15"),
ISO8859_16(18, "ISO-8859-16"),
SJIS(20, "Shift_JIS"),
Cp1250(21, "windows-1250"),
Cp1251(22, "windows-1251"),
Cp1252(23, "windows-1252"),
Cp1256(24, "windows-1256"),
UnicodeBigUnmarked(25, "UTF-16BE", "UnicodeBig"),
UTF8(26, "UTF-8"),
ASCII(new int[]{27, 170}, "US-ASCII"),
Big5(28),
GB18030(29, "GB2312", "EUC_CN", "GBK"),
EUC_KR(30, "EUC-KR");
private final String[] otherEncodingNames;
private final int[] values;
private static final Map<Integer, CharacterSetECI> VALUE_TO_ECI = new HashMap();
private static final Map<String, CharacterSetECI> NAME_TO_ECI = new HashMap();
static {
for (CharacterSetECI characterSetECI : values()) {
for (int i : characterSetECI.values) {
VALUE_TO_ECI.put(Integer.valueOf(i), characterSetECI);
}
NAME_TO_ECI.put(characterSetECI.name(), characterSetECI);
for (String str : characterSetECI.otherEncodingNames) {
NAME_TO_ECI.put(str, characterSetECI);
}
}
}
CharacterSetECI(int i) {
this(new int[]{i}, new String[0]);
}
CharacterSetECI(int i, String... strArr) {
this.values = new int[]{i};
this.otherEncodingNames = strArr;
}
CharacterSetECI(int[] iArr, String... strArr) {
this.values = iArr;
this.otherEncodingNames = strArr;
}
public int getValue() {
return this.values[0];
}
public static CharacterSetECI getCharacterSetECIByValue(int i) throws FormatException {
if (i < 0 || i >= 900) {
throw FormatException.getFormatInstance();
}
return VALUE_TO_ECI.get(Integer.valueOf(i));
}
public static CharacterSetECI getCharacterSetECIByName(String str) {
return NAME_TO_ECI.get(str);
}
}

View File

@@ -0,0 +1,109 @@
package com.google.zxing.common.reedsolomon;
import com.ironsource.mediationsdk.logger.IronSourceError;
/* loaded from: classes3.dex */
public final class GenericGF {
public static final GenericGF AZTEC_DATA_6;
public static final GenericGF AZTEC_DATA_8;
public static final GenericGF AZTEC_PARAM;
public static final GenericGF DATA_MATRIX_FIELD_256;
public static final GenericGF MAXICODE_FIELD_64;
public static final GenericGF QR_CODE_FIELD_256;
public final int[] expTable;
public final int generatorBase;
public final int[] logTable;
public final GenericGFPoly one;
public final int primitive;
public final int size;
public final GenericGFPoly zero;
public static final GenericGF AZTEC_DATA_12 = new GenericGF(4201, 4096, 1);
public static final GenericGF AZTEC_DATA_10 = new GenericGF(IronSourceError.ERROR_RV_LOAD_FAIL_DUE_TO_INIT, 1024, 1);
public static int addOrSubtract(int i, int i2) {
return i ^ i2;
}
public int getGeneratorBase() {
return this.generatorBase;
}
public GenericGFPoly getZero() {
return this.zero;
}
static {
GenericGF genericGF = new GenericGF(67, 64, 1);
AZTEC_DATA_6 = genericGF;
AZTEC_PARAM = new GenericGF(19, 16, 1);
QR_CODE_FIELD_256 = new GenericGF(285, 256, 0);
GenericGF genericGF2 = new GenericGF(301, 256, 1);
DATA_MATRIX_FIELD_256 = genericGF2;
AZTEC_DATA_8 = genericGF2;
MAXICODE_FIELD_64 = genericGF;
}
public GenericGF(int i, int i2, int i3) {
this.primitive = i;
this.size = i2;
this.generatorBase = i3;
this.expTable = new int[i2];
this.logTable = new int[i2];
int i4 = 1;
for (int i5 = 0; i5 < i2; i5++) {
this.expTable[i5] = i4;
i4 <<= 1;
if (i4 >= i2) {
i4 = (i4 ^ i) & (i2 - 1);
}
}
for (int i6 = 0; i6 < i2 - 1; i6++) {
this.logTable[this.expTable[i6]] = i6;
}
this.zero = new GenericGFPoly(this, new int[]{0});
this.one = new GenericGFPoly(this, new int[]{1});
}
public GenericGFPoly buildMonomial(int i, int i2) {
if (i < 0) {
throw new IllegalArgumentException();
}
if (i2 == 0) {
return this.zero;
}
int[] iArr = new int[i + 1];
iArr[0] = i2;
return new GenericGFPoly(this, iArr);
}
public int exp(int i) {
return this.expTable[i];
}
public int log(int i) {
if (i == 0) {
throw new IllegalArgumentException();
}
return this.logTable[i];
}
public int inverse(int i) {
if (i == 0) {
throw new ArithmeticException();
}
return this.expTable[(this.size - this.logTable[i]) - 1];
}
public int multiply(int i, int i2) {
if (i == 0 || i2 == 0) {
return 0;
}
int[] iArr = this.expTable;
int[] iArr2 = this.logTable;
return iArr[(iArr2[i] + iArr2[i2]) % (this.size - 1)];
}
public String toString() {
return "GF(0x" + Integer.toHexString(this.primitive) + ',' + this.size + ')';
}
}

View File

@@ -0,0 +1,163 @@
package com.google.zxing.common.reedsolomon;
/* loaded from: classes3.dex */
public final class GenericGFPoly {
public final int[] coefficients;
public final GenericGF field;
public int[] getCoefficients() {
return this.coefficients;
}
public GenericGFPoly(GenericGF genericGF, int[] iArr) {
if (iArr.length == 0) {
throw new IllegalArgumentException();
}
this.field = genericGF;
int length = iArr.length;
int i = 1;
if (length <= 1 || iArr[0] != 0) {
this.coefficients = iArr;
return;
}
while (i < length && iArr[i] == 0) {
i++;
}
if (i == length) {
this.coefficients = new int[]{0};
return;
}
int[] iArr2 = new int[length - i];
this.coefficients = iArr2;
System.arraycopy(iArr, i, iArr2, 0, iArr2.length);
}
public int getDegree() {
return this.coefficients.length - 1;
}
public boolean isZero() {
return this.coefficients[0] == 0;
}
public int getCoefficient(int i) {
return this.coefficients[(r0.length - 1) - i];
}
public GenericGFPoly addOrSubtract(GenericGFPoly genericGFPoly) {
if (!this.field.equals(genericGFPoly.field)) {
throw new IllegalArgumentException("GenericGFPolys do not have same GenericGF field");
}
if (isZero()) {
return genericGFPoly;
}
if (genericGFPoly.isZero()) {
return this;
}
int[] iArr = this.coefficients;
int[] iArr2 = genericGFPoly.coefficients;
if (iArr.length <= iArr2.length) {
iArr = iArr2;
iArr2 = iArr;
}
int[] iArr3 = new int[iArr.length];
int length = iArr.length - iArr2.length;
System.arraycopy(iArr, 0, iArr3, 0, length);
for (int i = length; i < iArr.length; i++) {
iArr3[i] = GenericGF.addOrSubtract(iArr2[i - length], iArr[i]);
}
return new GenericGFPoly(this.field, iArr3);
}
public GenericGFPoly multiply(GenericGFPoly genericGFPoly) {
if (!this.field.equals(genericGFPoly.field)) {
throw new IllegalArgumentException("GenericGFPolys do not have same GenericGF field");
}
if (isZero() || genericGFPoly.isZero()) {
return this.field.getZero();
}
int[] iArr = this.coefficients;
int length = iArr.length;
int[] iArr2 = genericGFPoly.coefficients;
int length2 = iArr2.length;
int[] iArr3 = new int[(length + length2) - 1];
for (int i = 0; i < length; i++) {
int i2 = iArr[i];
for (int i3 = 0; i3 < length2; i3++) {
int i4 = i + i3;
iArr3[i4] = GenericGF.addOrSubtract(iArr3[i4], this.field.multiply(i2, iArr2[i3]));
}
}
return new GenericGFPoly(this.field, iArr3);
}
public GenericGFPoly multiplyByMonomial(int i, int i2) {
if (i < 0) {
throw new IllegalArgumentException();
}
if (i2 == 0) {
return this.field.getZero();
}
int length = this.coefficients.length;
int[] iArr = new int[i + length];
for (int i3 = 0; i3 < length; i3++) {
iArr[i3] = this.field.multiply(this.coefficients[i3], i2);
}
return new GenericGFPoly(this.field, iArr);
}
public GenericGFPoly[] divide(GenericGFPoly genericGFPoly) {
if (!this.field.equals(genericGFPoly.field)) {
throw new IllegalArgumentException("GenericGFPolys do not have same GenericGF field");
}
if (genericGFPoly.isZero()) {
throw new IllegalArgumentException("Divide by 0");
}
GenericGFPoly zero = this.field.getZero();
int inverse = this.field.inverse(genericGFPoly.getCoefficient(genericGFPoly.getDegree()));
GenericGFPoly genericGFPoly2 = this;
while (genericGFPoly2.getDegree() >= genericGFPoly.getDegree() && !genericGFPoly2.isZero()) {
int degree = genericGFPoly2.getDegree() - genericGFPoly.getDegree();
int multiply = this.field.multiply(genericGFPoly2.getCoefficient(genericGFPoly2.getDegree()), inverse);
GenericGFPoly multiplyByMonomial = genericGFPoly.multiplyByMonomial(degree, multiply);
zero = zero.addOrSubtract(this.field.buildMonomial(degree, multiply));
genericGFPoly2 = genericGFPoly2.addOrSubtract(multiplyByMonomial);
}
return new GenericGFPoly[]{zero, genericGFPoly2};
}
public String toString() {
StringBuilder sb = new StringBuilder(getDegree() * 8);
for (int degree = getDegree(); degree >= 0; degree--) {
int coefficient = getCoefficient(degree);
if (coefficient != 0) {
if (coefficient < 0) {
sb.append(" - ");
coefficient = -coefficient;
} else if (sb.length() > 0) {
sb.append(" + ");
}
if (degree == 0 || coefficient != 1) {
int log = this.field.log(coefficient);
if (log == 0) {
sb.append('1');
} else if (log == 1) {
sb.append('a');
} else {
sb.append("a^");
sb.append(log);
}
}
if (degree != 0) {
if (degree == 1) {
sb.append('x');
} else {
sb.append("x^");
sb.append(degree);
}
}
}
}
return sb.toString();
}
}

View File

@@ -0,0 +1,49 @@
package com.google.zxing.common.reedsolomon;
import java.util.ArrayList;
import java.util.List;
/* loaded from: classes3.dex */
public final class ReedSolomonEncoder {
public final List cachedGenerators;
public final GenericGF field;
public ReedSolomonEncoder(GenericGF genericGF) {
this.field = genericGF;
ArrayList arrayList = new ArrayList();
this.cachedGenerators = arrayList;
arrayList.add(new GenericGFPoly(genericGF, new int[]{1}));
}
public final GenericGFPoly buildGenerator(int i) {
if (i >= this.cachedGenerators.size()) {
List list = this.cachedGenerators;
GenericGFPoly genericGFPoly = (GenericGFPoly) list.get(list.size() - 1);
for (int size = this.cachedGenerators.size(); size <= i; size++) {
GenericGF genericGF = this.field;
genericGFPoly = genericGFPoly.multiply(new GenericGFPoly(genericGF, new int[]{1, genericGF.exp((size - 1) + genericGF.getGeneratorBase())}));
this.cachedGenerators.add(genericGFPoly);
}
}
return (GenericGFPoly) this.cachedGenerators.get(i);
}
public void encode(int[] iArr, int i) {
if (i == 0) {
throw new IllegalArgumentException("No error correction bytes");
}
int length = iArr.length - i;
if (length <= 0) {
throw new IllegalArgumentException("No data bytes provided");
}
GenericGFPoly buildGenerator = buildGenerator(i);
int[] iArr2 = new int[length];
System.arraycopy(iArr, 0, iArr2, 0, length);
int[] coefficients = new GenericGFPoly(this.field, iArr2).multiplyByMonomial(i, 1).divide(buildGenerator)[1].getCoefficients();
int length2 = i - coefficients.length;
for (int i2 = 0; i2 < length2; i2++) {
iArr[length + i2] = 0;
}
System.arraycopy(coefficients, 0, iArr, length + length2, coefficients.length);
}
}