.class Lcom/moji/camera/location/LocationListener$1;
.super Lcom/moji/tool/thread/task/MJAsyncTask;
.source "LocationListener.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/moji/camera/location/LocationListener;->onLocateSuccess(Lcom/moji/location/entity/MJLocation;)V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Lcom/moji/tool/thread/task/MJAsyncTask<",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        "Ljava/lang/Void;",
        ">;"
    }
.end annotation


# instance fields
.field final synthetic a:D

.field final synthetic b:D

.field final synthetic c:Lcom/moji/camera/location/LocationListener;


# direct methods
.method constructor <init>(Lcom/moji/camera/location/LocationListener;Lcom/moji/tool/thread/ThreadPriority;DD)V
    .locals 0

    .line 52
    iput-object p1, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    iput-wide p3, p0, Lcom/moji/camera/location/LocationListener$1;->a:D

    iput-wide p5, p0, Lcom/moji/camera/location/LocationListener$1;->b:D

    invoke-direct {p0, p2}, Lcom/moji/tool/thread/task/MJAsyncTask;-><init>(Lcom/moji/tool/thread/ThreadPriority;)V

    return-void
.end method


# virtual methods
.method protected bridge synthetic a([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 0

    .line 52
    check-cast p1, [Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/moji/camera/location/LocationListener$1;->a([Ljava/lang/Void;)Ljava/lang/Void;

    move-result-object p1

    return-object p1
.end method

.method protected varargs a([Ljava/lang/Void;)Ljava/lang/Void;
    .locals 10

    .line 55
    iget-object p1, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    iget-wide v0, p0, Lcom/moji/camera/location/LocationListener$1;->a:D

    const-wide/16 v2, 0x0

    cmpg-double v4, v0, v2

    if-gez v4, :cond_0

    iget-wide v0, p0, Lcom/moji/camera/location/LocationListener$1;->a:D

    neg-double v0, v0

    goto :goto_0

    :cond_0
    iget-wide v0, p0, Lcom/moji/camera/location/LocationListener$1;->a:D

    :goto_0
    invoke-static {p1, v0, v1}, Lcom/moji/camera/location/LocationListener;->a(Lcom/moji/camera/location/LocationListener;D)Ljava/lang/String;

    move-result-object p1

    .line 56
    iget-object v0, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    iget-wide v4, p0, Lcom/moji/camera/location/LocationListener$1;->b:D

    cmpg-double v1, v4, v2

    if-gez v1, :cond_1

    iget-wide v4, p0, Lcom/moji/camera/location/LocationListener$1;->b:D

    neg-double v4, v4

    goto :goto_1

    :cond_1
    iget-wide v4, p0, Lcom/moji/camera/location/LocationListener$1;->b:D

    :goto_1
    invoke-static {v0, v4, v5}, Lcom/moji/camera/location/LocationListener;->a(Lcom/moji/camera/location/LocationListener;D)Ljava/lang/String;

    move-result-object v0

    const-string v1, "file"

    .line 58
    iget-object v4, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    invoke-static {v4}, Lcom/moji/camera/location/LocationListener;->a(Lcom/moji/camera/location/LocationListener;)Landroid/net/Uri;

    move-result-object v4

    invoke-virtual {v4}, Landroid/net/Uri;->getScheme()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_2

    .line 59
    iget-object v1, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    invoke-static {v1}, Lcom/moji/camera/location/LocationListener;->a(Lcom/moji/camera/location/LocationListener;)Landroid/net/Uri;

    move-result-object v1

    invoke-virtual {v1}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v1

    goto :goto_2

    .line 61
    :cond_2
    iget-object v1, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    invoke-static {v1}, Lcom/moji/camera/location/LocationListener;->b(Lcom/moji/camera/location/LocationListener;)Landroid/content/Context;

    move-result-object v1

    invoke-virtual {v1}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    iget-object v4, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    invoke-static {v4}, Lcom/moji/camera/location/LocationListener;->a(Lcom/moji/camera/location/LocationListener;)Landroid/net/Uri;

    move-result-object v4

    invoke-static {v1, v4}, Lcom/moji/camera/utils/FileUtils;->a(Landroid/content/ContentResolver;Landroid/net/Uri;)Ljava/lang/String;

    move-result-object v1

    .line 63
    :goto_2
    invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    const/4 v5, 0x0

    if-eqz v4, :cond_3

    return-object v5

    .line 66
    :cond_3
    new-instance v4, Landroid/graphics/BitmapFactory$Options;

    invoke-direct {v4}, Landroid/graphics/BitmapFactory$Options;-><init>()V

    const/4 v6, 0x1

    .line 67
    iput-boolean v6, v4, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z

    .line 68
    invoke-static {v1, v4}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;

    .line 69
    iget v6, v4, Landroid/graphics/BitmapFactory$Options;->outWidth:I

    invoke-static {v6}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v6

    .line 70
    iget v4, v4, Landroid/graphics/BitmapFactory$Options;->outHeight:I

    invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v4

    .line 72
    :try_start_0
    new-instance v7, Landroid/media/ExifInterface;

    invoke-direct {v7, v1}, Landroid/media/ExifInterface;-><init>(Ljava/lang/String;)V

    const-string v1, "GPSLongitude"

    .line 73
    invoke-virtual {v7, v1, p1}, Landroid/media/ExifInterface;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "GPSLongitudeRef"

    .line 74
    iget-wide v8, p0, Lcom/moji/camera/location/LocationListener$1;->a:D

    cmpl-double v1, v8, v2

    if-lez v1, :cond_4

    const-string v1, "E"

    goto :goto_3

    :cond_4
    const-string v1, "W"

    :goto_3
    invoke-virtual {v7, p1, v1}, Landroid/media/ExifInterface;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "GPSLatitude"

    .line 75
    invoke-virtual {v7, p1, v0}, Landroid/media/ExifInterface;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "GPSLatitudeRef"

    .line 76
    iget-wide v0, p0, Lcom/moji/camera/location/LocationListener$1;->b:D

    cmpl-double v8, v0, v2

    if-lez v8, :cond_5

    const-string v0, "N"

    goto :goto_4

    :cond_5
    const-string v0, "S"

    :goto_4
    invoke-virtual {v7, p1, v0}, Landroid/media/ExifInterface;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "ImageWidth"

    .line 77
    invoke-virtual {v7, p1, v6}, Landroid/media/ExifInterface;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "ImageLength"

    .line 78
    invoke-virtual {v7, p1, v4}, Landroid/media/ExifInterface;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "DateTime"

    .line 79
    iget-object v0, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    invoke-static {v0}, Lcom/moji/camera/location/LocationListener;->c(Lcom/moji/camera/location/LocationListener;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v7, p1, v0}, Landroid/media/ExifInterface;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    const-string p1, "Model"

    .line 80
    iget-object v0, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    invoke-static {v0}, Lcom/moji/camera/location/LocationListener;->d(Lcom/moji/camera/location/LocationListener;)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v7, p1, v0}, Landroid/media/ExifInterface;->setAttribute(Ljava/lang/String;Ljava/lang/String;)V

    .line 81
    invoke-virtual {v7}, Landroid/media/ExifInterface;->saveAttributes()V
    :try_end_0
    .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_5

    :catch_0
    move-exception p1

    const-string v0, "LocationListener"

    .line 84
    invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V

    :goto_5
    return-object v5
.end method

.method protected bridge synthetic a(Ljava/lang/Object;)V
    .locals 0

    .line 52
    check-cast p1, Ljava/lang/Void;

    invoke-virtual {p0, p1}, Lcom/moji/camera/location/LocationListener$1;->a(Ljava/lang/Void;)V

    return-void
.end method

.method protected a(Ljava/lang/Void;)V
    .locals 0

    .line 91
    invoke-super {p0, p1}, Lcom/moji/tool/thread/task/MJAsyncTask;->a(Ljava/lang/Object;)V

    .line 92
    iget-object p1, p0, Lcom/moji/camera/location/LocationListener$1;->c:Lcom/moji/camera/location/LocationListener;

    invoke-static {p1}, Lcom/moji/camera/location/LocationListener;->e(Lcom/moji/camera/location/LocationListener;)Ljava/lang/Runnable;

    move-result-object p1

    invoke-interface {p1}, Ljava/lang/Runnable;->run()V

    return-void
.end method
