Add Discord APKTool decompilation (Smali source for modding)

- Imported from https://github.com/supermegamestre/Project-Real-Resurrection-3
- APKTool decompilation (Smali bytecode) for modding and rebuilding APK
- Supports both 32-bit (armeabi-v7a) and 64-bit (arm64-v8a) architectures
- Includes full Smali source, resources, and native libraries
- Ready to rebuild APK after modifications with apktool b command
- Added comprehensive README-apktool.md with modding guide

This branch complements the JADX branches:
- Use JADX (main/discord-community) to UNDERSTAND code (readable Java)
- Use APKTool (this branch) to MODIFY and REBUILD APK (editable Smali)

Total: 44,417 files, 538.51 MB Smali source code
This commit is contained in:
2026-02-18 16:13:44 -08:00
parent c080f0d97f
commit f3960ee359
44288 changed files with 10998761 additions and 0 deletions

View File

@@ -0,0 +1,274 @@
.class public final Lcom/google/zxing/qrcode/QRCodeWriter;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/google/zxing/Writer;
# direct methods
.method public constructor <init>()V
.locals 0
.line 36
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
.method public static renderResult(Lcom/google/zxing/qrcode/encoder/QRCode;III)Lcom/google/zxing/common/BitMatrix;
.locals 9
.line 85
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/QRCode;->getMatrix()Lcom/google/zxing/qrcode/encoder/ByteMatrix;
move-result-object p0
if-eqz p0, :cond_3
.line 89
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v0
.line 90
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v1
const/4 v2, 0x1
shl-int/2addr p3, v2
add-int v3, v0, p3
add-int/2addr p3, v1
.line 93
invoke-static {p1, v3}, Ljava/lang/Math;->max(II)I
move-result p1
.line 94
invoke-static {p2, p3}, Ljava/lang/Math;->max(II)I
move-result p2
.line 96
div-int v3, p1, v3
div-int p3, p2, p3
invoke-static {v3, p3}, Ljava/lang/Math;->min(II)I
move-result p3
mul-int v3, v0, p3
sub-int v3, p1, v3
.line 101
div-int/lit8 v3, v3, 0x2
mul-int v4, v1, p3
sub-int v4, p2, v4
.line 102
div-int/lit8 v4, v4, 0x2
.line 104
new-instance v5, Lcom/google/zxing/common/BitMatrix;
invoke-direct {v5, p1, p2}, Lcom/google/zxing/common/BitMatrix;-><init>(II)V
const/4 p1, 0x0
move p2, p1
:goto_0
if-ge p2, v1, :cond_2
move v6, p1
move v7, v3
:goto_1
if-ge v6, v0, :cond_1
.line 109
invoke-virtual {p0, v6, p2}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->get(II)B
move-result v8
if-ne v8, v2, :cond_0
.line 110
invoke-virtual {v5, v7, v4, p3, p3}, Lcom/google/zxing/common/BitMatrix;->setRegion(IIII)V
:cond_0
add-int/lit8 v6, v6, 0x1
add-int/2addr v7, p3
goto :goto_1
:cond_1
add-int/lit8 p2, p2, 0x1
add-int/2addr v4, p3
goto :goto_0
:cond_2
return-object v5
.line 87
:cond_3
new-instance p0, Ljava/lang/IllegalStateException;
invoke-direct {p0}, Ljava/lang/IllegalStateException;-><init>()V
throw p0
.end method
# virtual methods
.method public encode(Ljava/lang/String;Lcom/google/zxing/BarcodeFormat;IILjava/util/Map;)Lcom/google/zxing/common/BitMatrix;
.locals 3
.line 54
invoke-virtual {p1}, Ljava/lang/String;->isEmpty()Z
move-result v0
if-nez v0, :cond_4
.line 58
sget-object v0, Lcom/google/zxing/BarcodeFormat;->QR_CODE:Lcom/google/zxing/BarcodeFormat;
if-ne p2, v0, :cond_3
if-ltz p3, :cond_2
if-ltz p4, :cond_2
.line 67
sget-object p2, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->L:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
const/4 v0, 0x4
if-eqz p5, :cond_1
.line 70
sget-object v1, Lcom/google/zxing/EncodeHintType;->ERROR_CORRECTION:Lcom/google/zxing/EncodeHintType;
invoke-interface {p5, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_0
.line 71
invoke-interface {p5, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object p2
invoke-virtual {p2}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p2
invoke-static {p2}, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->valueOf(Ljava/lang/String;)Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
move-result-object p2
.line 73
:cond_0
sget-object v1, Lcom/google/zxing/EncodeHintType;->MARGIN:Lcom/google/zxing/EncodeHintType;
invoke-interface {p5, v1}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
move-result v2
if-eqz v2, :cond_1
.line 74
invoke-interface {p5, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
.line 78
:cond_1
invoke-static {p1, p2, p5}, Lcom/google/zxing/qrcode/encoder/Encoder;->encode(Ljava/lang/String;Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;Ljava/util/Map;)Lcom/google/zxing/qrcode/encoder/QRCode;
move-result-object p1
.line 79
invoke-static {p1, p3, p4, v0}, Lcom/google/zxing/qrcode/QRCodeWriter;->renderResult(Lcom/google/zxing/qrcode/encoder/QRCode;III)Lcom/google/zxing/common/BitMatrix;
move-result-object p1
return-object p1
.line 63
:cond_2
new-instance p1, Ljava/lang/IllegalArgumentException;
new-instance p2, Ljava/lang/StringBuilder;
const-string p5, "Requested dimensions are too small: "
invoke-direct {p2, p5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const/16 p3, 0x78
invoke-virtual {p2, p3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
invoke-virtual {p2, p4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.line 59
:cond_3
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-static {p2}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;
move-result-object p2
const-string p3, "Can only encode QR_CODE, but got "
invoke-virtual {p3, p2}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p2
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.line 55
:cond_4
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Found empty contents"
invoke-direct {p1, p2}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
.end method

View File

@@ -0,0 +1,167 @@
.class public final enum Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.super Ljava/lang/Enum;
.source "SourceFile"
# static fields
.field private static final synthetic $VALUES:[Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.field private static final FOR_BITS:[Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.field public static final enum H:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.field public static final enum L:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.field public static final enum M:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.field public static final enum Q:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
# instance fields
.field private final bits:I
# direct methods
.method static constructor <clinit>()V
.locals 7
.line 28
new-instance v0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
const-string v1, "L"
const/4 v2, 0x0
const/4 v3, 0x1
invoke-direct {v0, v1, v2, v3}, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;-><init>(Ljava/lang/String;II)V
sput-object v0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->L:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.line 30
new-instance v1, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
const-string v4, "M"
invoke-direct {v1, v4, v3, v2}, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;-><init>(Ljava/lang/String;II)V
sput-object v1, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->M:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.line 32
new-instance v2, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
const-string v3, "Q"
const/4 v4, 0x2
const/4 v5, 0x3
invoke-direct {v2, v3, v4, v5}, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;-><init>(Ljava/lang/String;II)V
sput-object v2, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->Q:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.line 34
new-instance v3, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
const-string v6, "H"
invoke-direct {v3, v6, v5, v4}, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;-><init>(Ljava/lang/String;II)V
sput-object v3, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->H:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
filled-new-array {v0, v1, v2, v3}, [Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
move-result-object v4
sput-object v4, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->$VALUES:[Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
filled-new-array {v1, v0, v3, v2}, [Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
move-result-object v0
sput-object v0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->FOR_BITS:[Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
return-void
.end method
.method private constructor <init>(Ljava/lang/String;II)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"(I)V"
}
.end annotation
.line 40
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
iput p3, p0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->bits:I
return-void
.end method
.method public static forBits(I)Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.locals 2
if-ltz p0, :cond_0
sget-object v0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->FOR_BITS:[Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.line 53
array-length v1, v0
if-ge p0, v1, :cond_0
.line 56
aget-object p0, v0, p0
return-object p0
.line 54
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
throw p0
.end method
.method public static valueOf(Ljava/lang/String;)Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.locals 1
const-class v0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.line 25
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
move-result-object p0
check-cast p0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
return-object p0
.end method
.method public static values()[Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.locals 1
sget-object v0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->$VALUES:[Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.line 25
invoke-virtual {v0}, [Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
return-object v0
.end method
# virtual methods
.method public getBits()I
.locals 1
iget v0, p0, Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;->bits:I
return v0
.end method

View File

@@ -0,0 +1,425 @@
.class public final enum Lcom/google/zxing/qrcode/decoder/Mode;
.super Ljava/lang/Enum;
.source "SourceFile"
# static fields
.field private static final synthetic $VALUES:[Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum ALPHANUMERIC:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum BYTE:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum ECI:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum FNC1_FIRST_POSITION:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum FNC1_SECOND_POSITION:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum HANZI:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum KANJI:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum NUMERIC:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum STRUCTURED_APPEND:Lcom/google/zxing/qrcode/decoder/Mode;
.field public static final enum TERMINATOR:Lcom/google/zxing/qrcode/decoder/Mode;
# instance fields
.field private final bits:I
.field private final characterCountBitsForVersions:[I
# direct methods
.method static constructor <clinit>()V
.locals 16
.line 27
new-instance v0, Lcom/google/zxing/qrcode/decoder/Mode;
const/4 v1, 0x0
filled-new-array {v1, v1, v1}, [I
move-result-object v2
const-string v3, "TERMINATOR"
invoke-direct {v0, v3, v1, v2, v1}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v0, Lcom/google/zxing/qrcode/decoder/Mode;->TERMINATOR:Lcom/google/zxing/qrcode/decoder/Mode;
.line 28
new-instance v2, Lcom/google/zxing/qrcode/decoder/Mode;
const/16 v3, 0xe
const/16 v4, 0xa
const/16 v5, 0xc
filled-new-array {v4, v5, v3}, [I
move-result-object v3
const-string v6, "NUMERIC"
const/4 v7, 0x1
invoke-direct {v2, v6, v7, v3, v7}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v2, Lcom/google/zxing/qrcode/decoder/Mode;->NUMERIC:Lcom/google/zxing/qrcode/decoder/Mode;
.line 29
new-instance v3, Lcom/google/zxing/qrcode/decoder/Mode;
const/16 v6, 0x9
const/16 v7, 0xb
const/16 v8, 0xd
filled-new-array {v6, v7, v8}, [I
move-result-object v7
const-string v9, "ALPHANUMERIC"
const/4 v10, 0x2
invoke-direct {v3, v9, v10, v7, v10}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v3, Lcom/google/zxing/qrcode/decoder/Mode;->ALPHANUMERIC:Lcom/google/zxing/qrcode/decoder/Mode;
.line 30
new-instance v7, Lcom/google/zxing/qrcode/decoder/Mode;
const/4 v9, 0x3
filled-new-array {v1, v1, v1}, [I
move-result-object v10
const-string v11, "STRUCTURED_APPEND"
invoke-direct {v7, v11, v9, v10, v9}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v7, Lcom/google/zxing/qrcode/decoder/Mode;->STRUCTURED_APPEND:Lcom/google/zxing/qrcode/decoder/Mode;
.line 31
new-instance v9, Lcom/google/zxing/qrcode/decoder/Mode;
const/16 v10, 0x10
const/16 v11, 0x8
filled-new-array {v11, v10, v10}, [I
move-result-object v10
const-string v12, "BYTE"
const/4 v13, 0x4
invoke-direct {v9, v12, v13, v10, v13}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v9, Lcom/google/zxing/qrcode/decoder/Mode;->BYTE:Lcom/google/zxing/qrcode/decoder/Mode;
.line 32
new-instance v10, Lcom/google/zxing/qrcode/decoder/Mode;
filled-new-array {v1, v1, v1}, [I
move-result-object v12
const-string v13, "ECI"
const/4 v14, 0x5
const/4 v15, 0x7
invoke-direct {v10, v13, v14, v12, v15}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v10, Lcom/google/zxing/qrcode/decoder/Mode;->ECI:Lcom/google/zxing/qrcode/decoder/Mode;
.line 33
new-instance v12, Lcom/google/zxing/qrcode/decoder/Mode;
const/4 v13, 0x6
filled-new-array {v11, v4, v5}, [I
move-result-object v8
const-string v4, "KANJI"
invoke-direct {v12, v4, v13, v8, v11}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v12, Lcom/google/zxing/qrcode/decoder/Mode;->KANJI:Lcom/google/zxing/qrcode/decoder/Mode;
.line 34
new-instance v8, Lcom/google/zxing/qrcode/decoder/Mode;
const-string v4, "FNC1_FIRST_POSITION"
filled-new-array {v1, v1, v1}, [I
move-result-object v13
invoke-direct {v8, v4, v15, v13, v14}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v8, Lcom/google/zxing/qrcode/decoder/Mode;->FNC1_FIRST_POSITION:Lcom/google/zxing/qrcode/decoder/Mode;
.line 35
new-instance v13, Lcom/google/zxing/qrcode/decoder/Mode;
const-string v4, "FNC1_SECOND_POSITION"
filled-new-array {v1, v1, v1}, [I
move-result-object v1
invoke-direct {v13, v4, v11, v1, v6}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v13, Lcom/google/zxing/qrcode/decoder/Mode;->FNC1_SECOND_POSITION:Lcom/google/zxing/qrcode/decoder/Mode;
.line 37
new-instance v14, Lcom/google/zxing/qrcode/decoder/Mode;
const-string v1, "HANZI"
const/16 v4, 0xa
filled-new-array {v11, v4, v5}, [I
move-result-object v4
const/16 v5, 0xd
invoke-direct {v14, v1, v6, v4, v5}, Lcom/google/zxing/qrcode/decoder/Mode;-><init>(Ljava/lang/String;I[II)V
sput-object v14, Lcom/google/zxing/qrcode/decoder/Mode;->HANZI:Lcom/google/zxing/qrcode/decoder/Mode;
move-object v1, v2
move-object v2, v3
move-object v3, v7
move-object v4, v9
move-object v5, v10
move-object v6, v12
move-object v7, v8
move-object v8, v13
move-object v9, v14
filled-new-array/range {v0 .. v9}, [Lcom/google/zxing/qrcode/decoder/Mode;
move-result-object v0
sput-object v0, Lcom/google/zxing/qrcode/decoder/Mode;->$VALUES:[Lcom/google/zxing/qrcode/decoder/Mode;
return-void
.end method
.method private constructor <init>(Ljava/lang/String;I[II)V
.locals 0
.annotation system Ldalvik/annotation/Signature;
value = {
"([II)V"
}
.end annotation
.line 42
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
iput-object p3, p0, Lcom/google/zxing/qrcode/decoder/Mode;->characterCountBitsForVersions:[I
iput p4, p0, Lcom/google/zxing/qrcode/decoder/Mode;->bits:I
return-void
.end method
.method public static forBits(I)Lcom/google/zxing/qrcode/decoder/Mode;
.locals 1
if-eqz p0, :cond_9
const/4 v0, 0x1
if-eq p0, v0, :cond_8
const/4 v0, 0x2
if-eq p0, v0, :cond_7
const/4 v0, 0x3
if-eq p0, v0, :cond_6
const/4 v0, 0x4
if-eq p0, v0, :cond_5
const/4 v0, 0x5
if-eq p0, v0, :cond_4
const/4 v0, 0x7
if-eq p0, v0, :cond_3
const/16 v0, 0x8
if-eq p0, v0, :cond_2
const/16 v0, 0x9
if-eq p0, v0, :cond_1
const/16 v0, 0xd
if-ne p0, v0, :cond_0
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->HANZI:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
.line 76
:cond_0
new-instance p0, Ljava/lang/IllegalArgumentException;
invoke-direct {p0}, Ljava/lang/IllegalArgumentException;-><init>()V
throw p0
:cond_1
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->FNC1_SECOND_POSITION:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
:cond_2
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->KANJI:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
:cond_3
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->ECI:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
:cond_4
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->FNC1_FIRST_POSITION:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
:cond_5
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->BYTE:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
:cond_6
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->STRUCTURED_APPEND:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
:cond_7
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->ALPHANUMERIC:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
:cond_8
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->NUMERIC:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
:cond_9
sget-object p0, Lcom/google/zxing/qrcode/decoder/Mode;->TERMINATOR:Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
.end method
.method public static valueOf(Ljava/lang/String;)Lcom/google/zxing/qrcode/decoder/Mode;
.locals 1
const-class v0, Lcom/google/zxing/qrcode/decoder/Mode;
.line 25
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
move-result-object p0
check-cast p0, Lcom/google/zxing/qrcode/decoder/Mode;
return-object p0
.end method
.method public static values()[Lcom/google/zxing/qrcode/decoder/Mode;
.locals 1
sget-object v0, Lcom/google/zxing/qrcode/decoder/Mode;->$VALUES:[Lcom/google/zxing/qrcode/decoder/Mode;
.line 25
invoke-virtual {v0}, [Lcom/google/zxing/qrcode/decoder/Mode;->clone()Ljava/lang/Object;
move-result-object v0
check-cast v0, [Lcom/google/zxing/qrcode/decoder/Mode;
return-object v0
.end method
# virtual methods
.method public getBits()I
.locals 1
iget v0, p0, Lcom/google/zxing/qrcode/decoder/Mode;->bits:I
return v0
.end method
.method public getCharacterCountBits(Lcom/google/zxing/qrcode/decoder/Version;)I
.locals 1
.line 86
invoke-virtual {p1}, Lcom/google/zxing/qrcode/decoder/Version;->getVersionNumber()I
move-result p1
const/16 v0, 0x9
if-gt p1, v0, :cond_0
const/4 p1, 0x0
goto :goto_0
:cond_0
const/16 v0, 0x1a
if-gt p1, v0, :cond_1
const/4 p1, 0x1
goto :goto_0
:cond_1
const/4 p1, 0x2
:goto_0
iget-object v0, p0, Lcom/google/zxing/qrcode/decoder/Mode;->characterCountBitsForVersions:[I
.line 95
aget p1, v0, p1
return p1
.end method

View File

@@ -0,0 +1,53 @@
.class public final Lcom/google/zxing/qrcode/decoder/Version$ECB;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/zxing/qrcode/decoder/Version;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ECB"
.end annotation
# instance fields
.field public final count:I
.field public final dataCodewords:I
# direct methods
.method public constructor <init>(II)V
.locals 0
.line 223
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput p1, p0, Lcom/google/zxing/qrcode/decoder/Version$ECB;->count:I
iput p2, p0, Lcom/google/zxing/qrcode/decoder/Version$ECB;->dataCodewords:I
return-void
.end method
# virtual methods
.method public getCount()I
.locals 1
iget v0, p0, Lcom/google/zxing/qrcode/decoder/Version$ECB;->count:I
return v0
.end method
.method public getDataCodewords()I
.locals 1
iget v0, p0, Lcom/google/zxing/qrcode/decoder/Version$ECB;->dataCodewords:I
return v0
.end method

View File

@@ -0,0 +1,100 @@
.class public final Lcom/google/zxing/qrcode/decoder/Version$ECBlocks;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/zxing/qrcode/decoder/Version;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x19
name = "ECBlocks"
.end annotation
# instance fields
.field public final ecBlocks:[Lcom/google/zxing/qrcode/decoder/Version$ECB;
.field public final ecCodewordsPerBlock:I
# direct methods
.method public varargs constructor <init>(I[Lcom/google/zxing/qrcode/decoder/Version$ECB;)V
.locals 0
.line 188
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput p1, p0, Lcom/google/zxing/qrcode/decoder/Version$ECBlocks;->ecCodewordsPerBlock:I
iput-object p2, p0, Lcom/google/zxing/qrcode/decoder/Version$ECBlocks;->ecBlocks:[Lcom/google/zxing/qrcode/decoder/Version$ECB;
return-void
.end method
# virtual methods
.method public getECBlocks()[Lcom/google/zxing/qrcode/decoder/Version$ECB;
.locals 1
iget-object v0, p0, Lcom/google/zxing/qrcode/decoder/Version$ECBlocks;->ecBlocks:[Lcom/google/zxing/qrcode/decoder/Version$ECB;
return-object v0
.end method
.method public getECCodewordsPerBlock()I
.locals 1
iget v0, p0, Lcom/google/zxing/qrcode/decoder/Version$ECBlocks;->ecCodewordsPerBlock:I
return v0
.end method
.method public getNumBlocks()I
.locals 5
iget-object v0, p0, Lcom/google/zxing/qrcode/decoder/Version$ECBlocks;->ecBlocks:[Lcom/google/zxing/qrcode/decoder/Version$ECB;
.line 199
array-length v1, v0
const/4 v2, 0x0
move v3, v2
:goto_0
if-ge v2, v1, :cond_0
aget-object v4, v0, v2
.line 200
invoke-virtual {v4}, Lcom/google/zxing/qrcode/decoder/Version$ECB;->getCount()I
move-result v4
add-int/2addr v3, v4
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
return v3
.end method
.method public getTotalECCodewords()I
.locals 2
iget v0, p0, Lcom/google/zxing/qrcode/decoder/Version$ECBlocks;->ecCodewordsPerBlock:I
.line 206
invoke-virtual {p0}, Lcom/google/zxing/qrcode/decoder/Version$ECBlocks;->getNumBlocks()I
move-result v1
mul-int/2addr v0, v1
return v0
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,42 @@
.class public final Lcom/google/zxing/qrcode/encoder/BlockPair;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public final dataBytes:[B
.field public final errorCorrectionBytes:[B
# direct methods
.method public constructor <init>([B[B)V
.locals 0
.line 24
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/google/zxing/qrcode/encoder/BlockPair;->dataBytes:[B
iput-object p2, p0, Lcom/google/zxing/qrcode/encoder/BlockPair;->errorCorrectionBytes:[B
return-void
.end method
# virtual methods
.method public getDataBytes()[B
.locals 1
iget-object v0, p0, Lcom/google/zxing/qrcode/encoder/BlockPair;->dataBytes:[B
return-object v0
.end method
.method public getErrorCorrectionBytes()[B
.locals 1
iget-object v0, p0, Lcom/google/zxing/qrcode/encoder/BlockPair;->errorCorrectionBytes:[B
return-object v0
.end method

View File

@@ -0,0 +1,229 @@
.class public final Lcom/google/zxing/qrcode/encoder/ByteMatrix;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public final bytes:[[B
.field public final height:I
.field public final width:I
# direct methods
.method public constructor <init>(II)V
.locals 2
.line 33
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
filled-new-array {p2, p1}, [I
move-result-object v0
sget-object v1, Ljava/lang/Byte;->TYPE:Ljava/lang/Class;
.line 34
invoke-static {v1, v0}, Ljava/lang/reflect/Array;->newInstance(Ljava/lang/Class;[I)Ljava/lang/Object;
move-result-object v0
check-cast v0, [[B
iput-object v0, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->bytes:[[B
iput p1, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->width:I
iput p2, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->height:I
return-void
.end method
# virtual methods
.method public clear(B)V
.locals 4
iget-object v0, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->bytes:[[B
.line 71
array-length v1, v0
const/4 v2, 0x0
:goto_0
if-ge v2, v1, :cond_0
aget-object v3, v0, v2
.line 72
invoke-static {v3, p1}, Ljava/util/Arrays;->fill([BB)V
add-int/lit8 v2, v2, 0x1
goto :goto_0
:cond_0
return-void
.end method
.method public get(II)B
.locals 1
iget-object v0, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->bytes:[[B
.line 48
aget-object p2, v0, p2
aget-byte p1, p2, p1
return p1
.end method
.method public getArray()[[B
.locals 1
iget-object v0, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->bytes:[[B
return-object v0
.end method
.method public getHeight()I
.locals 1
iget v0, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->height:I
return v0
.end method
.method public getWidth()I
.locals 1
iget v0, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->width:I
return v0
.end method
.method public set(III)V
.locals 1
iget-object v0, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->bytes:[[B
.line 63
aget-object p2, v0, p2
int-to-byte p3, p3
aput-byte p3, p2, p1
return-void
.end method
.method public set(IIZ)V
.locals 1
iget-object v0, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->bytes:[[B
.line 67
aget-object p2, v0, p2
int-to-byte p3, p3
aput-byte p3, p2, p1
return-void
.end method
.method public toString()Ljava/lang/String;
.locals 7
.line 78
new-instance v0, Ljava/lang/StringBuilder;
iget v1, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->width:I
mul-int/lit8 v1, v1, 0x2
iget v2, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->height:I
mul-int/2addr v1, v2
add-int/lit8 v1, v1, 0x2
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
const/4 v1, 0x0
move v2, v1
:goto_0
iget v3, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->height:I
if-ge v2, v3, :cond_3
iget-object v3, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->bytes:[[B
.line 80
aget-object v3, v3, v2
move v4, v1
:goto_1
iget v5, p0, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->width:I
if-ge v4, v5, :cond_2
.line 82
aget-byte v5, v3, v4
if-eqz v5, :cond_1
const/4 v6, 0x1
if-eq v5, v6, :cond_0
const-string v5, " "
.line 90
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
goto :goto_2
:cond_0
const-string v5, " 1"
.line 87
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
goto :goto_2
:cond_1
const-string v5, " 0"
.line 84
invoke-virtual {v0, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
:goto_2
add-int/lit8 v4, v4, 0x1
goto :goto_1
:cond_2
const/16 v3, 0xa
.line 94
invoke-virtual {v0, v3}, Ljava/lang/StringBuilder;->append(C)Ljava/lang/StringBuilder;
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 96
:cond_3
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method

View File

@@ -0,0 +1,99 @@
.class public abstract synthetic Lcom/google/zxing/qrcode/encoder/Encoder$1;
.super Ljava/lang/Object;
.source "SourceFile"
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/google/zxing/qrcode/encoder/Encoder;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1009
name = null
.end annotation
# static fields
.field public static final synthetic $SwitchMap$com$google$zxing$qrcode$decoder$Mode:[I
# direct methods
.method static constructor <clinit>()V
.locals 3
.line 506
invoke-static {}, Lcom/google/zxing/qrcode/decoder/Mode;->values()[Lcom/google/zxing/qrcode/decoder/Mode;
move-result-object v0
array-length v0, v0
new-array v0, v0, [I
sput-object v0, Lcom/google/zxing/qrcode/encoder/Encoder$1;->$SwitchMap$com$google$zxing$qrcode$decoder$Mode:[I
:try_start_0
sget-object v1, Lcom/google/zxing/qrcode/decoder/Mode;->NUMERIC:Lcom/google/zxing/qrcode/decoder/Mode;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x1
aput v2, v0, v1
:try_end_0
.catch Ljava/lang/NoSuchFieldError; {:try_start_0 .. :try_end_0} :catch_0
:catch_0
:try_start_1
sget-object v0, Lcom/google/zxing/qrcode/encoder/Encoder$1;->$SwitchMap$com$google$zxing$qrcode$decoder$Mode:[I
sget-object v1, Lcom/google/zxing/qrcode/decoder/Mode;->ALPHANUMERIC:Lcom/google/zxing/qrcode/decoder/Mode;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x2
aput v2, v0, v1
:try_end_1
.catch Ljava/lang/NoSuchFieldError; {:try_start_1 .. :try_end_1} :catch_1
:catch_1
:try_start_2
sget-object v0, Lcom/google/zxing/qrcode/encoder/Encoder$1;->$SwitchMap$com$google$zxing$qrcode$decoder$Mode:[I
sget-object v1, Lcom/google/zxing/qrcode/decoder/Mode;->BYTE:Lcom/google/zxing/qrcode/decoder/Mode;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x3
aput v2, v0, v1
:try_end_2
.catch Ljava/lang/NoSuchFieldError; {:try_start_2 .. :try_end_2} :catch_2
:catch_2
:try_start_3
sget-object v0, Lcom/google/zxing/qrcode/encoder/Encoder$1;->$SwitchMap$com$google$zxing$qrcode$decoder$Mode:[I
sget-object v1, Lcom/google/zxing/qrcode/decoder/Mode;->KANJI:Lcom/google/zxing/qrcode/decoder/Mode;
invoke-virtual {v1}, Ljava/lang/Enum;->ordinal()I
move-result v1
const/4 v2, 0x4
aput v2, v0, v1
:try_end_3
.catch Ljava/lang/NoSuchFieldError; {:try_start_3 .. :try_end_3} :catch_3
:catch_3
return-void
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,695 @@
.class public abstract Lcom/google/zxing/qrcode/encoder/MaskUtil;
.super Ljava/lang/Object;
.source "SourceFile"
# direct methods
.method public static applyMaskPenaltyRule1(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)I
.locals 2
const/4 v0, 0x1
.line 41
invoke-static {p0, v0}, Lcom/google/zxing/qrcode/encoder/MaskUtil;->applyMaskPenaltyRule1Internal(Lcom/google/zxing/qrcode/encoder/ByteMatrix;Z)I
move-result v0
const/4 v1, 0x0
invoke-static {p0, v1}, Lcom/google/zxing/qrcode/encoder/MaskUtil;->applyMaskPenaltyRule1Internal(Lcom/google/zxing/qrcode/encoder/ByteMatrix;Z)I
move-result p0
add-int/2addr v0, p0
return v0
.end method
.method public static applyMaskPenaltyRule1Internal(Lcom/google/zxing/qrcode/encoder/ByteMatrix;Z)I
.locals 10
if-eqz p1, :cond_0
.line 197
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v0
goto :goto_0
:cond_0
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v0
:goto_0
if-eqz p1, :cond_1
.line 198
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v1
goto :goto_1
:cond_1
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v1
.line 199
:goto_1
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getArray()[[B
move-result-object p0
const/4 v2, 0x0
move v3, v2
move v4, v3
:goto_2
if-ge v3, v0, :cond_7
const/4 v5, -0x1
move v6, v2
move v7, v6
:goto_3
const/4 v8, 0x5
if-ge v6, v1, :cond_5
if-eqz p1, :cond_2
.line 204
aget-object v9, p0, v3
aget-byte v9, v9, v6
goto :goto_4
:cond_2
aget-object v9, p0, v6
aget-byte v9, v9, v3
:goto_4
if-ne v9, v5, :cond_3
add-int/lit8 v7, v7, 0x1
goto :goto_5
:cond_3
if-lt v7, v8, :cond_4
add-int/lit8 v7, v7, -0x2
add-int/2addr v4, v7
:cond_4
const/4 v5, 0x1
move v7, v5
move v5, v9
:goto_5
add-int/lit8 v6, v6, 0x1
goto :goto_3
:cond_5
if-lt v7, v8, :cond_6
add-int/lit8 v7, v7, -0x2
add-int/2addr v4, v7
:cond_6
add-int/lit8 v3, v3, 0x1
goto :goto_2
:cond_7
return v4
.end method
.method public static applyMaskPenaltyRule2(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)I
.locals 10
.line 51
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getArray()[[B
move-result-object v0
.line 52
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v1
.line 53
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result p0
const/4 v2, 0x0
move v3, v2
move v4, v3
:goto_0
add-int/lit8 v5, p0, -0x1
if-ge v3, v5, :cond_2
.line 55
aget-object v5, v0, v3
move v6, v2
:goto_1
add-int/lit8 v7, v1, -0x1
if-ge v6, v7, :cond_1
.line 57
aget-byte v7, v5, v6
add-int/lit8 v8, v6, 0x1
.line 58
aget-byte v9, v5, v8
if-ne v7, v9, :cond_0
add-int/lit8 v9, v3, 0x1
aget-object v9, v0, v9
aget-byte v6, v9, v6
if-ne v7, v6, :cond_0
aget-byte v6, v9, v8
if-ne v7, v6, :cond_0
add-int/lit8 v4, v4, 0x1
:cond_0
move v6, v8
goto :goto_1
:cond_1
add-int/lit8 v3, v3, 0x1
goto :goto_0
:cond_2
mul-int/lit8 v4, v4, 0x3
return v4
.end method
.method public static applyMaskPenaltyRule3(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)I
.locals 10
.line 73
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getArray()[[B
move-result-object v0
.line 74
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v1
.line 75
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result p0
const/4 v2, 0x0
move v3, v2
move v4, v3
:goto_0
if-ge v3, p0, :cond_5
move v5, v2
:goto_1
if-ge v5, v1, :cond_4
.line 78
aget-object v6, v0, v3
add-int/lit8 v7, v5, 0x6
const/4 v8, 0x1
if-ge v7, v1, :cond_1
.line 79
aget-byte v9, v6, v5
if-ne v9, v8, :cond_1
add-int/lit8 v9, v5, 0x1
aget-byte v9, v6, v9
if-nez v9, :cond_1
add-int/lit8 v9, v5, 0x2
aget-byte v9, v6, v9
if-ne v9, v8, :cond_1
add-int/lit8 v9, v5, 0x3
aget-byte v9, v6, v9
if-ne v9, v8, :cond_1
add-int/lit8 v9, v5, 0x4
aget-byte v9, v6, v9
if-ne v9, v8, :cond_1
add-int/lit8 v9, v5, 0x5
aget-byte v9, v6, v9
if-nez v9, :cond_1
aget-byte v7, v6, v7
if-ne v7, v8, :cond_1
add-int/lit8 v7, v5, -0x4
.line 87
invoke-static {v6, v7, v5}, Lcom/google/zxing/qrcode/encoder/MaskUtil;->isWhiteHorizontal([BII)Z
move-result v7
if-nez v7, :cond_0
add-int/lit8 v7, v5, 0x7
add-int/lit8 v9, v5, 0xb
invoke-static {v6, v7, v9}, Lcom/google/zxing/qrcode/encoder/MaskUtil;->isWhiteHorizontal([BII)Z
move-result v6
if-eqz v6, :cond_1
:cond_0
add-int/lit8 v4, v4, 0x1
:cond_1
add-int/lit8 v6, v3, 0x6
if-ge v6, p0, :cond_3
.line 90
aget-object v7, v0, v3
aget-byte v7, v7, v5
if-ne v7, v8, :cond_3
add-int/lit8 v7, v3, 0x1
aget-object v7, v0, v7
aget-byte v7, v7, v5
if-nez v7, :cond_3
add-int/lit8 v7, v3, 0x2
aget-object v7, v0, v7
aget-byte v7, v7, v5
if-ne v7, v8, :cond_3
add-int/lit8 v7, v3, 0x3
aget-object v7, v0, v7
aget-byte v7, v7, v5
if-ne v7, v8, :cond_3
add-int/lit8 v7, v3, 0x4
aget-object v7, v0, v7
aget-byte v7, v7, v5
if-ne v7, v8, :cond_3
add-int/lit8 v7, v3, 0x5
aget-object v7, v0, v7
aget-byte v7, v7, v5
if-nez v7, :cond_3
aget-object v6, v0, v6
aget-byte v6, v6, v5
if-ne v6, v8, :cond_3
add-int/lit8 v6, v3, -0x4
.line 98
invoke-static {v0, v5, v6, v3}, Lcom/google/zxing/qrcode/encoder/MaskUtil;->isWhiteVertical([[BIII)Z
move-result v6
if-nez v6, :cond_2
add-int/lit8 v6, v3, 0x7
add-int/lit8 v7, v3, 0xb
invoke-static {v0, v5, v6, v7}, Lcom/google/zxing/qrcode/encoder/MaskUtil;->isWhiteVertical([[BIII)Z
move-result v6
if-eqz v6, :cond_3
:cond_2
add-int/lit8 v4, v4, 0x1
:cond_3
add-int/lit8 v5, v5, 0x1
goto/16 :goto_1
:cond_4
add-int/lit8 v3, v3, 0x1
goto/16 :goto_0
:cond_5
mul-int/lit8 v4, v4, 0x28
return v4
.end method
.method public static applyMaskPenaltyRule4(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)I
.locals 10
.line 134
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getArray()[[B
move-result-object v0
.line 135
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result v1
.line 136
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v2
const/4 v3, 0x0
move v4, v3
move v5, v4
:goto_0
const/4 v6, 0x1
if-ge v4, v2, :cond_2
.line 138
aget-object v7, v0, v4
move v8, v3
:goto_1
if-ge v8, v1, :cond_1
.line 140
aget-byte v9, v7, v8
if-ne v9, v6, :cond_0
add-int/lit8 v5, v5, 0x1
:cond_0
add-int/lit8 v8, v8, 0x1
goto :goto_1
:cond_1
add-int/lit8 v4, v4, 0x1
goto :goto_0
.line 145
:cond_2
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getHeight()I
move-result v0
invoke-virtual {p0}, Lcom/google/zxing/qrcode/encoder/ByteMatrix;->getWidth()I
move-result p0
mul-int/2addr v0, p0
shl-int/lit8 p0, v5, 0x1
sub-int/2addr p0, v0
.line 146
invoke-static {p0}, Ljava/lang/Math;->abs(I)I
move-result p0
mul-int/lit8 p0, p0, 0xa
div-int/2addr p0, v0
mul-int/lit8 p0, p0, 0xa
return p0
.end method
.method public static getDataMaskBit(III)Z
.locals 1
const/4 v0, 0x1
packed-switch p0, :pswitch_data_0
.line 186
new-instance p1, Ljava/lang/IllegalArgumentException;
const-string p2, "Invalid mask pattern: "
invoke-static {p0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
move-result-object p0
invoke-virtual {p2, p0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
throw p1
:pswitch_0
mul-int p0, p2, p1
.line 183
rem-int/lit8 p0, p0, 0x3
add-int/2addr p2, p1
and-int/lit8 p1, p2, 0x1
add-int/2addr p0, p1
:goto_0
and-int/2addr p0, v0
goto :goto_1
:pswitch_1
mul-int/2addr p2, p1
and-int/lit8 p0, p2, 0x1
.line 179
rem-int/lit8 p2, p2, 0x3
add-int/2addr p0, p2
goto :goto_0
:pswitch_2
mul-int/2addr p2, p1
and-int/lit8 p0, p2, 0x1
.line 175
rem-int/lit8 p2, p2, 0x3
add-int/2addr p0, p2
goto :goto_1
.line 171
:pswitch_3
div-int/lit8 p2, p2, 0x2
div-int/lit8 p1, p1, 0x3
:pswitch_4
add-int/2addr p2, p1
:pswitch_5
and-int/lit8 p0, p2, 0x1
goto :goto_1
:pswitch_6
add-int/2addr p2, p1
.line 168
rem-int/lit8 p0, p2, 0x3
goto :goto_1
.line 165
:pswitch_7
rem-int/lit8 p0, p1, 0x3
:goto_1
if-nez p0, :cond_0
return v0
:cond_0
const/4 p0, 0x0
return p0
nop
:pswitch_data_0
.packed-switch 0x0
:pswitch_4
:pswitch_5
:pswitch_7
:pswitch_6
:pswitch_3
:pswitch_2
:pswitch_1
:pswitch_0
.end packed-switch
.end method
.method public static isWhiteHorizontal([BII)Z
.locals 3
const/4 v0, 0x0
.line 107
invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I
move-result p1
.line 108
array-length v1, p0
invoke-static {p2, v1}, Ljava/lang/Math;->min(II)I
move-result p2
:goto_0
const/4 v1, 0x1
if-ge p1, p2, :cond_1
.line 110
aget-byte v2, p0, p1
if-ne v2, v1, :cond_0
return v0
:cond_0
add-int/lit8 p1, p1, 0x1
goto :goto_0
:cond_1
return v1
.end method
.method public static isWhiteVertical([[BIII)Z
.locals 3
const/4 v0, 0x0
.line 118
invoke-static {p2, v0}, Ljava/lang/Math;->max(II)I
move-result p2
.line 119
array-length v1, p0
invoke-static {p3, v1}, Ljava/lang/Math;->min(II)I
move-result p3
:goto_0
const/4 v1, 0x1
if-ge p2, p3, :cond_1
.line 121
aget-object v2, p0, p2
aget-byte v2, v2, p1
if-ne v2, v1, :cond_0
return v0
:cond_0
add-int/lit8 p2, p2, 0x1
goto :goto_0
:cond_1
return v1
.end method

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,190 @@
.class public final Lcom/google/zxing/qrcode/encoder/QRCode;
.super Ljava/lang/Object;
.source "SourceFile"
# instance fields
.field public ecLevel:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.field public maskPattern:I
.field public matrix:Lcom/google/zxing/qrcode/encoder/ByteMatrix;
.field public mode:Lcom/google/zxing/qrcode/decoder/Mode;
.field public version:Lcom/google/zxing/qrcode/decoder/Version;
# direct methods
.method public constructor <init>()V
.locals 1
.line 37
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
const/4 v0, -0x1
iput v0, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->maskPattern:I
return-void
.end method
.method public static isValidMaskPattern(I)Z
.locals 1
if-ltz p0, :cond_0
const/16 v0, 0x8
if-ge p0, v0, :cond_0
const/4 p0, 0x1
return p0
:cond_0
const/4 p0, 0x0
return p0
.end method
# virtual methods
.method public getMatrix()Lcom/google/zxing/qrcode/encoder/ByteMatrix;
.locals 1
iget-object v0, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->matrix:Lcom/google/zxing/qrcode/encoder/ByteMatrix;
return-object v0
.end method
.method public setECLevel(Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;)V
.locals 0
iput-object p1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->ecLevel:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
return-void
.end method
.method public setMaskPattern(I)V
.locals 0
iput p1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->maskPattern:I
return-void
.end method
.method public setMatrix(Lcom/google/zxing/qrcode/encoder/ByteMatrix;)V
.locals 0
iput-object p1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->matrix:Lcom/google/zxing/qrcode/encoder/ByteMatrix;
return-void
.end method
.method public setMode(Lcom/google/zxing/qrcode/decoder/Mode;)V
.locals 0
iput-object p1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->mode:Lcom/google/zxing/qrcode/decoder/Mode;
return-void
.end method
.method public setVersion(Lcom/google/zxing/qrcode/decoder/Version;)V
.locals 0
iput-object p1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->version:Lcom/google/zxing/qrcode/decoder/Version;
return-void
.end method
.method public toString()Ljava/lang/String;
.locals 2
.line 63
new-instance v0, Ljava/lang/StringBuilder;
const/16 v1, 0xc8
invoke-direct {v0, v1}, Ljava/lang/StringBuilder;-><init>(I)V
const-string v1, "<<\n"
.line 64
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
const-string v1, " mode: "
.line 65
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->mode:Lcom/google/zxing/qrcode/decoder/Mode;
.line 66
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, "\n ecLevel: "
.line 67
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->ecLevel:Lcom/google/zxing/qrcode/decoder/ErrorCorrectionLevel;
.line 68
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, "\n version: "
.line 69
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->version:Lcom/google/zxing/qrcode/decoder/Version;
.line 70
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
const-string v1, "\n maskPattern: "
.line 71
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget v1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->maskPattern:I
.line 72
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->matrix:Lcom/google/zxing/qrcode/encoder/ByteMatrix;
if-nez v1, :cond_0
const-string v1, "\n matrix: null\n"
.line 74
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
goto :goto_0
:cond_0
const-string v1, "\n matrix:\n"
.line 76
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
iget-object v1, p0, Lcom/google/zxing/qrcode/encoder/QRCode;->matrix:Lcom/google/zxing/qrcode/encoder/ByteMatrix;
.line 77
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
:goto_0
const-string v1, ">>\n"
.line 79
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
.line 80
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
return-object v0
.end method