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

400 lines
11 KiB

.class public Lcom/viatech/cloud/LiveLoginManager;
.super Ljava/lang/Object;
.source "LiveLoginManager.java"
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;
}
.end annotation
# static fields
.field private static context:Landroid/content/Context;
.field private static mHandler:Landroid/os/Handler;
.field private static manager:Lcom/viatech/cloud/LiveLoginManager;
# instance fields
.field private mLogoutDlg:Landroid/app/AlertDialog;
# direct methods
.method private constructor <init>()V
.locals 0
.prologue
.line 37
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
.line 38
return-void
.end method
.method static synthetic access$000(Lcom/viatech/cloud/LiveLoginManager;Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
.locals 0
.prologue
.line 25
invoke-direct {p0, p1}, Lcom/viatech/cloud/LiveLoginManager;->logoutYouTubo(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
return-void
.end method
.method static synthetic access$100(Lcom/viatech/cloud/LiveLoginManager;)Landroid/app/AlertDialog;
.locals 1
.prologue
.line 25
iget-object v0, p0, Lcom/viatech/cloud/LiveLoginManager;->mLogoutDlg:Landroid/app/AlertDialog;
return-object v0
.end method
.method static synthetic access$200(Lcom/viatech/cloud/LiveLoginManager;Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
.locals 0
.prologue
.line 25
invoke-direct {p0, p1}, Lcom/viatech/cloud/LiveLoginManager;->logoutFacebook(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
return-void
.end method
.method static synthetic access$300()Landroid/os/Handler;
.locals 1
.prologue
.line 25
sget-object v0, Lcom/viatech/cloud/LiveLoginManager;->mHandler:Landroid/os/Handler;
return-object v0
.end method
.method public static getManager(Landroid/content/Context;Landroid/os/Handler;)Lcom/viatech/cloud/LiveLoginManager;
.locals 2
.prologue
.line 41
sput-object p0, Lcom/viatech/cloud/LiveLoginManager;->context:Landroid/content/Context;
.line 42
sput-object p1, Lcom/viatech/cloud/LiveLoginManager;->mHandler:Landroid/os/Handler;
.line 43
sget-object v0, Lcom/viatech/cloud/LiveLoginManager;->manager:Lcom/viatech/cloud/LiveLoginManager;
if-nez v0, :cond_1
.line 44
const-class v1, Lcom/viatech/cloud/LiveLoginManager;
monitor-enter v1
.line 45
:try_start_0
sget-object v0, Lcom/viatech/cloud/LiveLoginManager;->manager:Lcom/viatech/cloud/LiveLoginManager;
if-nez v0, :cond_0
.line 46
new-instance v0, Lcom/viatech/cloud/LiveLoginManager;
invoke-direct {v0}, Lcom/viatech/cloud/LiveLoginManager;-><init>()V
sput-object v0, Lcom/viatech/cloud/LiveLoginManager;->manager:Lcom/viatech/cloud/LiveLoginManager;
.line 48
:cond_0
monitor-exit v1
:try_end_0
.catchall {:try_start_0 .. :try_end_0} :catchall_0
.line 50
:cond_1
sget-object v0, Lcom/viatech/cloud/LiveLoginManager;->manager:Lcom/viatech/cloud/LiveLoginManager;
return-object v0
.line 48
:catchall_0
move-exception v0
:try_start_1
monitor-exit v1
:try_end_1
.catchall {:try_start_1 .. :try_end_1} :catchall_0
throw v0
.end method
.method private logoutFacebook(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
.locals 1
.prologue
.line 179
invoke-interface {p1}, Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;->onLiveLogoutResponse()V
.line 180
invoke-static {}, Lcom/facebook/login/LoginManager;->getInstance()Lcom/facebook/login/LoginManager;
move-result-object v0
invoke-virtual {v0}, Lcom/facebook/login/LoginManager;->logOut()V
.line 181
return-void
.end method
.method private logoutYouTubo(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
.locals 0
.prologue
.line 218
invoke-static {}, Lcom/via/vpailib/vpaiinterface/YouTubeApi;->logoutGoogleAccount()V
.line 219
invoke-interface {p1}, Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;->onLiveLogoutResponse()V
.line 220
return-void
.end method
.method private showLogoutLiveAccountDialog(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;I)V
.locals 4
.prologue
const v3, 0x7f070149
.line 124
iget-object v0, p0, Lcom/viatech/cloud/LiveLoginManager;->mLogoutDlg:Landroid/app/AlertDialog;
if-eqz v0, :cond_0
iget-object v0, p0, Lcom/viatech/cloud/LiveLoginManager;->mLogoutDlg:Landroid/app/AlertDialog;
invoke-virtual {v0}, Landroid/app/AlertDialog;->isShowing()Z
move-result v0
if-eqz v0, :cond_0
.line 175
:goto_0
return-void
.line 127
:cond_0
new-instance v0, Lcom/viatech/widget/VPaiDialog$Builder;
sget-object v1, Lcom/viatech/cloud/LiveLoginManager;->context:Landroid/content/Context;
invoke-direct {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;-><init>(Landroid/content/Context;)V
.line 128
packed-switch p2, :pswitch_data_0
.line 165
:goto_1
:pswitch_0
sget-object v1, Lcom/viatech/cloud/LiveLoginManager;->context:Landroid/content/Context;
const v2, 0x7f0701b9
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
.line 166
const v1, 0x7f07005c
new-instance v2, Lcom/viatech/cloud/LiveLoginManager$3;
invoke-direct {v2, p0}, Lcom/viatech/cloud/LiveLoginManager$3;-><init>(Lcom/viatech/cloud/LiveLoginManager;)V
invoke-virtual {v0, v1, v2}, Lcom/viatech/widget/VPaiDialog$Builder;->setNegativeButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
.line 173
invoke-virtual {v0}, Lcom/viatech/widget/VPaiDialog$Builder;->create()Landroid/app/AlertDialog;
move-result-object v0
iput-object v0, p0, Lcom/viatech/cloud/LiveLoginManager;->mLogoutDlg:Landroid/app/AlertDialog;
.line 174
iget-object v0, p0, Lcom/viatech/cloud/LiveLoginManager;->mLogoutDlg:Landroid/app/AlertDialog;
invoke-virtual {v0}, Landroid/app/AlertDialog;->show()V
goto :goto_0
.line 130
:pswitch_1
sget-object v1, Lcom/viatech/cloud/LiveLoginManager;->context:Landroid/content/Context;
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
move-result-object v1
const v2, 0x7f07014a
invoke-virtual {v1, v2}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
.line 131
new-instance v1, Lcom/viatech/cloud/LiveLoginManager$1;
invoke-direct {v1, p0, p1}, Lcom/viatech/cloud/LiveLoginManager$1;-><init>(Lcom/viatech/cloud/LiveLoginManager;Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
invoke-virtual {v0, v3, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
goto :goto_1
.line 150
:pswitch_2
sget-object v1, Lcom/viatech/cloud/LiveLoginManager;->context:Landroid/content/Context;
const v2, 0x7f0700d7
invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setMessage(Ljava/lang/CharSequence;)Landroid/app/AlertDialog$Builder;
.line 151
new-instance v1, Lcom/viatech/cloud/LiveLoginManager$2;
invoke-direct {v1, p0, p1}, Lcom/viatech/cloud/LiveLoginManager$2;-><init>(Lcom/viatech/cloud/LiveLoginManager;Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
invoke-virtual {v0, v3, v1}, Lcom/viatech/widget/VPaiDialog$Builder;->setPositiveButton(ILandroid/content/DialogInterface$OnClickListener;)Landroid/app/AlertDialog$Builder;
goto :goto_1
.line 128
nop
:pswitch_data_0
.packed-switch 0x1
:pswitch_1
:pswitch_0
:pswitch_2
.end packed-switch
.end method
# virtual methods
.method public doFacebookLiveLogin(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
.locals 3
.prologue
.line 112
invoke-static {}, Lcom/viatech/cloud/CloudConfig;->curUser()Lcom/viatech/cloud/CloudConfig$LoginUser;
move-result-object v0
invoke-virtual {v0}, Lcom/viatech/cloud/CloudConfig$LoginUser;->isFBLogin()Z
move-result v0
if-nez v0, :cond_0
.line 113
const/4 v0, 0x1
new-array v1, v0, [Ljava/lang/String;
const/4 v0, 0x0
const-string v2, "public_profile"
aput-object v2, v1, v0
.line 114
invoke-static {}, Lcom/facebook/login/LoginManager;->getInstance()Lcom/facebook/login/LoginManager;
move-result-object v2
sget-object v0, Lcom/viatech/cloud/LiveLoginManager;->context:Landroid/content/Context;
check-cast v0, Landroid/app/Activity;
invoke-static {v1}, Ljava/util/Arrays;->asList([Ljava/lang/Object;)Ljava/util/List;
move-result-object v1
invoke-virtual {v2, v0, v1}, Lcom/facebook/login/LoginManager;->logInWithReadPermissions(Landroid/app/Activity;Ljava/util/Collection;)V
.line 115
const/4 v0, 0x0
invoke-interface {p1, v0}, Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;->onLiveLoginResponse(Ljava/lang/Object;)V
.line 119
:goto_0
return-void
.line 117
:cond_0
const/4 v0, 0x3
invoke-direct {p0, p1, v0}, Lcom/viatech/cloud/LiveLoginManager;->showLogoutLiveAccountDialog(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;I)V
goto :goto_0
.end method
.method public doYouTuboLiveLogin(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;)V
.locals 1
.prologue
.line 58
sget-object v0, Lcom/viatech/cloud/LiveLoginManager;->context:Landroid/content/Context;
invoke-static {v0}, Lcom/via/vpailib/vpaiinterface/YouTubeApi;->hasGoogleService(Landroid/content/Context;)Z
move-result v0
if-eqz v0, :cond_1
.line 59
invoke-static {}, Lcom/via/vpailib/vpaiinterface/YouTubeApi;->checkLogin()Z
move-result v0
if-nez v0, :cond_0
.line 60
const/4 v0, 0x0
invoke-interface {p1, v0}, Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;->onLiveLoginResponse(Ljava/lang/Object;)V
.line 67
:goto_0
return-void
.line 62
:cond_0
const/4 v0, 0x1
invoke-direct {p0, p1, v0}, Lcom/viatech/cloud/LiveLoginManager;->showLogoutLiveAccountDialog(Lcom/viatech/cloud/LiveLoginManager$LiveLoginCallback;I)V
goto :goto_0
.line 65
:cond_1
const v0, 0x7f07009a
invoke-static {v0}, Lcom/viatech/VPaiApplication;->b(I)V
goto :goto_0
.end method