.class Lcom/viatech/util/CaptureImage$3; .super Ljava/lang/Object; .source "CaptureImage.java" # interfaces .implements Ljava/lang/Runnable; # annotations .annotation system Ldalvik/annotation/EnclosingMethod; value = Lcom/viatech/util/CaptureImage;->capture(Lcom/via/vpailib/vpaiinterface/SphericalMediaPlayer;)V .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x0 name = null .end annotation # instance fields .field final synthetic this$0:Lcom/viatech/util/CaptureImage; .field final synthetic val$mSphericalMediaPlayer:Lcom/via/vpailib/vpaiinterface/SphericalMediaPlayer; .field final synthetic val$okButton:Landroid/widget/Button; .field final synthetic val$openButton:Landroid/widget/Button; # direct methods .method constructor (Lcom/viatech/util/CaptureImage;Lcom/via/vpailib/vpaiinterface/SphericalMediaPlayer;Landroid/widget/Button;Landroid/widget/Button;)V .locals 0 .prologue .line 89 iput-object p1, p0, Lcom/viatech/util/CaptureImage$3;->this$0:Lcom/viatech/util/CaptureImage; iput-object p2, p0, Lcom/viatech/util/CaptureImage$3;->val$mSphericalMediaPlayer:Lcom/via/vpailib/vpaiinterface/SphericalMediaPlayer; iput-object p3, p0, Lcom/viatech/util/CaptureImage$3;->val$okButton:Landroid/widget/Button; iput-object p4, p0, Lcom/viatech/util/CaptureImage$3;->val$openButton:Landroid/widget/Button; invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method # virtual methods .method public run()V .locals 5 .prologue .line 92 iget-object v0, p0, Lcom/viatech/util/CaptureImage$3;->val$mSphericalMediaPlayer:Lcom/via/vpailib/vpaiinterface/SphericalMediaPlayer; invoke-virtual {v0}, Lcom/via/vpailib/vpaiinterface/SphericalMediaPlayer;->getBitmap()Landroid/graphics/Bitmap; move-result-object v0 .line 93 new-instance v1, Ljava/util/Date; invoke-direct {v1}, Ljava/util/Date;->()V .line 94 new-instance v2, Ljava/text/SimpleDateFormat; const-string v3, "yyyyMMddHHmmss" invoke-direct {v2, v3}, Ljava/text/SimpleDateFormat;->(Ljava/lang/String;)V .line 95 invoke-virtual {v2, v1}, Ljava/text/SimpleDateFormat;->format(Ljava/util/Date;)Ljava/lang/String; move-result-object v1 .line 97 new-instance v2, Ljava/lang/StringBuilder; invoke-direct {v2}, Ljava/lang/StringBuilder;->()V const-string v3, "vpai" invoke-virtual {v2, v3}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v2 invoke-virtual {v2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 const-string v2, ".jpg" invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; move-result-object v1 invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object v1 .line 98 iget-object v2, p0, Lcom/viatech/util/CaptureImage$3;->this$0:Lcom/viatech/util/CaptureImage; new-instance v3, Ljava/io/File; sget-object v4, Lcom/viatech/Config;->c:Ljava/lang/String; invoke-direct {v3, v4, v1}, Ljava/io/File;->(Ljava/lang/String;Ljava/lang/String;)V invoke-static {v2, v3}, Lcom/viatech/util/CaptureImage;->access$302(Lcom/viatech/util/CaptureImage;Ljava/io/File;)Ljava/io/File; .line 101 :try_start_0 new-instance v2, Ljava/io/FileOutputStream; iget-object v3, p0, Lcom/viatech/util/CaptureImage$3;->this$0:Lcom/viatech/util/CaptureImage; invoke-static {v3}, Lcom/viatech/util/CaptureImage;->access$300(Lcom/viatech/util/CaptureImage;)Ljava/io/File; move-result-object v3 invoke-direct {v2, v3}, Ljava/io/FileOutputStream;->(Ljava/io/File;)V .line 102 sget-object v3, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat; const/16 v4, 0x64 invoke-virtual {v0, v3, v4, v2}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z .line 103 invoke-virtual {v2}, Ljava/io/FileOutputStream;->flush()V .line 104 invoke-virtual {v2}, Ljava/io/FileOutputStream;->close()V .line 105 iget-object v0, p0, Lcom/viatech/util/CaptureImage$3;->this$0:Lcom/viatech/util/CaptureImage; invoke-static {v0}, Lcom/viatech/util/CaptureImage;->access$200(Lcom/viatech/util/CaptureImage;)Landroid/app/Activity; move-result-object v0 new-instance v2, Lcom/viatech/util/CaptureImage$3$1; invoke-direct {v2, p0, v1}, Lcom/viatech/util/CaptureImage$3$1;->(Lcom/viatech/util/CaptureImage$3;Ljava/lang/String;)V invoke-virtual {v0, v2}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V :try_end_0 .catch Ljava/io/FileNotFoundException; {:try_start_0 .. :try_end_0} :catch_0 .catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_1 .catch Ljava/lang/OutOfMemoryError; {:try_start_0 .. :try_end_0} :catch_2 .line 160 :goto_0 return-void .line 123 :catch_0 move-exception v0 .line 124 invoke-virtual {v0}, Ljava/io/FileNotFoundException;->printStackTrace()V .line 125 iget-object v0, p0, Lcom/viatech/util/CaptureImage$3;->this$0:Lcom/viatech/util/CaptureImage; invoke-static {v0}, Lcom/viatech/util/CaptureImage;->access$200(Lcom/viatech/util/CaptureImage;)Landroid/app/Activity; move-result-object v0 new-instance v1, Lcom/viatech/util/CaptureImage$3$2; invoke-direct {v1, p0}, Lcom/viatech/util/CaptureImage$3$2;->(Lcom/viatech/util/CaptureImage$3;)V invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V goto :goto_0 .line 135 :catch_1 move-exception v0 .line 136 invoke-virtual {v0}, Ljava/io/IOException;->printStackTrace()V .line 137 iget-object v0, p0, Lcom/viatech/util/CaptureImage$3;->this$0:Lcom/viatech/util/CaptureImage; invoke-static {v0}, Lcom/viatech/util/CaptureImage;->access$200(Lcom/viatech/util/CaptureImage;)Landroid/app/Activity; move-result-object v0 new-instance v1, Lcom/viatech/util/CaptureImage$3$3; invoke-direct {v1, p0}, Lcom/viatech/util/CaptureImage$3$3;->(Lcom/viatech/util/CaptureImage$3;)V invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V goto :goto_0 .line 147 :catch_2 move-exception v0 .line 148 invoke-virtual {v0}, Ljava/lang/OutOfMemoryError;->printStackTrace()V .line 149 iget-object v0, p0, Lcom/viatech/util/CaptureImage$3;->this$0:Lcom/viatech/util/CaptureImage; invoke-static {v0}, Lcom/viatech/util/CaptureImage;->access$200(Lcom/viatech/util/CaptureImage;)Landroid/app/Activity; move-result-object v0 new-instance v1, Lcom/viatech/util/CaptureImage$3$4; invoke-direct {v1, p0}, Lcom/viatech/util/CaptureImage$3$4;->(Lcom/viatech/util/CaptureImage$3;)V invoke-virtual {v0, v1}, Landroid/app/Activity;->runOnUiThread(Ljava/lang/Runnable;)V goto :goto_0 .end method