.class public Lcom/moji/camera/PhotoActivity;
.super Landroid/support/v4/app/FragmentActivity;
.source "PhotoActivity.java"

# interfaces
.implements Landroid/view/View$OnClickListener;
.implements Lcom/moji/camera/PhotoCamera$OnResultListener;


# static fields
.field public static final CROPOPTIONS:Ljava/lang/String; = "cropoptions"

.field public static final GALLERYOPTIONS:Ljava/lang/String; = "galleryoptions"

.field public static final OPTION_ALBUM:I = 0x2

.field public static final OPTION_CAMERA:I = 0x1

.field public static final OPTION_CAMERA_ALBUM:I = 0x0

.field public static final PARAM:Ljava/lang/String; = "param"

.field public static final PHOTO_OPTION:Ljava/lang/String; = "photo_type"

.field public static final REQUESTCODE:I = 0x7b

.field public static final RESULT_EXTRA_DATA:Ljava/lang/String; = "result_extra_data"

.field public static final TITLE:Ljava/lang/String; = "title"


# instance fields
.field private a:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

.field private b:Lcom/moji/camera/permission/PermissionManager;

.field private c:Lcom/moji/camera/PhotoCamera;

.field private d:Ljava/lang/String;

.field private e:Lcom/moji/camera/model/GalleryOptions;

.field private f:Lcom/moji/camera/model/CropOptions;

.field private g:I

.field private h:Lcom/moji/camera/model/Param;


# direct methods
.method public constructor <init>()V
    .locals 1

    .line 35
    invoke-direct {p0}, Landroid/support/v4/app/FragmentActivity;-><init>()V

    const/4 v0, 0x0

    .line 52
    iput v0, p0, Lcom/moji/camera/PhotoActivity;->g:I

    return-void
.end method

.method static synthetic a(Lcom/moji/camera/PhotoActivity;)Lcom/moji/camera/model/Param;
    .locals 0

    .line 35
    iget-object p0, p0, Lcom/moji/camera/PhotoActivity;->h:Lcom/moji/camera/model/Param;

    return-object p0
.end method

.method private a()V
    .locals 3

    .line 96
    sget v0, Lcom/moji/camera/R$id;->status_layout:I

    invoke-virtual {p0, v0}, Lcom/moji/camera/PhotoActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    iput-object v0, p0, Lcom/moji/camera/PhotoActivity;->a:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    .line 97
    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->a:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {v0, p0}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 98
    new-instance v0, Lcom/moji/camera/permission/PermissionManager;

    invoke-direct {v0}, Lcom/moji/camera/permission/PermissionManager;-><init>()V

    iput-object v0, p0, Lcom/moji/camera/PhotoActivity;->b:Lcom/moji/camera/permission/PermissionManager;

    .line 99
    invoke-static {}, Lcom/moji/camera/PhotoManager;->a()Lcom/moji/camera/PhotoManager;

    move-result-object v0

    .line 100
    invoke-direct {p0}, Lcom/moji/camera/PhotoActivity;->b()V

    .line 101
    iget-object v1, p0, Lcom/moji/camera/PhotoActivity;->e:Lcom/moji/camera/model/GalleryOptions;

    iget-object v2, p0, Lcom/moji/camera/PhotoActivity;->f:Lcom/moji/camera/model/CropOptions;

    invoke-virtual {v0, v1, v2}, Lcom/moji/camera/PhotoManager;->a(Lcom/moji/camera/model/GalleryOptions;Lcom/moji/camera/model/CropOptions;)V

    .line 102
    iget-object v1, p0, Lcom/moji/camera/PhotoActivity;->b:Lcom/moji/camera/permission/PermissionManager;

    invoke-virtual {v0, p0, v1}, Lcom/moji/camera/PhotoManager;->a(Landroid/app/Activity;Lcom/moji/camera/permission/PermissionManager;)Lcom/moji/camera/PhotoCamera;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/camera/PhotoActivity;->c:Lcom/moji/camera/PhotoCamera;

    return-void
.end method

.method static synthetic b(Lcom/moji/camera/PhotoActivity;)Lcom/moji/camera/PhotoCamera;
    .locals 0

    .line 35
    iget-object p0, p0, Lcom/moji/camera/PhotoActivity;->c:Lcom/moji/camera/PhotoCamera;

    return-object p0
.end method

.method private b()V
    .locals 3

    .line 106
    invoke-virtual {p0}, Lcom/moji/camera/PhotoActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const/4 v1, 0x0

    if-eqz v0, :cond_1

    const-string v2, "title"

    .line 108
    invoke-virtual {v0, v2}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lcom/moji/camera/PhotoActivity;->d:Ljava/lang/String;

    .line 109
    iget-object v2, p0, Lcom/moji/camera/PhotoActivity;->d:Ljava/lang/String;

    invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v2

    if-eqz v2, :cond_0

    .line 110
    sget v2, Lcom/moji/camera/R$string;->please_select:I

    invoke-static {v2}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;

    move-result-object v2

    iput-object v2, p0, Lcom/moji/camera/PhotoActivity;->d:Ljava/lang/String;

    :cond_0
    const-string v2, "galleryoptions"

    .line 112
    invoke-virtual {v0, v2}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v2

    check-cast v2, Lcom/moji/camera/model/GalleryOptions;

    iput-object v2, p0, Lcom/moji/camera/PhotoActivity;->e:Lcom/moji/camera/model/GalleryOptions;

    const-string v2, "cropoptions"

    .line 113
    invoke-virtual {v0, v2}, Landroid/content/Intent;->getParcelableExtra(Ljava/lang/String;)Landroid/os/Parcelable;

    move-result-object v2

    check-cast v2, Lcom/moji/camera/model/CropOptions;

    iput-object v2, p0, Lcom/moji/camera/PhotoActivity;->f:Lcom/moji/camera/model/CropOptions;

    const-string v2, "photo_type"

    .line 114
    invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->getIntExtra(Ljava/lang/String;I)I

    move-result v1

    iput v1, p0, Lcom/moji/camera/PhotoActivity;->g:I

    const-string v1, "param"

    .line 115
    invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;

    move-result-object v0

    check-cast v0, Lcom/moji/camera/model/Param;

    iput-object v0, p0, Lcom/moji/camera/PhotoActivity;->h:Lcom/moji/camera/model/Param;

    goto :goto_0

    .line 117
    :cond_1
    new-instance v0, Lcom/moji/camera/model/GalleryOptions$Builder;

    invoke-direct {v0}, Lcom/moji/camera/model/GalleryOptions$Builder;-><init>()V

    const/4 v2, 0x1

    invoke-virtual {v0, v2}, Lcom/moji/camera/model/GalleryOptions$Builder;->a(Z)Lcom/moji/camera/model/GalleryOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v2}, Lcom/moji/camera/model/GalleryOptions$Builder;->a(I)Lcom/moji/camera/model/GalleryOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/moji/camera/model/GalleryOptions$Builder;->b(Z)Lcom/moji/camera/model/GalleryOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/camera/model/GalleryOptions$Builder;->a()Lcom/moji/camera/model/GalleryOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/camera/PhotoActivity;->e:Lcom/moji/camera/model/GalleryOptions;

    .line 118
    new-instance v0, Lcom/moji/camera/model/CropOptions$Builder;

    invoke-direct {v0}, Lcom/moji/camera/model/CropOptions$Builder;-><init>()V

    invoke-virtual {v0, v1}, Lcom/moji/camera/model/CropOptions$Builder;->a(I)Lcom/moji/camera/model/CropOptions$Builder;

    move-result-object v0

    invoke-virtual {v0, v1}, Lcom/moji/camera/model/CropOptions$Builder;->b(I)Lcom/moji/camera/model/CropOptions$Builder;

    move-result-object v0

    const/16 v1, 0x12c

    invoke-virtual {v0, v1}, Lcom/moji/camera/model/CropOptions$Builder;->c(I)Lcom/moji/camera/model/CropOptions$Builder;

    move-result-object v0

    const/16 v1, 0x190

    invoke-virtual {v0, v1}, Lcom/moji/camera/model/CropOptions$Builder;->d(I)Lcom/moji/camera/model/CropOptions$Builder;

    move-result-object v0

    invoke-virtual {v0}, Lcom/moji/camera/model/CropOptions$Builder;->a()Lcom/moji/camera/model/CropOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/moji/camera/PhotoActivity;->f:Lcom/moji/camera/model/CropOptions;

    :goto_0
    return-void
.end method

.method static synthetic c(Lcom/moji/camera/PhotoActivity;)Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;
    .locals 0

    .line 35
    iget-object p0, p0, Lcom/moji/camera/PhotoActivity;->a:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    return-object p0
.end method

.method private c()V
    .locals 6

    .line 123
    new-instance v0, Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;

    invoke-direct {v0, p0}, Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;-><init>(Landroid/content/Context;)V

    const/4 v1, 0x2

    new-array v2, v1, [I

    sget v3, Lcom/moji/camera/R$string;->image_select_from_take_photo:I

    const/4 v4, 0x0

    aput v3, v2, v4

    sget v3, Lcom/moji/camera/R$string;->image_select_from_album:I

    const/4 v5, 0x1

    aput v3, v2, v5

    .line 124
    invoke-virtual {v0, v2}, Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;->b([I)Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;

    move-result-object v0

    new-array v2, v1, [I

    sget v3, Lcom/moji/camera/R$color;->take_photo_by_camera:I

    aput v3, v2, v4

    sget v3, Lcom/moji/camera/R$color;->take_photo_by_local:I

    aput v3, v2, v5

    .line 125
    invoke-virtual {v0, v2}, Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;->c([I)Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;

    move-result-object v0

    new-array v1, v1, [I

    sget v2, Lcom/moji/camera/R$drawable;->icon_select_image_from_take_photo:I

    aput v2, v1, v4

    sget v2, Lcom/moji/camera/R$drawable;->activity_photo_album_icon:I

    aput v2, v1, v5

    .line 126
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;->a([I)Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;

    move-result-object v0

    new-instance v1, Lcom/moji/camera/PhotoActivity$2;

    invoke-direct {v1, p0}, Lcom/moji/camera/PhotoActivity$2;-><init>(Lcom/moji/camera/PhotoActivity;)V

    .line 127
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;->a(Lcom/moji/dialog/control/MJDialogRadioTwoControl$SingleRadioButtonCallback;)Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;

    move-result-object v0

    new-instance v1, Lcom/moji/camera/PhotoActivity$1;

    invoke-direct {v1, p0}, Lcom/moji/camera/PhotoActivity$1;-><init>(Lcom/moji/camera/PhotoActivity;)V

    .line 135
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;->b(Lcom/moji/dialog/control/MJDialogRadioTwoControl$SingleRadioButtonCallback;)Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;

    move-result-object v0

    iget-object v1, p0, Lcom/moji/camera/PhotoActivity;->d:Ljava/lang/String;

    .line 143
    invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogRadioTwoControl$Builder;->a(Ljava/lang/CharSequence;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;

    move-result-object v0

    .line 144
    invoke-virtual {v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b()Lcom/moji/dialog/MJDialog;

    move-result-object v0

    .line 145
    new-instance v1, Lcom/moji/camera/PhotoActivity$3;

    invoke-direct {v1, p0}, Lcom/moji/camera/PhotoActivity$3;-><init>(Lcom/moji/camera/PhotoActivity;)V

    invoke-virtual {v0, v1}, Lcom/moji/dialog/MJDialog;->setOnCancelListener(Landroid/content/DialogInterface$OnCancelListener;)V

    return-void
.end method

.method public static takePhoto(Landroid/app/Activity;I)V
    .locals 2

    .line 57
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/moji/camera/PhotoActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "photo_type"

    .line 58
    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    const/16 p1, 0x7b

    .line 59
    invoke-virtual {p0, v0, p1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V

    .line 60
    sget p1, Lcom/moji/camera/R$anim;->activity_open_bottom_in:I

    sget v0, Lcom/moji/camera/R$anim;->activity_close_bottom_out:I

    invoke-virtual {p0, p1, v0}, Landroid/app/Activity;->overridePendingTransition(II)V

    return-void
.end method

.method public static takePhoto(Landroid/app/Activity;Ljava/lang/String;Lcom/moji/camera/model/GalleryOptions;Lcom/moji/camera/model/CropOptions;)V
    .locals 6
    .param p2    # Lcom/moji/camera/model/GalleryOptions;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param
    .param p3    # Lcom/moji/camera/model/CropOptions;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    const/16 v4, 0x7b

    const/4 v5, 0x0

    move-object v0, p0

    move-object v1, p1

    move-object v2, p2

    move-object v3, p3

    .line 64
    invoke-static/range {v0 .. v5}, Lcom/moji/camera/PhotoActivity;->takePhoto(Landroid/app/Activity;Ljava/lang/String;Lcom/moji/camera/model/GalleryOptions;Lcom/moji/camera/model/CropOptions;ILcom/moji/camera/model/Param;)V

    return-void
.end method

.method public static takePhoto(Landroid/app/Activity;Ljava/lang/String;Lcom/moji/camera/model/GalleryOptions;Lcom/moji/camera/model/CropOptions;ILcom/moji/camera/model/Param;)V
    .locals 2
    .param p2    # Lcom/moji/camera/model/GalleryOptions;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param
    .param p3    # Lcom/moji/camera/model/CropOptions;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    .line 68
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/moji/camera/PhotoActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "galleryoptions"

    .line 69
    invoke-virtual {v0, v1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    const-string p2, "cropoptions"

    .line 70
    invoke-virtual {v0, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    const-string p2, "title"

    .line 71
    invoke-virtual {v0, p2, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string p1, "param"

    .line 72
    invoke-virtual {v0, p1, p5}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;

    .line 73
    invoke-virtual {p0, v0, p4}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V

    return-void
.end method


# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
    .locals 1

    .line 162
    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->c:Lcom/moji/camera/PhotoCamera;

    invoke-interface {v0, p1, p2, p3}, Lcom/moji/camera/PhotoCamera;->onActivityResult(IILandroid/content/Intent;)V

    .line 163
    invoke-super {p0, p1, p2, p3}, Landroid/support/v4/app/FragmentActivity;->onActivityResult(IILandroid/content/Intent;)V

    return-void
.end method

.method public onBackPressed()V
    .locals 0

    .line 218
    invoke-super {p0}, Landroid/support/v4/app/FragmentActivity;->onBackPressed()V

    .line 219
    invoke-virtual {p0}, Lcom/moji/camera/PhotoActivity;->takeCancel()V

    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .locals 1

    .line 211
    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->a:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    if-ne p1, v0, :cond_0

    .line 212
    invoke-virtual {p0}, Lcom/moji/camera/PhotoActivity;->takeCancel()V

    :cond_0
    return-void
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .locals 2
    .param p1    # Landroid/os/Bundle;
        .annotation build Landroid/support/annotation/Nullable;
        .end annotation
    .end param

    .line 78
    invoke-super {p0, p1}, Landroid/support/v4/app/FragmentActivity;->onCreate(Landroid/os/Bundle;)V

    .line 79
    invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;

    move-result-object v0

    sget-object v1, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_CAMERA_INDEX:Lcom/moji/statistics/EVENT_TAG;

    invoke-virtual {v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;

    .line 80
    sget v0, Lcom/moji/camera/R$layout;->activity_photo:I

    invoke-virtual {p0, v0}, Lcom/moji/camera/PhotoActivity;->setContentView(I)V

    .line 81
    invoke-direct {p0}, Lcom/moji/camera/PhotoActivity;->a()V

    if-eqz p1, :cond_0

    .line 82
    invoke-virtual {p1}, Landroid/os/Bundle;->isEmpty()Z

    move-result v0

    if-nez v0, :cond_0

    .line 83
    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->c:Lcom/moji/camera/PhotoCamera;

    invoke-interface {v0, p1, p0}, Lcom/moji/camera/PhotoCamera;->initArgs(Landroid/os/Bundle;Lcom/moji/camera/PhotoCamera$OnResultListener;)V

    .line 84
    iget-object p1, p0, Lcom/moji/camera/PhotoActivity;->a:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {p1}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->F()V

    goto :goto_0

    .line 86
    :cond_0
    iget p1, p0, Lcom/moji/camera/PhotoActivity;->g:I

    const/4 v0, 0x1

    if-ne p1, v0, :cond_1

    .line 87
    iget-object p1, p0, Lcom/moji/camera/PhotoActivity;->c:Lcom/moji/camera/PhotoCamera;

    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->h:Lcom/moji/camera/model/Param;

    invoke-interface {p1, p0, v0}, Lcom/moji/camera/PhotoCamera;->openCamera(Lcom/moji/camera/PhotoCamera$OnResultListener;Lcom/moji/camera/model/Param;)V

    .line 88
    iget-object p1, p0, Lcom/moji/camera/PhotoActivity;->a:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {p1}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->F()V

    goto :goto_0

    .line 90
    :cond_1
    invoke-direct {p0}, Lcom/moji/camera/PhotoActivity;->c()V

    :goto_0
    return-void
.end method

.method protected onPause()V
    .locals 2

    .line 224
    invoke-super {p0}, Landroid/support/v4/app/FragmentActivity;->onPause()V

    .line 225
    iget v0, p0, Lcom/moji/camera/PhotoActivity;->g:I

    const/4 v1, 0x1

    if-ne v0, v1, :cond_0

    .line 226
    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->a:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;

    invoke-virtual {v0}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->H()V

    :cond_0
    return-void
.end method

.method public onRequestPermissionsResult(I[Ljava/lang/String;[I)V
    .locals 2

    .line 168
    invoke-super {p0, p1, p2, p3}, Landroid/support/v4/app/FragmentActivity;->onRequestPermissionsResult(I[Ljava/lang/String;[I)V

    .line 169
    array-length v0, p2

    const/4 v1, 0x1

    if-lt v0, v1, :cond_4

    array-length v0, p3

    if-ge v0, v1, :cond_0

    goto :goto_1

    :cond_0
    const/4 v0, 0x0

    .line 172
    aget v1, p3, v0

    if-nez v1, :cond_2

    const-string p1, "android.permission.CAMERA"

    .line 173
    aget-object p3, p2, v0

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

    move-result p1

    if-eqz p1, :cond_1

    .line 174
    iget-object p1, p0, Lcom/moji/camera/PhotoActivity;->c:Lcom/moji/camera/PhotoCamera;

    iget-object p3, p0, Lcom/moji/camera/PhotoActivity;->h:Lcom/moji/camera/model/Param;

    invoke-interface {p1, p0, p3}, Lcom/moji/camera/PhotoCamera;->openCamera(Lcom/moji/camera/PhotoCamera$OnResultListener;Lcom/moji/camera/model/Param;)V

    :cond_1
    const-string p1, "android.permission.WRITE_EXTERNAL_STORAGE"

    .line 176
    aget-object p2, p2, v0

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

    move-result p1

    if-eqz p1, :cond_3

    .line 177
    iget-object p1, p0, Lcom/moji/camera/PhotoActivity;->c:Lcom/moji/camera/PhotoCamera;

    iget-object p2, p0, Lcom/moji/camera/PhotoActivity;->h:Lcom/moji/camera/model/Param;

    invoke-interface {p1, p0, p2}, Lcom/moji/camera/PhotoCamera;->openGallery(Lcom/moji/camera/PhotoCamera$OnResultListener;Lcom/moji/camera/model/Param;)V

    goto :goto_0

    .line 180
    :cond_2
    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->b:Lcom/moji/camera/permission/PermissionManager;

    if-eqz v0, :cond_3

    .line 181
    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->b:Lcom/moji/camera/permission/PermissionManager;

    invoke-virtual {v0, p0, p1, p2, p3}, Lcom/moji/camera/permission/PermissionManager;->a(Landroid/app/Activity;I[Ljava/lang/String;[I)V

    :cond_3
    :goto_0
    return-void

    :cond_4
    :goto_1
    return-void
.end method

.method protected onSaveInstanceState(Landroid/os/Bundle;)V
    .locals 1

    .line 156
    iget-object v0, p0, Lcom/moji/camera/PhotoActivity;->c:Lcom/moji/camera/PhotoCamera;

    invoke-interface {v0, p1}, Lcom/moji/camera/PhotoCamera;->onSaveInstanceState(Landroid/os/Bundle;)V

    .line 157
    invoke-super {p0, p1}, Landroid/support/v4/app/FragmentActivity;->onSaveInstanceState(Landroid/os/Bundle;)V

    return-void
.end method

.method public takeCancel()V
    .locals 2

    .line 203
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const/4 v1, 0x0

    .line 204
    invoke-virtual {p0, v1, v0}, Lcom/moji/camera/PhotoActivity;->setResult(ILandroid/content/Intent;)V

    .line 205
    invoke-virtual {p0}, Lcom/moji/camera/PhotoActivity;->finish()V

    .line 206
    sget v0, Lcom/moji/camera/R$anim;->empty_instead:I

    sget v1, Lcom/moji/camera/R$anim;->empty_instead:I

    invoke-virtual {p0, v0, v1}, Lcom/moji/camera/PhotoActivity;->overridePendingTransition(II)V

    return-void
.end method

.method public takeFail(Ljava/lang/String;)V
    .locals 1

    .line 197
    invoke-virtual {p0}, Lcom/moji/camera/PhotoActivity;->finish()V

    .line 198
    sget p1, Lcom/moji/camera/R$anim;->empty_instead:I

    sget v0, Lcom/moji/camera/R$anim;->empty_instead:I

    invoke-virtual {p0, p1, v0}, Lcom/moji/camera/PhotoActivity;->overridePendingTransition(II)V

    return-void
.end method

.method public takeSuccess(Ljava/util/ArrayList;)V
    .locals 2
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList<",
            "Lcom/moji/camera/model/Image;",
            ">;)V"
        }
    .end annotation

    .line 188
    new-instance v0, Landroid/content/Intent;

    invoke-direct {v0}, Landroid/content/Intent;-><init>()V

    const-string v1, "result_extra_data"

    .line 189
    invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putParcelableArrayListExtra(Ljava/lang/String;Ljava/util/ArrayList;)Landroid/content/Intent;

    const/4 p1, -0x1

    .line 190
    invoke-virtual {p0, p1, v0}, Lcom/moji/camera/PhotoActivity;->setResult(ILandroid/content/Intent;)V

    .line 191
    invoke-virtual {p0}, Lcom/moji/camera/PhotoActivity;->finish()V

    .line 192
    sget p1, Lcom/moji/camera/R$anim;->empty_instead:I

    sget v0, Lcom/moji/camera/R$anim;->empty_instead:I

    invoke-virtual {p0, p1, v0}, Lcom/moji/camera/PhotoActivity;->overridePendingTransition(II)V

    return-void
.end method
