ImageScanner.smali

.class public Lcom/yanzhenjie/zbar/ImageScanner;
.super Ljava/lang/Object;
.source "ImageScanner.java"


# instance fields
.field public a:J


# direct methods
.method public static constructor <clinit>()V
    .registers 1

    const-string v0, "zbar"

    invoke-static {v0}, Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V

    invoke-static {}, Lcom/yanzhenjie/zbar/ImageScanner;->init()V

    return-void
.end method

.method public constructor <init>()V
    .registers 3

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    invoke-direct {p0}, Lcom/yanzhenjie/zbar/ImageScanner;->create()J

    move-result-wide v0

    iput-wide v0, p0, Lcom/yanzhenjie/zbar/ImageScanner;->a:J

    return-void
.end method

.method private native create()J
.end method

.method private native destroy(J)V
.end method

.method private native getResults(J)J
.end method

.method public static native init()V
.end method


# virtual methods
.method public declared-synchronized a()V
    .registers 6

    monitor-enter p0

    :try_start_1
    iget-wide v0, p0, Lcom/yanzhenjie/zbar/ImageScanner;->a:J

    const-wide/16 v2, 0x0

    cmp-long v4, v0, v2

    if-eqz v4, :cond_10

    iget-wide v0, p0, Lcom/yanzhenjie/zbar/ImageScanner;->a:J

    invoke-direct {p0, v0, v1}, Lcom/yanzhenjie/zbar/ImageScanner;->destroy(J)V

    iput-wide v2, p0, Lcom/yanzhenjie/zbar/ImageScanner;->a:J
    :try_end_10
    .catchall {:try_start_1 .. :try_end_10} :catchall_12

    :cond_10
    monitor-exit p0

    return-void

    :catchall_12
    move-exception v0

    monitor-exit p0

    throw v0
.end method

.method public b()Lcom/yanzhenjie/zbar/SymbolSet;
    .registers 4

    new-instance v0, Lcom/yanzhenjie/zbar/SymbolSet;

    iget-wide v1, p0, Lcom/yanzhenjie/zbar/ImageScanner;->a:J

    invoke-direct {p0, v1, v2}, Lcom/yanzhenjie/zbar/ImageScanner;->getResults(J)J

    move-result-wide v1

    invoke-direct {v0, v1, v2}, Lcom/yanzhenjie/zbar/SymbolSet;-><init>(J)V

    return-object v0
.end method

.method public native enableCache(Z)V
.end method

.method public finalize()V
    .registers 1

    invoke-virtual {p0}, Lcom/yanzhenjie/zbar/ImageScanner;->a()V

    return-void
.end method

.method public native parseConfig(Ljava/lang/String;)V
.end method

.method public native scanImage(Lcom/yanzhenjie/zbar/Image;)I
.end method

.method public native setConfig(III)V
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalArgumentException;
        }
    .end annotation
.end method