.class Lcom/moji/crop/CropUtil$BackgroundJob;
.super Lcom/moji/crop/MonitoredActivity$LifeCycleAdapter;
.source "CropUtil.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/moji/crop/CropUtil;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0xa
    name = "BackgroundJob"
.end annotation


# instance fields
.field private final a:Lcom/moji/crop/MonitoredActivity;

.field private final b:Landroid/app/ProgressDialog;

.field private final c:Ljava/lang/Runnable;

.field private final d:Landroid/os/Handler;

.field private final e:Ljava/lang/Runnable;


# direct methods
.method public constructor <init>(Lcom/moji/crop/MonitoredActivity;Ljava/lang/Runnable;Landroid/app/ProgressDialog;Landroid/os/Handler;)V
    .locals 1

    .line 232
    invoke-direct {p0}, Lcom/moji/crop/MonitoredActivity$LifeCycleAdapter;-><init>()V

    .line 224
    new-instance v0, Lcom/moji/crop/CropUtil$BackgroundJob$1;

    invoke-direct {v0, p0}, Lcom/moji/crop/CropUtil$BackgroundJob$1;-><init>(Lcom/moji/crop/CropUtil$BackgroundJob;)V

    iput-object v0, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->e:Ljava/lang/Runnable;

    .line 233
    iput-object p1, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->a:Lcom/moji/crop/MonitoredActivity;

    .line 234
    iput-object p3, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->b:Landroid/app/ProgressDialog;

    .line 235
    iput-object p2, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->c:Ljava/lang/Runnable;

    .line 236
    iget-object p1, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->a:Lcom/moji/crop/MonitoredActivity;

    invoke-virtual {p1, p0}, Lcom/moji/crop/MonitoredActivity;->addLifeCycleListener(Lcom/moji/crop/MonitoredActivity$LifeCycleListener;)V

    .line 237
    iput-object p4, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->d:Landroid/os/Handler;

    return-void
.end method

.method static synthetic a(Lcom/moji/crop/CropUtil$BackgroundJob;)Lcom/moji/crop/MonitoredActivity;
    .locals 0

    .line 218
    iget-object p0, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->a:Lcom/moji/crop/MonitoredActivity;

    return-object p0
.end method

.method static synthetic b(Lcom/moji/crop/CropUtil$BackgroundJob;)Landroid/app/ProgressDialog;
    .locals 0

    .line 218
    iget-object p0, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->b:Landroid/app/ProgressDialog;

    return-object p0
.end method


# virtual methods
.method public a(Lcom/moji/crop/MonitoredActivity;)V
    .locals 1

    .line 252
    iget-object p1, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->e:Ljava/lang/Runnable;

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

    .line 253
    iget-object p1, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->d:Landroid/os/Handler;

    iget-object v0, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->e:Ljava/lang/Runnable;

    invoke-virtual {p1, v0}, Landroid/os/Handler;->removeCallbacks(Ljava/lang/Runnable;)V

    return-void
.end method

.method public b(Lcom/moji/crop/MonitoredActivity;)V
    .locals 0

    .line 258
    iget-object p1, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->b:Landroid/app/ProgressDialog;

    invoke-virtual {p1}, Landroid/app/ProgressDialog;->hide()V

    return-void
.end method

.method public c(Lcom/moji/crop/MonitoredActivity;)V
    .locals 0

    .line 263
    iget-object p1, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->b:Landroid/app/ProgressDialog;

    invoke-virtual {p1}, Landroid/app/ProgressDialog;->show()V

    return-void
.end method

.method public run()V
    .locals 3

    .line 242
    :try_start_0
    iget-object v0, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->c:Ljava/lang/Runnable;

    invoke-interface {v0}, Ljava/lang/Runnable;->run()V
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    .line 244
    iget-object v0, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->d:Landroid/os/Handler;

    iget-object v1, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->e:Ljava/lang/Runnable;

    invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    return-void

    :catchall_0
    move-exception v0

    iget-object v1, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->d:Landroid/os/Handler;

    iget-object v2, p0, Lcom/moji/crop/CropUtil$BackgroundJob;->e:Ljava/lang/Runnable;

    invoke-virtual {v1, v2}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z

    .line 245
    throw v0
.end method
