- 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
639 lines
12 KiB
Smali
639 lines
12 KiB
Smali
.class public final Lcom/google/zxing/oned/Code128Writer;
|
|
.super Lcom/google/zxing/oned/OneDimensionalCodeWriter;
|
|
.source "SourceFile"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/google/zxing/oned/Code128Writer$CType;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 33
|
|
invoke-direct {p0}, Lcom/google/zxing/oned/OneDimensionalCodeWriter;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static chooseCode(Ljava/lang/CharSequence;II)I
|
|
.locals 5
|
|
|
|
.line 234
|
|
invoke-static {p0, p1}, Lcom/google/zxing/oned/Code128Writer;->findCType(Ljava/lang/CharSequence;I)Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
move-result-object v0
|
|
|
|
.line 235
|
|
sget-object v1, Lcom/google/zxing/oned/Code128Writer$CType;->ONE_DIGIT:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
const/16 v2, 0x64
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
return v2
|
|
|
|
.line 238
|
|
:cond_0
|
|
sget-object v3, Lcom/google/zxing/oned/Code128Writer$CType;->UNCODABLE:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
if-ne v0, v3, :cond_3
|
|
|
|
.line 239
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-ge p1, v0, :cond_2
|
|
|
|
.line 240
|
|
invoke-interface {p0, p1}, Ljava/lang/CharSequence;->charAt(I)C
|
|
|
|
move-result p0
|
|
|
|
const/16 p1, 0x20
|
|
|
|
const/16 v0, 0x65
|
|
|
|
if-lt p0, p1, :cond_1
|
|
|
|
if-ne p2, v0, :cond_2
|
|
|
|
const/16 p1, 0x60
|
|
|
|
if-ge p0, p1, :cond_2
|
|
|
|
:cond_1
|
|
return v0
|
|
|
|
:cond_2
|
|
return v2
|
|
|
|
:cond_3
|
|
const/16 v4, 0x63
|
|
|
|
if-ne p2, v4, :cond_4
|
|
|
|
return v4
|
|
|
|
:cond_4
|
|
if-ne p2, v2, :cond_c
|
|
|
|
.line 252
|
|
sget-object p2, Lcom/google/zxing/oned/Code128Writer$CType;->FNC_1:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
if-ne v0, p2, :cond_5
|
|
|
|
return v2
|
|
|
|
:cond_5
|
|
add-int/lit8 v0, p1, 0x2
|
|
|
|
.line 256
|
|
invoke-static {p0, v0}, Lcom/google/zxing/oned/Code128Writer;->findCType(Ljava/lang/CharSequence;I)Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
move-result-object v0
|
|
|
|
if-eq v0, v3, :cond_b
|
|
|
|
if-ne v0, v1, :cond_6
|
|
|
|
goto :goto_1
|
|
|
|
:cond_6
|
|
if-ne v0, p2, :cond_8
|
|
|
|
add-int/lit8 p1, p1, 0x3
|
|
|
|
.line 261
|
|
invoke-static {p0, p1}, Lcom/google/zxing/oned/Code128Writer;->findCType(Ljava/lang/CharSequence;I)Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
move-result-object p0
|
|
|
|
.line 262
|
|
sget-object p1, Lcom/google/zxing/oned/Code128Writer$CType;->TWO_DIGITS:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
if-ne p0, p1, :cond_7
|
|
|
|
return v4
|
|
|
|
:cond_7
|
|
return v2
|
|
|
|
:cond_8
|
|
add-int/lit8 p1, p1, 0x4
|
|
|
|
.line 271
|
|
:goto_0
|
|
invoke-static {p0, p1}, Lcom/google/zxing/oned/Code128Writer;->findCType(Ljava/lang/CharSequence;I)Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
move-result-object p2
|
|
|
|
sget-object v0, Lcom/google/zxing/oned/Code128Writer$CType;->TWO_DIGITS:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
if-ne p2, v0, :cond_9
|
|
|
|
add-int/lit8 p1, p1, 0x2
|
|
|
|
goto :goto_0
|
|
|
|
.line 274
|
|
:cond_9
|
|
sget-object p0, Lcom/google/zxing/oned/Code128Writer$CType;->ONE_DIGIT:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
if-ne p2, p0, :cond_a
|
|
|
|
return v2
|
|
|
|
:cond_a
|
|
return v4
|
|
|
|
:cond_b
|
|
:goto_1
|
|
return v2
|
|
|
|
.line 280
|
|
:cond_c
|
|
sget-object p2, Lcom/google/zxing/oned/Code128Writer$CType;->FNC_1:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
if-ne v0, p2, :cond_d
|
|
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
.line 281
|
|
invoke-static {p0, p1}, Lcom/google/zxing/oned/Code128Writer;->findCType(Ljava/lang/CharSequence;I)Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
move-result-object v0
|
|
|
|
.line 283
|
|
:cond_d
|
|
sget-object p0, Lcom/google/zxing/oned/Code128Writer$CType;->TWO_DIGITS:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
if-ne v0, p0, :cond_e
|
|
|
|
return v4
|
|
|
|
:cond_e
|
|
return v2
|
|
.end method
|
|
|
|
.method public static findCType(Ljava/lang/CharSequence;I)Lcom/google/zxing/oned/Code128Writer$CType;
|
|
.locals 4
|
|
|
|
.line 212
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-lt p1, v0, :cond_0
|
|
|
|
.line 214
|
|
sget-object p0, Lcom/google/zxing/oned/Code128Writer$CType;->UNCODABLE:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
return-object p0
|
|
|
|
.line 216
|
|
:cond_0
|
|
invoke-interface {p0, p1}, Ljava/lang/CharSequence;->charAt(I)C
|
|
|
|
move-result v1
|
|
|
|
const/16 v2, 0xf1
|
|
|
|
if-ne v1, v2, :cond_1
|
|
|
|
.line 218
|
|
sget-object p0, Lcom/google/zxing/oned/Code128Writer$CType;->FNC_1:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
const/16 v2, 0x30
|
|
|
|
if-lt v1, v2, :cond_6
|
|
|
|
const/16 v3, 0x39
|
|
|
|
if-le v1, v3, :cond_2
|
|
|
|
goto :goto_1
|
|
|
|
:cond_2
|
|
add-int/lit8 p1, p1, 0x1
|
|
|
|
if-lt p1, v0, :cond_3
|
|
|
|
.line 224
|
|
sget-object p0, Lcom/google/zxing/oned/Code128Writer$CType;->ONE_DIGIT:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
return-object p0
|
|
|
|
.line 226
|
|
:cond_3
|
|
invoke-interface {p0, p1}, Ljava/lang/CharSequence;->charAt(I)C
|
|
|
|
move-result p0
|
|
|
|
if-lt p0, v2, :cond_5
|
|
|
|
if-le p0, v3, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
.line 230
|
|
:cond_4
|
|
sget-object p0, Lcom/google/zxing/oned/Code128Writer$CType;->TWO_DIGITS:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
return-object p0
|
|
|
|
.line 228
|
|
:cond_5
|
|
:goto_0
|
|
sget-object p0, Lcom/google/zxing/oned/Code128Writer$CType;->ONE_DIGIT:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
return-object p0
|
|
|
|
.line 221
|
|
:cond_6
|
|
:goto_1
|
|
sget-object p0, Lcom/google/zxing/oned/Code128Writer$CType;->UNCODABLE:Lcom/google/zxing/oned/Code128Writer$CType;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public encode(Ljava/lang/String;Lcom/google/zxing/BarcodeFormat;IILjava/util/Map;)Lcom/google/zxing/common/BitMatrix;
|
|
.locals 1
|
|
|
|
.line 69
|
|
sget-object v0, Lcom/google/zxing/BarcodeFormat;->CODE_128:Lcom/google/zxing/BarcodeFormat;
|
|
|
|
if-ne p2, v0, :cond_0
|
|
|
|
.line 72
|
|
invoke-super/range {p0 .. p5}, Lcom/google/zxing/oned/OneDimensionalCodeWriter;->encode(Ljava/lang/String;Lcom/google/zxing/BarcodeFormat;IILjava/util/Map;)Lcom/google/zxing/common/BitMatrix;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
|
|
.line 70
|
|
:cond_0
|
|
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 CODE_128, 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
|
|
.end method
|
|
|
|
.method public encode(Ljava/lang/String;)[Z
|
|
.locals 12
|
|
|
|
.line 77
|
|
invoke-virtual {p1}, Ljava/lang/String;->length()I
|
|
|
|
move-result v0
|
|
|
|
if-lez v0, :cond_e
|
|
|
|
const/16 v1, 0x50
|
|
|
|
if-gt v0, v1, :cond_e
|
|
|
|
const/4 v1, 0x0
|
|
|
|
move v2, v1
|
|
|
|
:goto_0
|
|
if-ge v2, v0, :cond_1
|
|
|
|
.line 85
|
|
invoke-virtual {p1, v2}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v3
|
|
|
|
packed-switch v3, :pswitch_data_0
|
|
|
|
const/16 v4, 0x7f
|
|
|
|
if-gt v3, v4, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 95
|
|
:cond_0
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v0, "Bad character in input: "
|
|
|
|
invoke-static {v3}, Ljava/lang/String;->valueOf(C)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
:goto_1
|
|
:pswitch_0
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 100
|
|
:cond_1
|
|
new-instance v2, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
const/4 v3, 0x1
|
|
|
|
move v4, v1
|
|
|
|
move v5, v4
|
|
|
|
move v6, v5
|
|
|
|
move v7, v3
|
|
|
|
:cond_2
|
|
:goto_2
|
|
const/16 v8, 0x67
|
|
|
|
if-ge v4, v0, :cond_a
|
|
|
|
.line 108
|
|
invoke-static {p1, v4, v6}, Lcom/google/zxing/oned/Code128Writer;->chooseCode(Ljava/lang/CharSequence;II)I
|
|
|
|
move-result v9
|
|
|
|
const/16 v10, 0x64
|
|
|
|
const/16 v11, 0x65
|
|
|
|
if-ne v9, v6, :cond_6
|
|
|
|
.line 115
|
|
invoke-virtual {p1, v4}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v8
|
|
|
|
packed-switch v8, :pswitch_data_1
|
|
|
|
if-eq v6, v10, :cond_4
|
|
|
|
if-eq v6, v11, :cond_3
|
|
|
|
add-int/lit8 v8, v4, 0x2
|
|
|
|
.line 147
|
|
invoke-virtual {p1, v4, v8}, Ljava/lang/String;->substring(II)Ljava/lang/String;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
|
|
|
|
move-result v10
|
|
|
|
add-int/lit8 v4, v4, 0x1
|
|
|
|
goto :goto_3
|
|
|
|
.line 136
|
|
:cond_3
|
|
invoke-virtual {p1, v4}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v8
|
|
|
|
add-int/lit8 v10, v8, -0x20
|
|
|
|
if-gez v10, :cond_5
|
|
|
|
add-int/lit8 v10, v8, 0x40
|
|
|
|
goto :goto_3
|
|
|
|
.line 143
|
|
:cond_4
|
|
invoke-virtual {p1, v4}, Ljava/lang/String;->charAt(I)C
|
|
|
|
move-result v8
|
|
|
|
add-int/lit8 v10, v8, -0x20
|
|
|
|
goto :goto_3
|
|
|
|
:pswitch_1
|
|
if-ne v6, v11, :cond_5
|
|
|
|
move v10, v11
|
|
|
|
goto :goto_3
|
|
|
|
:pswitch_2
|
|
const/16 v10, 0x60
|
|
|
|
goto :goto_3
|
|
|
|
:pswitch_3
|
|
const/16 v10, 0x61
|
|
|
|
goto :goto_3
|
|
|
|
:pswitch_4
|
|
const/16 v10, 0x66
|
|
|
|
:cond_5
|
|
:goto_3
|
|
add-int/2addr v4, v3
|
|
|
|
goto :goto_5
|
|
|
|
:cond_6
|
|
if-nez v6, :cond_8
|
|
|
|
if-eq v9, v10, :cond_7
|
|
|
|
if-eq v9, v11, :cond_9
|
|
|
|
const/16 v8, 0x69
|
|
|
|
goto :goto_4
|
|
|
|
:cond_7
|
|
const/16 v8, 0x68
|
|
|
|
goto :goto_4
|
|
|
|
:cond_8
|
|
move v8, v9
|
|
|
|
:cond_9
|
|
:goto_4
|
|
move v10, v8
|
|
|
|
move v6, v9
|
|
|
|
.line 177
|
|
:goto_5
|
|
sget-object v8, Lcom/google/zxing/oned/Code128Reader;->CODE_PATTERNS:[[I
|
|
|
|
aget-object v8, v8, v10
|
|
|
|
invoke-interface {v2, v8}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
mul-int/2addr v10, v7
|
|
|
|
add-int/2addr v5, v10
|
|
|
|
if-eqz v4, :cond_2
|
|
|
|
add-int/lit8 v7, v7, 0x1
|
|
|
|
goto :goto_2
|
|
|
|
.line 187
|
|
:cond_a
|
|
rem-int/2addr v5, v8
|
|
|
|
.line 188
|
|
sget-object p1, Lcom/google/zxing/oned/Code128Reader;->CODE_PATTERNS:[[I
|
|
|
|
aget-object v0, p1, v5
|
|
|
|
invoke-interface {v2, v0}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
const/16 v0, 0x6a
|
|
|
|
.line 191
|
|
aget-object p1, p1, v0
|
|
|
|
invoke-interface {v2, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
.line 195
|
|
invoke-interface {v2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p1
|
|
|
|
move v0, v1
|
|
|
|
:cond_b
|
|
invoke-interface {p1}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_c
|
|
|
|
invoke-interface {p1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v4
|
|
|
|
check-cast v4, [I
|
|
|
|
.line 196
|
|
array-length v5, v4
|
|
|
|
move v6, v1
|
|
|
|
:goto_6
|
|
if-ge v6, v5, :cond_b
|
|
|
|
aget v7, v4, v6
|
|
|
|
add-int/2addr v0, v7
|
|
|
|
add-int/lit8 v6, v6, 0x1
|
|
|
|
goto :goto_6
|
|
|
|
.line 202
|
|
:cond_c
|
|
new-array p1, v0, [Z
|
|
|
|
.line 204
|
|
invoke-interface {v2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object v0
|
|
|
|
:goto_7
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_d
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v2
|
|
|
|
check-cast v2, [I
|
|
|
|
.line 205
|
|
invoke-static {p1, v1, v2, v3}, Lcom/google/zxing/oned/OneDimensionalCodeWriter;->appendPattern([ZI[IZ)I
|
|
|
|
move-result v2
|
|
|
|
add-int/2addr v1, v2
|
|
|
|
goto :goto_7
|
|
|
|
:cond_d
|
|
return-object p1
|
|
|
|
.line 80
|
|
:cond_e
|
|
new-instance p1, Ljava/lang/IllegalArgumentException;
|
|
|
|
const-string v1, "Contents length should be between 1 and 80 characters, but got "
|
|
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->concat(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0xf1
|
|
:pswitch_0
|
|
:pswitch_0
|
|
:pswitch_0
|
|
:pswitch_0
|
|
.end packed-switch
|
|
|
|
:pswitch_data_1
|
|
.packed-switch 0xf1
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
.end packed-switch
|
|
.end method
|