910 lines
24 KiB
Smali
910 lines
24 KiB
Smali
.class public Lcom/moji/postcard/ui/PostCardCropActivity;
|
|
.super Lcom/moji/base/MJActivity;
|
|
.source "PostCardCropActivity.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/view/View$OnClickListener;
|
|
.implements Lcom/moji/postcard/presenter/PostCardCompressAsyncTask$CompressAsyncTaskCallback;
|
|
|
|
|
|
# static fields
|
|
.field public static final EXTRA_DATA:Ljava/lang/String; = "extra_data"
|
|
|
|
.field public static final EXTRA_DATA_INDEXACTIVITY_CLASS:Ljava/lang/String; = "extra_data_indexactivity_class"
|
|
|
|
|
|
# instance fields
|
|
.field private a:Landroid/content/ContentResolver;
|
|
|
|
.field private b:Lcom/moji/camera/model/Image;
|
|
|
|
.field private c:Z
|
|
|
|
.field private i:I
|
|
|
|
.field private j:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;
|
|
|
|
.field private k:Lcom/moji/crop/CropView;
|
|
|
|
.field private l:Landroid/widget/ImageView;
|
|
|
|
.field private m:Lcom/moji/titlebar/MJTitleBar;
|
|
|
|
.field private n:Landroid/widget/TextView;
|
|
|
|
.field private o:J
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 42
|
|
invoke-direct {p0}, Lcom/moji/base/MJActivity;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Landroid/graphics/BitmapFactory$Options;II)I
|
|
.locals 1
|
|
|
|
.line 182
|
|
iget v0, p1, Landroid/graphics/BitmapFactory$Options;->outWidth:I
|
|
|
|
.line 183
|
|
iget p1, p1, Landroid/graphics/BitmapFactory$Options;->outHeight:I
|
|
|
|
if-gt p1, p3, :cond_1
|
|
|
|
if-le v0, p2, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x1
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
if-le v0, p1, :cond_2
|
|
|
|
.line 189
|
|
div-int p1, v0, p2
|
|
|
|
goto :goto_1
|
|
|
|
.line 191
|
|
:cond_2
|
|
div-int/2addr p1, p3
|
|
|
|
:goto_1
|
|
return p1
|
|
.end method
|
|
|
|
.method private a()V
|
|
.locals 2
|
|
|
|
.line 70
|
|
invoke-virtual {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->getContentResolver()Landroid/content/ContentResolver;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->a:Landroid/content/ContentResolver;
|
|
|
|
.line 71
|
|
invoke-virtual {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:cond_0
|
|
const-string v1, "extra_data"
|
|
|
|
.line 75
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getParcelableArrayListExtra(Ljava/lang/String;)Ljava/util/ArrayList;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 76
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/camera/model/Image;
|
|
|
|
iput-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->b:Lcom/moji/camera/model/Image;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method static synthetic a(Lcom/moji/postcard/ui/PostCardCropActivity;)V
|
|
.locals 0
|
|
|
|
.line 42
|
|
invoke-direct {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->j()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private b()V
|
|
.locals 3
|
|
|
|
.line 80
|
|
sget v0, Lcom/moji/postcard/R$id;->title_layout:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/postcard/ui/PostCardCropActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/titlebar/MJTitleBar;
|
|
|
|
iput-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->m:Lcom/moji/titlebar/MJTitleBar;
|
|
|
|
.line 81
|
|
sget v0, Lcom/moji/postcard/R$id;->status_layout:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/postcard/ui/PostCardCropActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;
|
|
|
|
iput-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->j:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;
|
|
|
|
.line 82
|
|
sget v0, Lcom/moji/postcard/R$id;->iv_rotate:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/postcard/ui/PostCardCropActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/ImageView;
|
|
|
|
iput-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->l:Landroid/widget/ImageView;
|
|
|
|
.line 83
|
|
sget v0, Lcom/moji/postcard/R$id;->tv_confirm:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/postcard/ui/PostCardCropActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Landroid/widget/TextView;
|
|
|
|
iput-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->n:Landroid/widget/TextView;
|
|
|
|
.line 84
|
|
sget v0, Lcom/moji/postcard/R$id;->cv_croper_image:I
|
|
|
|
invoke-virtual {p0, v0}, Lcom/moji/postcard/ui/PostCardCropActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Lcom/moji/crop/CropView;
|
|
|
|
iput-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
.line 85
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/crop/CropView;->setCircleCrop(Z)V
|
|
|
|
.line 86
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
|
|
|
|
move-result v0
|
|
|
|
const/high16 v1, 0x41c00000 # 24.0f
|
|
|
|
invoke-static {v1}, Lcom/moji/tool/DeviceTool;->a(F)I
|
|
|
|
move-result v1
|
|
|
|
sub-int/2addr v0, v1
|
|
|
|
int-to-float v1, v0
|
|
|
|
const v2, 0x44dd8000 # 1772.0f
|
|
|
|
div-float/2addr v1, v2
|
|
|
|
const v2, 0x4493a000 # 1181.0f
|
|
|
|
mul-float v1, v1, v2
|
|
|
|
float-to-int v1, v1
|
|
|
|
.line 88
|
|
iget-object v2, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
invoke-virtual {v2, v0}, Lcom/moji/crop/CropView;->setFocusViewWidth(I)V
|
|
|
|
.line 89
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/crop/CropView;->setFocusViewHeight(I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private c()V
|
|
.locals 2
|
|
|
|
.line 93
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->m:Lcom/moji/titlebar/MJTitleBar;
|
|
|
|
const-string v1, "\u7f16\u8f91\u660e\u4fe1\u7247\u6b63\u9762"
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setTitleText(Ljava/lang/CharSequence;)V
|
|
|
|
.line 94
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->m:Lcom/moji/titlebar/MJTitleBar;
|
|
|
|
new-instance v1, Lcom/moji/postcard/ui/PostCardCropActivity$1;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/postcard/ui/PostCardCropActivity$1;-><init>(Lcom/moji/postcard/ui/PostCardCropActivity;)V
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/titlebar/MJTitleBar;->setOnClickBackListener(Lcom/moji/titlebar/MJTitleBar$OnClickBack;)V
|
|
|
|
.line 100
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->l:Landroid/widget/ImageView;
|
|
|
|
invoke-virtual {v0, p0}, Landroid/widget/ImageView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
.line 101
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->n:Landroid/widget/TextView;
|
|
|
|
invoke-virtual {v0, p0}, Landroid/widget/TextView;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private d()V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 109
|
|
:try_start_0
|
|
iget-object v1, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->a:Landroid/content/ContentResolver;
|
|
|
|
iget-object v2, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->b:Lcom/moji/camera/model/Image;
|
|
|
|
iget-object v2, v2, Lcom/moji/camera/model/Image;->contentUri:Landroid/net/Uri;
|
|
|
|
invoke-virtual {v1, v2}, Landroid/content/ContentResolver;->openInputStream(Landroid/net/Uri;)Ljava/io/InputStream;
|
|
|
|
move-result-object v1
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_5
|
|
.catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_4
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_1
|
|
|
|
.line 110
|
|
:try_start_1
|
|
new-instance v2, Landroid/graphics/BitmapFactory$Options;
|
|
|
|
invoke-direct {v2}, Landroid/graphics/BitmapFactory$Options;-><init>()V
|
|
|
|
const/4 v3, 0x1
|
|
|
|
.line 111
|
|
iput-boolean v3, v2, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z
|
|
|
|
.line 112
|
|
invoke-static {v1, v0, v2}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
|
|
|
|
.line 113
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
|
|
|
|
move-result v3
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->c()I
|
|
|
|
move-result v4
|
|
|
|
invoke-direct {p0, v2, v3, v4}, Lcom/moji/postcard/ui/PostCardCropActivity;->a(Landroid/graphics/BitmapFactory$Options;II)I
|
|
|
|
move-result v3
|
|
|
|
iput v3, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->i:I
|
|
|
|
.line 114
|
|
iget v3, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->i:I
|
|
|
|
iput v3, v2, Landroid/graphics/BitmapFactory$Options;->inSampleSize:I
|
|
|
|
const/4 v3, 0x0
|
|
|
|
.line 115
|
|
iput-boolean v3, v2, Landroid/graphics/BitmapFactory$Options;->inJustDecodeBounds:Z
|
|
|
|
.line 116
|
|
iget-object v3, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->a:Landroid/content/ContentResolver;
|
|
|
|
iget-object v4, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->b:Lcom/moji/camera/model/Image;
|
|
|
|
iget-object v4, v4, Lcom/moji/camera/model/Image;->contentUri:Landroid/net/Uri;
|
|
|
|
invoke-virtual {v3, v4}, Landroid/content/ContentResolver;->openInputStream(Landroid/net/Uri;)Ljava/io/InputStream;
|
|
|
|
move-result-object v3
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_3
|
|
.catch Ljava/lang/OutOfMemoryError; {:try_start_1 .. :try_end_1} :catch_2
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 117
|
|
:try_start_2
|
|
invoke-static {v3, v0, v2}, Landroid/graphics/BitmapFactory;->decodeStream(Ljava/io/InputStream;Landroid/graphics/Rect;Landroid/graphics/BitmapFactory$Options;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v2
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_1
|
|
.catch Ljava/lang/OutOfMemoryError; {:try_start_2 .. :try_end_2} :catch_0
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_2
|
|
|
|
.line 123
|
|
invoke-static {v1}, Lcom/moji/crop/CropUtil;->a(Ljava/io/Closeable;)V
|
|
|
|
.line 124
|
|
invoke-static {v3}, Lcom/moji/crop/CropUtil;->a(Ljava/io/Closeable;)V
|
|
|
|
move-object v0, v2
|
|
|
|
goto :goto_3
|
|
|
|
:catch_0
|
|
move-exception v2
|
|
|
|
goto :goto_0
|
|
|
|
:catch_1
|
|
move-exception v2
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception v2
|
|
|
|
goto :goto_4
|
|
|
|
:catch_2
|
|
move-exception v2
|
|
|
|
move-object v3, v0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_3
|
|
move-exception v2
|
|
|
|
move-object v3, v0
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_1
|
|
move-exception v1
|
|
|
|
move-object v2, v1
|
|
|
|
move-object v1, v0
|
|
|
|
goto :goto_4
|
|
|
|
:catch_4
|
|
move-exception v2
|
|
|
|
move-object v1, v0
|
|
|
|
move-object v3, v1
|
|
|
|
:goto_0
|
|
:try_start_3
|
|
const-string v4, "PostCardCropActivity"
|
|
|
|
.line 121
|
|
invoke-virtual {v2}, Ljava/lang/OutOfMemoryError;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v4, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
|
|
goto :goto_2
|
|
|
|
:catch_5
|
|
move-exception v2
|
|
|
|
move-object v1, v0
|
|
|
|
move-object v3, v1
|
|
|
|
:goto_1
|
|
const-string v4, "PostCardCropActivity"
|
|
|
|
.line 119
|
|
invoke-virtual {v2}, Ljava/io/IOException;->getMessage()Ljava/lang/String;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-static {v4, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
|
|
:try_end_3
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_2
|
|
|
|
.line 123
|
|
:goto_2
|
|
invoke-static {v1}, Lcom/moji/crop/CropUtil;->a(Ljava/io/Closeable;)V
|
|
|
|
.line 124
|
|
invoke-static {v3}, Lcom/moji/crop/CropUtil;->a(Ljava/io/Closeable;)V
|
|
|
|
.line 126
|
|
:goto_3
|
|
iget-object v1, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
invoke-virtual {v1, v0}, Lcom/moji/crop/CropView;->setImageBitmap(Landroid/graphics/Bitmap;)V
|
|
|
|
return-void
|
|
|
|
:catchall_2
|
|
move-exception v0
|
|
|
|
move-object v2, v0
|
|
|
|
move-object v0, v3
|
|
|
|
.line 123
|
|
:goto_4
|
|
invoke-static {v1}, Lcom/moji/crop/CropUtil;->a(Ljava/io/Closeable;)V
|
|
|
|
.line 124
|
|
invoke-static {v0}, Lcom/moji/crop/CropUtil;->a(Ljava/io/Closeable;)V
|
|
|
|
.line 125
|
|
throw v2
|
|
.end method
|
|
|
|
.method private e()V
|
|
.locals 5
|
|
|
|
.line 198
|
|
iget-boolean v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->c:Z
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 201
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
return-void
|
|
|
|
.line 204
|
|
:cond_1
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->j:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;
|
|
|
|
const-string v1, "\u6b63\u5728\u88c1\u526a\u56fe\u7247\uff0c\u8bf7\u7a0d\u7b49..."
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->a(Ljava/lang/String;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 205
|
|
iput-boolean v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->c:Z
|
|
|
|
.line 206
|
|
iget-object v1, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
invoke-virtual {v1, v0}, Lcom/moji/crop/CropView;->setSaving(Z)V
|
|
|
|
.line 208
|
|
new-instance v0, Lcom/moji/postcard/presenter/PostCardCompressAsyncTask;
|
|
|
|
iget-object v1, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->a:Landroid/content/ContentResolver;
|
|
|
|
iget-object v2, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->b:Lcom/moji/camera/model/Image;
|
|
|
|
iget-object v3, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
iget v4, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->i:I
|
|
|
|
invoke-direct {v0, v1, v2, v3, v4}, Lcom/moji/postcard/presenter/PostCardCompressAsyncTask;-><init>(Landroid/content/ContentResolver;Lcom/moji/camera/model/Image;Lcom/moji/crop/CropView;I)V
|
|
|
|
.line 209
|
|
invoke-virtual {v0, p0}, Lcom/moji/postcard/presenter/PostCardCompressAsyncTask;->a(Lcom/moji/postcard/presenter/PostCardCompressAsyncTask$CompressAsyncTaskCallback;)V
|
|
|
|
.line 210
|
|
sget-object v1, Lcom/moji/tool/thread/ThreadType;->IO_THREAD:Lcom/moji/tool/thread/ThreadType;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
new-array v2, v2, [Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/postcard/presenter/PostCardCompressAsyncTask;->a(Lcom/moji/tool/thread/ThreadType;[Ljava/lang/Object;)Lcom/moji/tool/thread/task/MJAsyncTask;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private j()V
|
|
.locals 4
|
|
|
|
const-string v0, "\u9000\u51fa\u9875\u9762\u5f53\u524d\u7f16\u8f91\u5185\u5bb9\u5c06\u4f1a\u4e22\u5931\uff0c\u786e\u8ba4\u9000\u51fa\u5417\uff1f"
|
|
|
|
.line 235
|
|
new-instance v1, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;-><init>(Landroid/content/Context;)V
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v3, "\n"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v0, "\n"
|
|
|
|
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 236
|
|
invoke-virtual {v1, v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b(Ljava/lang/CharSequence;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "\u53d6\u6d88"
|
|
|
|
.line 237
|
|
invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->d(Ljava/lang/CharSequence;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 238
|
|
invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->d(Z)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "\u786e\u8ba4\u9000\u51fa"
|
|
|
|
.line 239
|
|
invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->c(Ljava/lang/CharSequence;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/moji/postcard/ui/PostCardCropActivity$2;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/postcard/ui/PostCardCropActivity$2;-><init>(Lcom/moji/postcard/ui/PostCardCropActivity;)V
|
|
|
|
.line 240
|
|
invoke-virtual {v0, v1}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->a(Lcom/moji/dialog/control/MJDialogDefaultControl$SingleButtonCallback;)Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;
|
|
|
|
move-result-object v0
|
|
|
|
.line 253
|
|
invoke-virtual {v0}, Lcom/moji/dialog/control/MJDialogDefaultControl$Builder;->b()Lcom/moji/dialog/MJDialog;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public compressComplete(J)V
|
|
.locals 3
|
|
|
|
.line 215
|
|
invoke-static {}, Lcom/moji/preferences/PostCardPrefer;->c()Lcom/moji/preferences/PostCardPrefer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/PostCardPrefer;->d()I
|
|
|
|
move-result v0
|
|
|
|
const-wide/16 v1, 0x400
|
|
|
|
.line 216
|
|
div-long/2addr p1, v1
|
|
|
|
int-to-long v0, v0
|
|
|
|
cmp-long v2, p1, v0
|
|
|
|
if-gez v2, :cond_0
|
|
|
|
.line 217
|
|
iget-object p1, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->j:Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/multiplestatuslayout/MJMultipleStatusLayout;->b()V
|
|
|
|
const/4 p1, 0x0
|
|
|
|
.line 218
|
|
iput-boolean p1, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->c:Z
|
|
|
|
.line 219
|
|
iget-object p2, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
invoke-virtual {p2, p1}, Lcom/moji/crop/CropView;->setSaving(Z)V
|
|
|
|
.line 220
|
|
invoke-direct {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->d()V
|
|
|
|
const-string p1, "\u60a8\u7684\u56fe\u7247\u8d28\u91cf\u8fc7\u4f4e\uff0c\u8bf7\u9009\u62e9\u8d28\u91cf\u8f83\u9ad8\u7684\u56fe\u7247\u5236\u4f5c\u660e\u4fe1\u7247"
|
|
|
|
.line 221
|
|
invoke-static {p1}, Lcom/moji/tool/ToastTool;->a(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
|
|
.line 224
|
|
:cond_0
|
|
new-instance p1, Landroid/content/Intent;
|
|
|
|
const-class p2, Lcom/moji/postcard/ui/EditLocationActivity;
|
|
|
|
invoke-direct {p1, p0, p2}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
.line 225
|
|
invoke-virtual {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object p2
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
const-string p2, "extra_data_indexactivity_class"
|
|
|
|
.line 226
|
|
invoke-virtual {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->getIntent()Landroid/content/Intent;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "extra_data_indexactivity_class"
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent;
|
|
|
|
:cond_1
|
|
const-string p2, "extra_data"
|
|
|
|
.line 228
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->b:Lcom/moji/camera/model/Image;
|
|
|
|
invoke-virtual {p1, p2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
.line 229
|
|
invoke-virtual {p0, p1}, Lcom/moji/postcard/ui/PostCardCropActivity;->startActivity(Landroid/content/Intent;)V
|
|
|
|
.line 230
|
|
invoke-virtual {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public onClick(Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
.line 131
|
|
invoke-static {}, Lcom/moji/tool/Utils;->b()Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-void
|
|
|
|
.line 134
|
|
:cond_0
|
|
invoke-virtual {p1}, Landroid/view/View;->getId()I
|
|
|
|
move-result p1
|
|
|
|
.line 135
|
|
sget v0, Lcom/moji/postcard/R$id;->iv_rotate:I
|
|
|
|
if-ne p1, v0, :cond_1
|
|
|
|
.line 136
|
|
iget-object p1, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
const/16 v0, 0x5a
|
|
|
|
invoke-virtual {p1, v0}, Lcom/moji/crop/CropView;->a(I)V
|
|
|
|
.line 137
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_POSTCARD_PHOTO_TURN_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
invoke-virtual {p1, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;
|
|
|
|
goto :goto_0
|
|
|
|
.line 138
|
|
:cond_1
|
|
sget v0, Lcom/moji/postcard/R$id;->tv_confirm:I
|
|
|
|
if-ne p1, v0, :cond_2
|
|
|
|
.line 139
|
|
invoke-direct {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->e()V
|
|
|
|
.line 140
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_POSTCARD_PHOTO_USE_CLICK:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
invoke-virtual {p1, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;
|
|
|
|
:cond_2
|
|
:goto_0
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onCreate(Landroid/os/Bundle;)V
|
|
.locals 1
|
|
|
|
.line 60
|
|
invoke-super {p0, p1}, Lcom/moji/base/MJActivity;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
.line 61
|
|
sget p1, Lcom/moji/postcard/R$layout;->mjpostcard_activity_postcard_crop:I
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/postcard/ui/PostCardCropActivity;->setContentView(I)V
|
|
|
|
.line 62
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v0, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_POSTCARD_PHOTO_USE_SHOW:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
invoke-virtual {p1, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 63
|
|
invoke-direct {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->a()V
|
|
|
|
.line 64
|
|
invoke-direct {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->b()V
|
|
|
|
.line 65
|
|
invoke-direct {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->c()V
|
|
|
|
.line 66
|
|
invoke-direct {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->d()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onDestroy()V
|
|
.locals 1
|
|
|
|
.line 155
|
|
invoke-super {p0}, Lcom/moji/base/MJActivity;->onDestroy()V
|
|
|
|
.line 156
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 157
|
|
iget-object v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->k:Lcom/moji/crop/CropView;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/crop/CropView;->a()V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method public onKeyDown(ILandroid/view/KeyEvent;)Z
|
|
.locals 2
|
|
|
|
.line 146
|
|
invoke-virtual {p2}, Landroid/view/KeyEvent;->getKeyCode()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x4
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
.line 147
|
|
invoke-direct {p0}, Lcom/moji/postcard/ui/PostCardCropActivity;->j()V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
.line 150
|
|
:cond_0
|
|
invoke-super {p0, p1, p2}, Lcom/moji/base/MJActivity;->onKeyDown(ILandroid/view/KeyEvent;)Z
|
|
|
|
move-result p1
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method protected onPause()V
|
|
.locals 7
|
|
|
|
.line 171
|
|
invoke-super {p0}, Lcom/moji/base/MJActivity;->onPause()V
|
|
|
|
.line 172
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
iget-wide v2, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->o:J
|
|
|
|
sub-long/2addr v0, v2
|
|
|
|
.line 173
|
|
iget-wide v2, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->o:J
|
|
|
|
const-wide/16 v4, 0x0
|
|
|
|
cmp-long v6, v2, v4
|
|
|
|
if-eqz v6, :cond_0
|
|
|
|
cmp-long v2, v0, v4
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 175
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v2
|
|
|
|
sget-object v3, Lcom/moji/statistics/EVENT_TAG;->NEWLIVEVIEW_POSTCARD_DURATION:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
const-string v4, "1"
|
|
|
|
invoke-virtual {v2, v3, v4, v0, v1}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;J)Lcom/moji/statistics/EventManager;
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onResume()V
|
|
.locals 2
|
|
|
|
.line 163
|
|
invoke-super {p0}, Lcom/moji/base/MJActivity;->onResume()V
|
|
|
|
.line 164
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v0
|
|
|
|
iput-wide v0, p0, Lcom/moji/postcard/ui/PostCardCropActivity;->o:J
|
|
|
|
return-void
|
|
.end method
|