MultiDetector.smali
.class public final Lcom/google/zxing/multi/qrcode/detector/MultiDetector;
.super Lcom/google/zxing/qrcode/detector/Detector;
.source "MultiDetector.java"
# static fields
.field private static final EMPTY_DETECTOR_RESULTS:[Lcom/google/zxing/common/DetectorResult;
# direct methods
.method static constructor <clinit>()V
.registers 1
const/4 v0, 0x0
new-array v0, v0, [Lcom/google/zxing/common/DetectorResult;
.line 41
sput-object v0, Lcom/google/zxing/multi/qrcode/detector/MultiDetector;->EMPTY_DETECTOR_RESULTS:[Lcom/google/zxing/common/DetectorResult;
return-void
.end method
.method public constructor <init>(Lcom/google/zxing/common/BitMatrix;)V
.registers 2
.line 44
invoke-direct {p0, p1}, Lcom/google/zxing/qrcode/detector/Detector;-><init>(Lcom/google/zxing/common/BitMatrix;)V
return-void
.end method
# virtual methods
.method public detectMulti(Ljava/util/Map;)[Lcom/google/zxing/common/DetectorResult;
.registers 6
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/Map<",
"Lcom/google/zxing/DecodeHintType;",
"*>;)[",
"Lcom/google/zxing/common/DetectorResult;"
}
.end annotation
.annotation system Ldalvik/annotation/Throws;
value = {
Lcom/google/zxing/NotFoundException;
}
.end annotation
.line 48
invoke-virtual {p0}, Lcom/google/zxing/multi/qrcode/detector/MultiDetector;->getImage()Lcom/google/zxing/common/BitMatrix;
move-result-object v0
if-nez p1, :cond_8
const/4 v1, 0x0
goto :goto_10
.line 49
:cond_8
sget-object v1, Lcom/google/zxing/DecodeHintType;->NEED_RESULT_POINT_CALLBACK:Lcom/google/zxing/DecodeHintType;
.line 50
invoke-interface {p1, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v1
check-cast v1, Lcom/google/zxing/ResultPointCallback;
.line 51
:goto_10
new-instance v2, Lcom/google/zxing/multi/qrcode/detector/MultiFinderPatternFinder;
invoke-direct {v2, v0, v1}, Lcom/google/zxing/multi/qrcode/detector/MultiFinderPatternFinder;-><init>(Lcom/google/zxing/common/BitMatrix;Lcom/google/zxing/ResultPointCallback;)V
.line 52
invoke-virtual {v2, p1}, Lcom/google/zxing/multi/qrcode/detector/MultiFinderPatternFinder;->findMulti(Ljava/util/Map;)[Lcom/google/zxing/qrcode/detector/FinderPatternInfo;
move-result-object p1
.line 54
array-length v0, p1
if-eqz v0, :cond_47
.line 58
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
.line 59
array-length v1, p1
const/4 v2, 0x0
:goto_23
if-ge v2, v1, :cond_31
aget-object v3, p1, v2
.line 61
:try_start_27
invoke-virtual {p0, v3}, Lcom/google/zxing/multi/qrcode/detector/MultiDetector;->processFinderPatternInfo(Lcom/google/zxing/qrcode/detector/FinderPatternInfo;)Lcom/google/zxing/common/DetectorResult;
move-result-object v3
invoke-interface {v0, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
:try_end_2e
.catch Lcom/google/zxing/ReaderException; {:try_start_27 .. :try_end_2e} :catch_2e
:catch_2e
add-int/lit8 v2, v2, 0x1
goto :goto_23
.line 66
:cond_31
invoke-interface {v0}, Ljava/util/List;->isEmpty()Z
move-result p1
if-eqz p1, :cond_3a
.line 67
sget-object p1, Lcom/google/zxing/multi/qrcode/detector/MultiDetector;->EMPTY_DETECTOR_RESULTS:[Lcom/google/zxing/common/DetectorResult;
return-object p1
.line 69
:cond_3a
invoke-interface {v0}, Ljava/util/List;->size()I
move-result p1
new-array p1, p1, [Lcom/google/zxing/common/DetectorResult;
invoke-interface {v0, p1}, Ljava/util/List;->toArray([Ljava/lang/Object;)[Ljava/lang/Object;
move-result-object p1
check-cast p1, [Lcom/google/zxing/common/DetectorResult;
return-object p1
.line 55
:cond_47
invoke-static {}, Lcom/google/zxing/NotFoundException;->getNotFoundInstance()Lcom/google/zxing/NotFoundException;
move-result-object p1
throw p1
.end method