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.
261 lines
6.0 KiB
261 lines
6.0 KiB
.class public Lcom/viatech/cloud/CloudService; |
|
.super Landroid/app/Service; |
|
.source "CloudService.java" |
|
|
|
|
|
# static fields |
|
.field private static final ACTION_DELETEFILE:Ljava/lang/String; = "ACTION_DELETEFILE" |
|
|
|
.field private static final KEY_FILE:Ljava/lang/String; = "KEY_FILE" |
|
|
|
.field private static final TAG:Ljava/lang/String; |
|
|
|
|
|
# direct methods |
|
.method static constructor <clinit>()V |
|
.locals 1 |
|
|
|
.prologue |
|
.line 23 |
|
const-class v0, Lcom/viatech/cloud/CloudService; |
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getSimpleName()Ljava/lang/String; |
|
|
|
move-result-object v0 |
|
|
|
sput-object v0, Lcom/viatech/cloud/CloudService;->TAG:Ljava/lang/String; |
|
|
|
return-void |
|
.end method |
|
|
|
.method public constructor <init>()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 22 |
|
invoke-direct {p0}, Landroid/app/Service;-><init>()V |
|
|
|
return-void |
|
.end method |
|
|
|
.method static synthetic access$000()Ljava/lang/String; |
|
.locals 1 |
|
|
|
.prologue |
|
.line 22 |
|
sget-object v0, Lcom/viatech/cloud/CloudService;->TAG:Ljava/lang/String; |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method private deleteFile(Lcom/viatech/gallery/FileInfo;)V |
|
.locals 3 |
|
|
|
.prologue |
|
.line 61 |
|
invoke-static {}, Lcom/viatech/cloud/CloudConfig;->curUser()Lcom/viatech/cloud/CloudConfig$LoginUser; |
|
|
|
move-result-object v0 |
|
|
|
invoke-virtual {v0}, Lcom/viatech/cloud/CloudConfig$LoginUser;->isCloudLogin()Z |
|
|
|
move-result v0 |
|
|
|
if-eqz v0, :cond_0 |
|
|
|
.line 62 |
|
invoke-virtual {p1}, Lcom/viatech/gallery/FileInfo;->toCloudGalleryReq()Lcom/via/vpaicloud/community/request/CloudGalleryReq; |
|
|
|
move-result-object v0 |
|
|
|
.line 63 |
|
new-instance v1, Ljava/util/ArrayList; |
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V |
|
|
|
.line 64 |
|
invoke-interface {v1, v0}, Ljava/util/List;->add(Ljava/lang/Object;)Z |
|
|
|
.line 65 |
|
invoke-static {}, Lcom/via/vpaicloud/storage/a;->a()Lcom/via/vpaicloud/storage/a; |
|
|
|
move-result-object v0 |
|
|
|
new-instance v2, Lcom/viatech/cloud/CloudService$1; |
|
|
|
invoke-direct {v2, p0, p1}, Lcom/viatech/cloud/CloudService$1;-><init>(Lcom/viatech/cloud/CloudService;Lcom/viatech/gallery/FileInfo;)V |
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/via/vpaicloud/storage/a;->b(Ljava/util/List;Lcom/via/vpaicloud/storage/a$a;)V |
|
|
|
.line 83 |
|
:goto_0 |
|
return-void |
|
|
|
.line 80 |
|
:cond_0 |
|
sget-object v0, Lcom/viatech/cloud/CloudService;->TAG:Ljava/lang/String; |
|
|
|
new-instance v1, Ljava/lang/StringBuilder; |
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V |
|
|
|
const-string v2, "cloudservice not login delete file fail fileName: " |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
|
|
|
move-result-object v1 |
|
|
|
iget-object v2, p1, Lcom/viatech/gallery/FileInfo;->name:Ljava/lang/String; |
|
|
|
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 |
|
|
|
invoke-static {v0, v1}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I |
|
|
|
.line 81 |
|
const/4 v0, 0x1 |
|
|
|
new-array v0, v0, [Ljava/lang/Object; |
|
|
|
const/4 v1, 0x0 |
|
|
|
const/4 v2, 0x2 |
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer; |
|
|
|
move-result-object v2 |
|
|
|
aput-object v2, v0, v1 |
|
|
|
invoke-static {p0, v0}, Lcom/viatech/a/b;->a(Landroid/content/Context;[Ljava/lang/Object;)V |
|
|
|
goto :goto_0 |
|
.end method |
|
|
|
.method public static startDeleteFile(Landroid/content/Context;Lcom/viatech/gallery/FileInfo;)V |
|
.locals 2 |
|
|
|
.prologue |
|
.line 54 |
|
new-instance v0, Landroid/content/Intent; |
|
|
|
const-string v1, "ACTION_DELETEFILE" |
|
|
|
invoke-direct {v0, v1}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V |
|
|
|
.line 55 |
|
const-class v1, Lcom/viatech/cloud/CloudService; |
|
|
|
invoke-virtual {v0, p0, v1}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent; |
|
|
|
.line 56 |
|
const-string v1, "KEY_FILE" |
|
|
|
invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/io/Serializable;)Landroid/content/Intent; |
|
|
|
.line 57 |
|
invoke-virtual {p0, v0}, Landroid/content/Context;->startService(Landroid/content/Intent;)Landroid/content/ComponentName; |
|
|
|
.line 58 |
|
return-void |
|
.end method |
|
|
|
|
|
# virtual methods |
|
.method public onBind(Landroid/content/Intent;)Landroid/os/IBinder; |
|
.locals 1 |
|
.annotation build Landroid/support/annotation/Nullable; |
|
.end annotation |
|
|
|
.prologue |
|
.line 30 |
|
const/4 v0, 0x0 |
|
|
|
return-object v0 |
|
.end method |
|
|
|
.method public onCreate()V |
|
.locals 0 |
|
|
|
.prologue |
|
.line 35 |
|
invoke-super {p0}, Landroid/app/Service;->onCreate()V |
|
|
|
.line 37 |
|
return-void |
|
.end method |
|
|
|
.method public onStartCommand(Landroid/content/Intent;II)I |
|
.locals 3 |
|
|
|
.prologue |
|
.line 41 |
|
invoke-virtual {p1}, Landroid/content/Intent;->getAction()Ljava/lang/String; |
|
|
|
move-result-object v1 |
|
|
|
.line 42 |
|
const/4 v0, -0x1 |
|
|
|
invoke-virtual {v1}, Ljava/lang/String;->hashCode()I |
|
|
|
move-result v2 |
|
|
|
packed-switch v2, :pswitch_data_0 |
|
|
|
:cond_0 |
|
:goto_0 |
|
packed-switch v0, :pswitch_data_1 |
|
|
|
.line 49 |
|
:goto_1 |
|
const/4 v0, 0x2 |
|
|
|
return v0 |
|
|
|
.line 42 |
|
:pswitch_0 |
|
const-string v2, "ACTION_DELETEFILE" |
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z |
|
|
|
move-result v1 |
|
|
|
if-eqz v1, :cond_0 |
|
|
|
const/4 v0, 0x0 |
|
|
|
goto :goto_0 |
|
|
|
.line 45 |
|
:pswitch_1 |
|
const-string v0, "KEY_FILE" |
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getSerializableExtra(Ljava/lang/String;)Ljava/io/Serializable; |
|
|
|
move-result-object v0 |
|
|
|
check-cast v0, Lcom/viatech/gallery/FileInfo; |
|
|
|
invoke-direct {p0, v0}, Lcom/viatech/cloud/CloudService;->deleteFile(Lcom/viatech/gallery/FileInfo;)V |
|
|
|
goto :goto_1 |
|
|
|
.line 42 |
|
nop |
|
|
|
:pswitch_data_0 |
|
.packed-switch 0x22191f50 |
|
:pswitch_0 |
|
.end packed-switch |
|
|
|
:pswitch_data_1 |
|
.packed-switch 0x0 |
|
:pswitch_1 |
|
.end packed-switch |
|
.end method
|
|
|