Rabbit-R1/android (non root)/smali/smali_classes3/com/google/zxing/multi/ByQuadrantReader.smali

263 lines
7 KiB
Smali
Raw Normal View History

2024-05-21 21:08:36 +00:00
.class public final Lcom/google/zxing/multi/ByQuadrantReader;
.super Ljava/lang/Object;
.source "ByQuadrantReader.java"
# interfaces
.implements Lcom/google/zxing/Reader;
# instance fields
.field private final delegate:Lcom/google/zxing/Reader;
# direct methods
.method public constructor <init>(Lcom/google/zxing/Reader;)V
.locals 0
.line 43
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
iput-object p1, p0, Lcom/google/zxing/multi/ByQuadrantReader;->delegate:Lcom/google/zxing/Reader;
return-void
.end method
.method private static makeAbsolute([Lcom/google/zxing/ResultPoint;II)V
.locals 5
if-eqz p0, :cond_1
const/4 v0, 0x0
.line 108
:goto_0
array-length v1, p0
if-ge v0, v1, :cond_1
.line 109
aget-object v1, p0, v0
if-eqz v1, :cond_0
.line 111
new-instance v2, Lcom/google/zxing/ResultPoint;
invoke-virtual {v1}, Lcom/google/zxing/ResultPoint;->getX()F
move-result v3
int-to-float v4, p1
add-float/2addr v3, v4
invoke-virtual {v1}, Lcom/google/zxing/ResultPoint;->getY()F
move-result v1
int-to-float v4, p2
add-float/2addr v1, v4
invoke-direct {v2, v3, v1}, Lcom/google/zxing/ResultPoint;-><init>(FF)V
aput-object v2, p0, v0
:cond_0
add-int/lit8 v0, v0, 0x1
goto :goto_0
:cond_1
return-void
.end method
# virtual methods
.method public decode(Lcom/google/zxing/BinaryBitmap;)Lcom/google/zxing/Result;
.locals 1
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/NotFoundException;,
Lcom/google/zxing/ChecksumException;,
Lcom/google/zxing/FormatException;
}
.end annotation
const/4 v0, 0x0
.line 50
invoke-virtual {p0, p1, v0}, Lcom/google/zxing/multi/ByQuadrantReader;->decode(Lcom/google/zxing/BinaryBitmap;Ljava/util/Map;)Lcom/google/zxing/Result;
move-result-object p0
return-object p0
.end method
.method public decode(Lcom/google/zxing/BinaryBitmap;Ljava/util/Map;)Lcom/google/zxing/Result;
.locals 5
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Lcom/google/zxing/BinaryBitmap;",
"Ljava/util/Map<",
"Lcom/google/zxing/DecodeHintType;",
"*>;)",
"Lcom/google/zxing/Result;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/NotFoundException;,
Lcom/google/zxing/ChecksumException;,
Lcom/google/zxing/FormatException;
}
.end annotation
.line 57
invoke-virtual {p1}, Lcom/google/zxing/BinaryBitmap;->getWidth()I
move-result v0
.line 58
invoke-virtual {p1}, Lcom/google/zxing/BinaryBitmap;->getHeight()I
move-result v1
.line 59
div-int/lit8 v0, v0, 0x2
.line 60
div-int/lit8 v1, v1, 0x2
const/4 v2, 0x0
:try_start_0
iget-object v3, p0, Lcom/google/zxing/multi/ByQuadrantReader;->delegate:Lcom/google/zxing/Reader;
.line 64
invoke-virtual {p1, v2, v2, v0, v1}, Lcom/google/zxing/BinaryBitmap;->crop(IIII)Lcom/google/zxing/BinaryBitmap;
move-result-object v4
invoke-interface {v3, v4, p2}, Lcom/google/zxing/Reader;->decode(Lcom/google/zxing/BinaryBitmap;Ljava/util/Map;)Lcom/google/zxing/Result;
move-result-object p0
:try_end_0
.catch Lcom/google/zxing/NotFoundException; {:try_start_0 .. :try_end_0} :catch_0
return-object p0
:catch_0
:try_start_1
iget-object v3, p0, Lcom/google/zxing/multi/ByQuadrantReader;->delegate:Lcom/google/zxing/Reader;
.line 70
invoke-virtual {p1, v0, v2, v0, v1}, Lcom/google/zxing/BinaryBitmap;->crop(IIII)Lcom/google/zxing/BinaryBitmap;
move-result-object v4
invoke-interface {v3, v4, p2}, Lcom/google/zxing/Reader;->decode(Lcom/google/zxing/BinaryBitmap;Ljava/util/Map;)Lcom/google/zxing/Result;
move-result-object v3
.line 71
invoke-virtual {v3}, Lcom/google/zxing/Result;->getResultPoints()[Lcom/google/zxing/ResultPoint;
move-result-object v4
invoke-static {v4, v0, v2}, Lcom/google/zxing/multi/ByQuadrantReader;->makeAbsolute([Lcom/google/zxing/ResultPoint;II)V
:try_end_1
.catch Lcom/google/zxing/NotFoundException; {:try_start_1 .. :try_end_1} :catch_1
return-object v3
:catch_1
:try_start_2
iget-object v3, p0, Lcom/google/zxing/multi/ByQuadrantReader;->delegate:Lcom/google/zxing/Reader;
.line 78
invoke-virtual {p1, v2, v1, v0, v1}, Lcom/google/zxing/BinaryBitmap;->crop(IIII)Lcom/google/zxing/BinaryBitmap;
move-result-object v4
invoke-interface {v3, v4, p2}, Lcom/google/zxing/Reader;->decode(Lcom/google/zxing/BinaryBitmap;Ljava/util/Map;)Lcom/google/zxing/Result;
move-result-object v3
.line 79
invoke-virtual {v3}, Lcom/google/zxing/Result;->getResultPoints()[Lcom/google/zxing/ResultPoint;
move-result-object v4
invoke-static {v4, v2, v1}, Lcom/google/zxing/multi/ByQuadrantReader;->makeAbsolute([Lcom/google/zxing/ResultPoint;II)V
:try_end_2
.catch Lcom/google/zxing/NotFoundException; {:try_start_2 .. :try_end_2} :catch_2
return-object v3
:catch_2
:try_start_3
iget-object v2, p0, Lcom/google/zxing/multi/ByQuadrantReader;->delegate:Lcom/google/zxing/Reader;
.line 86
invoke-virtual {p1, v0, v1, v0, v1}, Lcom/google/zxing/BinaryBitmap;->crop(IIII)Lcom/google/zxing/BinaryBitmap;
move-result-object v3
invoke-interface {v2, v3, p2}, Lcom/google/zxing/Reader;->decode(Lcom/google/zxing/BinaryBitmap;Ljava/util/Map;)Lcom/google/zxing/Result;
move-result-object v2
.line 87
invoke-virtual {v2}, Lcom/google/zxing/Result;->getResultPoints()[Lcom/google/zxing/ResultPoint;
move-result-object v3
invoke-static {v3, v0, v1}, Lcom/google/zxing/multi/ByQuadrantReader;->makeAbsolute([Lcom/google/zxing/ResultPoint;II)V
:try_end_3
.catch Lcom/google/zxing/NotFoundException; {:try_start_3 .. :try_end_3} :catch_3
return-object v2
.line 93
:catch_3
div-int/lit8 v2, v0, 0x2
.line 94
div-int/lit8 v3, v1, 0x2
.line 95
invoke-virtual {p1, v2, v3, v0, v1}, Lcom/google/zxing/BinaryBitmap;->crop(IIII)Lcom/google/zxing/BinaryBitmap;
move-result-object p1
iget-object p0, p0, Lcom/google/zxing/multi/ByQuadrantReader;->delegate:Lcom/google/zxing/Reader;
.line 96
invoke-interface {p0, p1, p2}, Lcom/google/zxing/Reader;->decode(Lcom/google/zxing/BinaryBitmap;Ljava/util/Map;)Lcom/google/zxing/Result;
move-result-object p0
.line 97
invoke-virtual {p0}, Lcom/google/zxing/Result;->getResultPoints()[Lcom/google/zxing/ResultPoint;
move-result-object p1
invoke-static {p1, v2, v3}, Lcom/google/zxing/multi/ByQuadrantReader;->makeAbsolute([Lcom/google/zxing/ResultPoint;II)V
return-object p0
.end method
.method public reset()V
.locals 0
iget-object p0, p0, Lcom/google/zxing/multi/ByQuadrantReader;->delegate:Lcom/google/zxing/Reader;
.line 103
invoke-interface {p0}, Lcom/google/zxing/Reader;->reset()V
return-void
.end method