155 lines
3.9 KiB
Smali
155 lines
3.9 KiB
Smali
.class public Lcom/moji/camera/CameraResultActivity;
|
|
.super Lcom/moji/base/MJActivity;
|
|
.source "CameraResultActivity.java"
|
|
|
|
# interfaces
|
|
.implements Landroid/view/View$OnClickListener;
|
|
|
|
|
|
# static fields
|
|
.field public static final REQ_CODE:I = 0x24
|
|
|
|
|
|
# instance fields
|
|
.field private a:Landroid/view/View;
|
|
|
|
.field private b:Landroid/view/View;
|
|
|
|
.field private c:Landroid/widget/ImageView;
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 14
|
|
invoke-direct {p0}, Lcom/moji/base/MJActivity;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a()V
|
|
.locals 2
|
|
|
|
.line 51
|
|
iget-object v0, p0, Lcom/moji/camera/CameraResultActivity;->a:Landroid/view/View;
|
|
|
|
invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
.line 52
|
|
iget-object v0, p0, Lcom/moji/camera/CameraResultActivity;->b:Landroid/view/View;
|
|
|
|
invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V
|
|
|
|
.line 53
|
|
iget-object v0, p0, Lcom/moji/camera/CameraResultActivity;->c:Landroid/widget/ImageView;
|
|
|
|
sget-object v1, Lcom/moji/camera/CameraActivity;->CAMERA_CROP_PATH:Ljava/lang/String;
|
|
|
|
invoke-static {v1}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageBitmap(Landroid/graphics/Bitmap;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static start(Landroid/app/Activity;I)V
|
|
.locals 2
|
|
|
|
.line 35
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
const-class v1, Lcom/moji/camera/CameraResultActivity;
|
|
|
|
invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V
|
|
|
|
.line 36
|
|
invoke-virtual {p0, v0, p1}, Landroid/app/Activity;->startActivityForResult(Landroid/content/Intent;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public onClick(Landroid/view/View;)V
|
|
.locals 1
|
|
|
|
.line 25
|
|
invoke-virtual {p1}, Landroid/view/View;->getId()I
|
|
|
|
move-result p1
|
|
|
|
.line 27
|
|
sget v0, Lcom/moji/camera/R$id;->action:I
|
|
|
|
if-ne p1, v0, :cond_0
|
|
|
|
const/4 p1, -0x1
|
|
|
|
.line 28
|
|
invoke-virtual {p0, p1}, Lcom/moji/camera/CameraResultActivity;->setResult(I)V
|
|
|
|
.line 30
|
|
:cond_0
|
|
invoke-virtual {p0}, Lcom/moji/camera/CameraResultActivity;->finish()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected onCreate(Landroid/os/Bundle;)V
|
|
.locals 2
|
|
|
|
.line 41
|
|
invoke-virtual {p0}, Lcom/moji/camera/CameraResultActivity;->getWindow()Landroid/view/Window;
|
|
|
|
move-result-object v0
|
|
|
|
const/16 v1, 0x400
|
|
|
|
invoke-virtual {v0, v1, v1}, Landroid/view/Window;->setFlags(II)V
|
|
|
|
.line 42
|
|
invoke-super {p0, p1}, Lcom/moji/base/MJActivity;->onCreate(Landroid/os/Bundle;)V
|
|
|
|
.line 43
|
|
sget p1, Lcom/moji/camera/R$layout;->activity_camera_result:I
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/camera/CameraResultActivity;->setContentView(I)V
|
|
|
|
.line 44
|
|
sget p1, Lcom/moji/camera/R$id;->action:I
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/camera/CameraResultActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/camera/CameraResultActivity;->a:Landroid/view/View;
|
|
|
|
.line 45
|
|
sget p1, Lcom/moji/camera/R$id;->camera_cancel:I
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/camera/CameraResultActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
iput-object p1, p0, Lcom/moji/camera/CameraResultActivity;->b:Landroid/view/View;
|
|
|
|
.line 46
|
|
sget p1, Lcom/moji/camera/R$id;->img:I
|
|
|
|
invoke-virtual {p0, p1}, Lcom/moji/camera/CameraResultActivity;->findViewById(I)Landroid/view/View;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Landroid/widget/ImageView;
|
|
|
|
iput-object p1, p0, Lcom/moji/camera/CameraResultActivity;->c:Landroid/widget/ImageView;
|
|
|
|
.line 47
|
|
invoke-direct {p0}, Lcom/moji/camera/CameraResultActivity;->a()V
|
|
|
|
return-void
|
|
.end method
|