今奥全景相机
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.

493 lines
12 KiB

.class Lcom/viatech/gallery/FileScanner$SearchReq;
.super Ljava/lang/Object;
.source "FileScanner.java"
# interfaces
.implements Lcom/viatech/common/util/Match4Req;
.implements Lcom/viatech/common/util/WorkReq;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/viatech/gallery/FileScanner;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x2
name = "SearchReq"
.end annotation
# instance fields
.field public mCancel:Z
.field public mFilePath:Ljava/lang/String;
.field public mKey:Ljava/lang/String;
.field public mSearchDirList:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/viatech/gallery/FileInfo;",
">;"
}
.end annotation
.end field
.field public mSearchFileList:Ljava/util/ArrayList;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/ArrayList",
"<",
"Lcom/viatech/gallery/FileInfo;",
">;"
}
.end annotation
.end field
.field final synthetic this$0:Lcom/viatech/gallery/FileScanner;
# direct methods
.method public constructor <init>(Lcom/viatech/gallery/FileScanner;Ljava/lang/String;Ljava/lang/String;)V
.locals 1
.prologue
.line 553
iput-object p1, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->this$0:Lcom/viatech/gallery/FileScanner;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 549
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mSearchDirList:Ljava/util/ArrayList;
.line 550
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
iput-object v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mSearchFileList:Ljava/util/ArrayList;
.line 551
const/4 v0, 0x0
iput-boolean v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mCancel:Z
.line 554
iput-object p2, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mFilePath:Ljava/lang/String;
.line 555
iput-object p3, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mKey:Ljava/lang/String;
.line 556
return-void
.end method
.method private searchFile(Ljava/io/File;)V
.locals 9
.prologue
const/4 v1, 0x0
.line 587
iget-boolean v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mCancel:Z
if-eqz v0, :cond_1
.line 625
:cond_0
return-void
.line 590
:cond_1
if-eqz p1, :cond_0
invoke-virtual {p1}, Ljava/io/File;->isDirectory()Z
move-result v0
if-eqz v0, :cond_0
invoke-virtual {p1}, Ljava/io/File;->exists()Z
move-result v0
if-eqz v0, :cond_0
.line 593
invoke-virtual {p1}, Ljava/io/File;->listFiles()[Ljava/io/File;
move-result-object v2
.line 594
if-eqz v2, :cond_0
move v0, v1
.line 598
:goto_0
array-length v3, v2
if-ge v0, v3, :cond_0
.line 599
aget-object v3, v2, v0
.line 600
invoke-virtual {v3}, Ljava/io/File;->getName()Ljava/lang/String;
move-result-object v4
.line 601
invoke-virtual {v3}, Ljava/io/File;->isDirectory()Z
move-result v5
if-eqz v5, :cond_4
.line 602
invoke-virtual {v4}, Ljava/lang/String;->length()I
move-result v5
if-lez v5, :cond_2
const-string v5, "."
invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v5
if-nez v5, :cond_2
iget-object v5, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mKey:Ljava/lang/String;
invoke-virtual {v4, v5}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
move-result v5
if-ltz v5, :cond_2
.line 603
new-instance v5, Lcom/viatech/gallery/FileInfo;
const/4 v6, 0x1
invoke-direct {v5, v4, v6}, Lcom/viatech/gallery/FileInfo;-><init>(Ljava/lang/String;Z)V
.line 604
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v3}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v7
invoke-virtual {v7}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
const-string v7, "/"
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
iput-object v6, v5, Lcom/viatech/gallery/FileInfo;->path:Ljava/lang/String;
.line 605
const-string v6, "Vpai_FileScanner"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "TRUE name : "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v4
invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v4
invoke-static {v6, v4}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 606
invoke-virtual {v3}, Ljava/io/File;->lastModified()J
move-result-wide v6
iput-wide v6, v5, Lcom/viatech/gallery/FileInfo;->modifytime:J
.line 607
iget-object v4, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mSearchDirList:Ljava/util/ArrayList;
invoke-virtual {v4, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
.line 609
:cond_2
invoke-direct {p0, v3}, Lcom/viatech/gallery/FileScanner$SearchReq;->searchFile(Ljava/io/File;)V
.line 598
:cond_3
:goto_1
add-int/lit8 v0, v0, 0x1
goto :goto_0
.line 611
:cond_4
invoke-virtual {v4}, Ljava/lang/String;->length()I
move-result v5
if-lez v5, :cond_3
const-string v5, "."
invoke-virtual {v4, v5}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z
move-result v5
if-nez v5, :cond_3
iget-object v5, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mKey:Ljava/lang/String;
invoke-virtual {v4, v5}, Ljava/lang/String;->indexOf(Ljava/lang/String;)I
move-result v5
if-ltz v5, :cond_3
.line 612
new-instance v5, Lcom/viatech/gallery/FileInfo;
invoke-direct {v5, v4, v1}, Lcom/viatech/gallery/FileInfo;-><init>(Ljava/lang/String;Z)V
.line 613
const-string v6, "Vpai_FileScanner"
new-instance v7, Ljava/lang/StringBuilder;
invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V
const-string v8, "FALSE name : "
invoke-virtual {v7, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v7
invoke-virtual {v7, v4}, 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-static {v6, v7}, Landroid/util/Log;->i(Ljava/lang/String;Ljava/lang/String;)I
.line 614
new-instance v6, Ljava/lang/StringBuilder;
invoke-direct {v6}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v3}, Ljava/io/File;->getParentFile()Ljava/io/File;
move-result-object v7
invoke-virtual {v7}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v7
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
const-string v7, "/"
invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v6
invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object v6
iput-object v6, v5, Lcom/viatech/gallery/FileInfo;->path:Ljava/lang/String;
.line 615
invoke-virtual {v3}, Ljava/io/File;->getPath()Ljava/lang/String;
move-result-object v6
invoke-static {v6}, Lcom/viatech/gallery/FileScanner;->access$400(Ljava/lang/String;)Ljava/lang/String;
move-result-object v6
iput-object v6, v5, Lcom/viatech/gallery/FileInfo;->size:Ljava/lang/String;
.line 616
invoke-virtual {v3}, Ljava/io/File;->length()J
move-result-wide v6
iput-wide v6, v5, Lcom/viatech/gallery/FileInfo;->lsize:J
.line 617
invoke-virtual {v3}, Ljava/io/File;->lastModified()J
move-result-wide v6
iput-wide v6, v5, Lcom/viatech/gallery/FileInfo;->modifytime:J
.line 618
invoke-static {v4}, Lcom/viatech/common/util/FileMediaType;->getMediaType(Ljava/lang/String;)I
move-result v3
iput v3, v5, Lcom/viatech/gallery/FileInfo;->fileType:I
.line 620
iget-object v3, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mSearchFileList:Ljava/util/ArrayList;
invoke-virtual {v3, v5}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
goto :goto_1
.end method
# virtual methods
.method public cancel()V
.locals 1
.prologue
.line 629
const/4 v0, 0x1
iput-boolean v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mCancel:Z
.line 630
return-void
.end method
.method public execute()V
.locals 2
.prologue
.line 571
iget-object v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mSearchDirList:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 572
iget-object v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mSearchFileList:Ljava/util/ArrayList;
invoke-virtual {v0}, Ljava/util/ArrayList;->clear()V
.line 573
new-instance v0, Ljava/io/File;
iget-object v1, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mFilePath:Ljava/lang/String;
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V
invoke-direct {p0, v0}, Lcom/viatech/gallery/FileScanner$SearchReq;->searchFile(Ljava/io/File;)V
.line 574
iget-object v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mSearchDirList:Ljava/util/ArrayList;
iget-object v1, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mSearchFileList:Ljava/util/ArrayList;
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->addAll(Ljava/util/Collection;)Z
.line 575
iget-boolean v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mCancel:Z
if-nez v0, :cond_0
.line 576
iget-object v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->this$0:Lcom/viatech/gallery/FileScanner;
invoke-static {v0}, Lcom/viatech/gallery/FileScanner;->access$700(Lcom/viatech/gallery/FileScanner;)Landroid/os/Handler;
move-result-object v0
new-instance v1, Lcom/viatech/gallery/FileScanner$SearchReq$1;
invoke-direct {v1, p0}, Lcom/viatech/gallery/FileScanner$SearchReq$1;-><init>(Lcom/viatech/gallery/FileScanner$SearchReq;)V
invoke-virtual {v0, v1}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
.line 584
:cond_0
return-void
.end method
.method public matchs(Lcom/viatech/common/util/WorkReq;)Z
.locals 2
.prologue
.line 560
instance-of v0, p1, Lcom/viatech/gallery/FileScanner$SearchReq;
if-eqz v0, :cond_0
.line 561
check-cast p1, Lcom/viatech/gallery/FileScanner$SearchReq;
.line 562
iget-object v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mFilePath:Ljava/lang/String;
iget-object v1, p1, Lcom/viatech/gallery/FileScanner$SearchReq;->mFilePath:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/viatech/gallery/FileScanner$SearchReq;->mKey:Ljava/lang/String;
iget-object v1, p1, Lcom/viatech/gallery/FileScanner$SearchReq;->mKey:Ljava/lang/String;
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_0
.line 563
const/4 v0, 0x1
.line 566
:goto_0
return v0
:cond_0
const/4 v0, 0x0
goto :goto_0
.end method