今奥全景相机
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

246 lines
5.9 KiB

.class Lcom/viatech/gallery/AssetCopyer$1;
.super Ljava/lang/Thread;
.source "AssetCopyer.java"
# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
value = Lcom/viatech/gallery/AssetCopyer;->copyAsset2SD()V
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x0
name = null
.end annotation
# instance fields
.field final synthetic this$0:Lcom/viatech/gallery/AssetCopyer;
# direct methods
.method constructor <init>(Lcom/viatech/gallery/AssetCopyer;)V
.locals 0
.prologue
.line 43
iput-object p1, p0, Lcom/viatech/gallery/AssetCopyer$1;->this$0:Lcom/viatech/gallery/AssetCopyer;
invoke-direct {p0}, Ljava/lang/Thread;-><init>()V
return-void
.end method
# virtual methods
.method public run()V
.locals 12
.prologue
const/4 v1, 0x0
.line 47
iget-object v0, p0, Lcom/viatech/gallery/AssetCopyer$1;->this$0:Lcom/viatech/gallery/AssetCopyer;
iget-object v2, p0, Lcom/viatech/gallery/AssetCopyer$1;->this$0:Lcom/viatech/gallery/AssetCopyer;
invoke-static {v2}, Lcom/viatech/gallery/AssetCopyer;->access$000(Lcom/viatech/gallery/AssetCopyer;)Landroid/content/Context;
move-result-object v2
const-string v3, "sound"
invoke-static {v0, v2, v3}, Lcom/viatech/gallery/AssetCopyer;->access$100(Lcom/viatech/gallery/AssetCopyer;Landroid/content/Context;Ljava/lang/String;)Ljava/io/File;
move-result-object v3
.line 48
invoke-virtual {v3}, Ljava/io/File;->exists()Z
move-result v0
if-nez v0, :cond_0
.line 49
invoke-virtual {v3}, Ljava/io/File;->mkdirs()Z
.line 51
:cond_0
iget-object v0, p0, Lcom/viatech/gallery/AssetCopyer$1;->this$0:Lcom/viatech/gallery/AssetCopyer;
invoke-static {v0}, Lcom/viatech/gallery/AssetCopyer;->access$000(Lcom/viatech/gallery/AssetCopyer;)Landroid/content/Context;
move-result-object v0
invoke-virtual {v0}, Landroid/content/Context;->getAssets()Landroid/content/res/AssetManager;
move-result-object v4
.line 52
const/4 v0, 0x1
.line 55
:try_start_0
const-string v2, "sound"
invoke-virtual {v4, v2}, Landroid/content/res/AssetManager;->list(Ljava/lang/String;)[Ljava/lang/String;
move-result-object v5
.line 58
array-length v6, v5
move v2, v1
:goto_0
if-ge v2, v6, :cond_3
aget-object v7, v5, v2
.line 59
new-instance v8, Ljava/io/File;
invoke-direct {v8, v3, v7}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 60
invoke-virtual {v8}, Ljava/io/File;->exists()Z
move-result v9
if-eqz v9, :cond_2
.line 58
:cond_1
:goto_1
add-int/lit8 v2, v2, 0x1
goto :goto_0
.line 63
:cond_2
new-instance v9, Ljava/io/File;
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v10, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
const-string v11, ".tmp"
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v10
invoke-direct {v9, v3, v10}, Ljava/io/File;-><init>(Ljava/io/File;Ljava/lang/String;)V
.line 64
new-instance v10, Ljava/lang/StringBuilder;
invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V
const-string v11, "sound"
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
sget-object v11, Ljava/io/File;->separator:Ljava/lang/String;
invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v10
invoke-virtual {v10, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v7
invoke-virtual {v4, v7}, Landroid/content/res/AssetManager;->open(Ljava/lang/String;)Ljava/io/InputStream;
move-result-object v7
.line 65
new-instance v10, Ljava/io/FileOutputStream;
invoke-direct {v10, v9}, Ljava/io/FileOutputStream;-><init>(Ljava/io/File;)V
.line 66
iget-object v11, p0, Lcom/viatech/gallery/AssetCopyer$1;->this$0:Lcom/viatech/gallery/AssetCopyer;
invoke-static {v11, v7, v10}, Lcom/viatech/gallery/AssetCopyer;->access$200(Lcom/viatech/gallery/AssetCopyer;Ljava/io/InputStream;Ljava/io/OutputStream;)Z
move-result v7
if-eqz v7, :cond_5
.line 67
invoke-virtual {v9, v8}, Ljava/io/File;->renameTo(Ljava/io/File;)Z
.line 72
:goto_2
invoke-virtual {v9}, Ljava/io/File;->exists()Z
move-result v7
if-eqz v7, :cond_1
.line 73
invoke-virtual {v9}, Ljava/io/File;->delete()Z
:try_end_0
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_0
goto :goto_1
.line 75
:catch_0
move-exception v0
.line 76
const-string v2, "CarSvc_AssetCopyer"
new-instance v3, Ljava/lang/StringBuilder;
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
const-string v4, "IOException"
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v3
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v0
invoke-static {v2, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
move v0, v1
.line 80
:cond_3
if-eqz v0, :cond_4
.line 87
:cond_4
return-void
:cond_5
move v0, v1
.line 69
goto :goto_2
.end method