VipPluginManager.smali

.class public Lcom/cm/plugincluster/vip/VipPluginManager;
.super Ljava/lang/Object;
.source "VipPluginManager.java"

# interfaces
.implements Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;
.implements Lcom/cm/plugincluster/vip/interfaces/IPrivacyAlbum;
.implements Lcom/cm/plugincluster/vip/interfaces/IVipNotification;
.implements Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;


# static fields
.field private static volatile manager:Lcom/cm/plugincluster/vip/VipPluginManager;


# instance fields
.field private final TAG:Ljava/lang/String;

.field private volatile accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

.field private volatile vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;


# direct methods
.method static constructor <clinit>()V
    .registers 1

    .prologue
    .line 26
    const/4 v0, 0x0

    sput-object v0, Lcom/cm/plugincluster/vip/VipPluginManager;->manager:Lcom/cm/plugincluster/vip/VipPluginManager;

    return-void
.end method

.method private constructor <init>()V
    .registers 2

    .prologue
    const/4 v0, 0x0

    .line 44
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 24
    iput-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    .line 25
    iput-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    .line 27
    const-string/jumbo v0, "plugin_vip"

    iput-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->TAG:Ljava/lang/String;

    .line 46
    return-void
.end method

.method public static getManager()Lcom/cm/plugincluster/vip/VipPluginManager;
    .registers 2

    .prologue
    .line 30
    sget-object v0, Lcom/cm/plugincluster/vip/VipPluginManager;->manager:Lcom/cm/plugincluster/vip/VipPluginManager;

    if-nez v0, :cond_13

    .line 31
    const-class v1, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    monitor-enter v1

    .line 32
    :try_start_7
    sget-object v0, Lcom/cm/plugincluster/vip/VipPluginManager;->manager:Lcom/cm/plugincluster/vip/VipPluginManager;

    if-nez v0, :cond_12

    .line 33
    new-instance v0, Lcom/cm/plugincluster/vip/VipPluginManager;

    invoke-direct {v0}, Lcom/cm/plugincluster/vip/VipPluginManager;-><init>()V

    sput-object v0, Lcom/cm/plugincluster/vip/VipPluginManager;->manager:Lcom/cm/plugincluster/vip/VipPluginManager;

    .line 35
    :cond_12
    monitor-exit v1
    :try_end_13
    .catchall {:try_start_7 .. :try_end_13} :catchall_24

    .line 37
    :cond_13
    sget-object v0, Lcom/cm/plugincluster/vip/VipPluginManager;->manager:Lcom/cm/plugincluster/vip/VipPluginManager;

    if-eqz v0, :cond_21

    .line 38
    sget-object v0, Lcom/cm/plugincluster/vip/VipPluginManager;->manager:Lcom/cm/plugincluster/vip/VipPluginManager;

    invoke-direct {v0}, Lcom/cm/plugincluster/vip/VipPluginManager;->initVipMoudleDelegate()Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    .line 39
    sget-object v0, Lcom/cm/plugincluster/vip/VipPluginManager;->manager:Lcom/cm/plugincluster/vip/VipPluginManager;

    invoke-direct {v0}, Lcom/cm/plugincluster/vip/VipPluginManager;->initAccountDetectDelegate()Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    .line 41
    :cond_21
    sget-object v0, Lcom/cm/plugincluster/vip/VipPluginManager;->manager:Lcom/cm/plugincluster/vip/VipPluginManager;

    return-object v0

    .line 35
    :catchall_24
    move-exception v0

    :try_start_25
    monitor-exit v1
    :try_end_26
    .catchall {:try_start_25 .. :try_end_26} :catchall_24

    throw v0
.end method

.method private initAccountDetectDelegate()Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;
    .registers 4

    .prologue
    .line 50
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    if-nez v0, :cond_26

    .line 51
    const-class v1, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    monitor-enter v1

    .line 52
    :try_start_7
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    if-nez v0, :cond_19

    .line 53
    const v0, 0x25a00d

    const/4 v2, 0x0

    new-array v2, v2, [Ljava/lang/Object;

    invoke-static {v0, v2}, Lcom/cm/plugincluster/spec/CommanderManager;->invokeCommandExpNull(I[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    iput-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    .line 55
    :cond_19
    monitor-exit v1
    :try_end_1a
    .catchall {:try_start_7 .. :try_end_1a} :catchall_29

    .line 56
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    if-eqz v0, :cond_2c

    .line 57
    const-string/jumbo v0, "plugin_vip"

    const-string v1, "account delegate successfully "

    invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->i(Ljava/lang/String;Ljava/lang/String;)V

    .line 63
    :cond_26
    :goto_26
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    return-object v0

    .line 55
    :catchall_29
    move-exception v0

    :try_start_2a
    monitor-exit v1
    :try_end_2b
    .catchall {:try_start_2a .. :try_end_2b} :catchall_29

    throw v0

    .line 59
    :cond_2c
    const-string/jumbo v0, "plugin_vip"

    const-string v1, "account delegate failed"

    invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->e(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_26
.end method

.method private initVipMoudleDelegate()Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;
    .registers 4

    .prologue
    .line 69
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-nez v0, :cond_27

    .line 70
    const-class v1, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    monitor-enter v1

    .line 71
    :try_start_7
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-nez v0, :cond_19

    .line 72
    const v0, 0x25a001

    const/4 v2, 0x0

    new-array v2, v2, [Ljava/lang/Object;

    invoke-static {v0, v2}, Lcom/cm/plugincluster/spec/CommanderManager;->invokeCommandExpNull(I[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    iput-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    .line 74
    :cond_19
    monitor-exit v1
    :try_end_1a
    .catchall {:try_start_7 .. :try_end_1a} :catchall_2a

    .line 75
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_2d

    .line 76
    const-string/jumbo v0, "plugin_vip"

    const-string/jumbo v1, "vip delegate successfully "

    invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->i(Ljava/lang/String;Ljava/lang/String;)V

    .line 83
    :cond_27
    :goto_27
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    return-object v0

    .line 74
    :catchall_2a
    move-exception v0

    :try_start_2b
    monitor-exit v1
    :try_end_2c
    .catchall {:try_start_2b .. :try_end_2c} :catchall_2a

    throw v0

    .line 78
    :cond_2d
    const-string/jumbo v0, "plugin_vip"

    const-string/jumbo v1, "vip delegate failed"

    invoke-static {v0, v1}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->e(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_27
.end method


# virtual methods
.method public getGridProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$MainGridProvider;
    .registers 2

    .prologue
    .line 127
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_b

    .line 128
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    invoke-interface {v0}, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;->getGridProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$MainGridProvider;

    move-result-object v0

    .line 130
    :goto_a
    return-object v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public getMeProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$MeProvider;
    .registers 2

    .prologue
    .line 135
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_b

    .line 136
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    invoke-interface {v0}, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;->getMeProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$MeProvider;

    move-result-object v0

    .line 138
    :goto_a
    return-object v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public getResultProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$ResultProvider;
    .registers 2

    .prologue
    .line 143
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_b

    .line 144
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    invoke-interface {v0}, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;->getResultProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$ResultProvider;

    move-result-object v0

    .line 146
    :goto_a
    return-object v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public getStreamProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$StreamFunctionProvider;
    .registers 2

    .prologue
    .line 111
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_b

    .line 112
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    invoke-interface {v0}, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;->getStreamProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$StreamFunctionProvider;

    move-result-object v0

    .line 114
    :goto_a
    return-object v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public getToolsProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$ToolsProvider;
    .registers 2

    .prologue
    .line 119
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_b

    .line 120
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    invoke-interface {v0}, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;->getToolsProvider()Lcom/cm/plugincluster/vip/VipFuncProvider$ToolsProvider;

    move-result-object v0

    .line 122
    :goto_a
    return-object v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public getVipEntryBean(I)Lcom/cm/plugincluster/vip/interfaces/IVipEntryBean;
    .registers 3

    .prologue
    .line 94
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_b

    .line 95
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    invoke-interface {v0, p1}, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;->getVipEntryBean(I)Lcom/cm/plugincluster/vip/interfaces/IVipEntryBean;

    move-result-object v0

    .line 97
    :goto_a
    return-object v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method

.method public isAvailable()Z
    .registers 2

    .prologue
    .line 88
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_e

    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    invoke-interface {v0}, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;->isAvailable()Z

    move-result v0

    if-eqz v0, :cond_e

    const/4 v0, 0x1

    :goto_d
    return v0

    :cond_e
    const/4 v0, 0x0

    goto :goto_d
.end method

.method public sendNotification(ILjava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;Landroid/content/Intent;)Z
    .registers 14

    .prologue
    const/4 v1, 0x0

    .line 163
    const v0, 0x23805b

    new-array v2, v1, [Ljava/lang/Object;

    invoke-static {v0, v2}, Lcom/cm/plugincluster/spec/CommanderManager;->invokeCommandExpNull(I[Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/cm/plugincluster/vip/interfaces/IVipNotification;

    .line 164
    if-nez v0, :cond_10

    move v0, v1

    .line 165
    :goto_f
    return v0

    :cond_10
    move v1, p1

    move-object v2, p2

    move-object v3, p3

    move-object v4, p4

    move-object v5, p5

    move-object v6, p6

    invoke-interface/range {v0 .. v6}, Lcom/cm/plugincluster/vip/interfaces/IVipNotification;->sendNotification(ILjava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;Landroid/graphics/Bitmap;Landroid/content/Intent;)Z

    move-result v0

    goto :goto_f
.end method

.method public startAccountDetectActivity(Landroid/content/Context;I)Z
    .registers 6

    .prologue
    .line 152
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    if-nez v0, :cond_20

    .line 153
    const-string/jumbo v0, "startDetectMain"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "start from="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 154
    const/4 v0, 0x0

    .line 157
    :goto_1f
    return v0

    .line 156
    :cond_20
    const-string/jumbo v0, "startDetectMain"

    new-instance v1, Ljava/lang/StringBuilder;

    invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V

    const-string/jumbo v2, "start from="

    invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(I)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}, Lcom/cm/plugincluster/common/proxy/CMLogUtilsProxy;->d(Ljava/lang/String;Ljava/lang/String;)V

    .line 157
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->accountDetectDelegate:Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;

    invoke-interface {v0, p1, p2}, Lcom/cm/plugincluster/vip/interfaces/IAccountDetect;->startAccountDetectActivity(Landroid/content/Context;I)Z

    move-result v0

    goto :goto_1f
.end method

.method public startPrivacyPornAlbum(Landroid/content/Context;Landroid/os/Bundle;I)V
    .registers 8

    .prologue
    .line 171
    const v0, 0x25a013

    const/4 v1, 0x3

    new-array v1, v1, [Ljava/lang/Object;

    const/4 v2, 0x0

    aput-object p1, v1, v2

    const/4 v2, 0x1

    aput-object p2, v1, v2

    const/4 v2, 0x2

    invoke-static {p3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v3

    aput-object v3, v1, v2

    invoke-static {v0, v1}, Lcom/cm/plugincluster/spec/CommanderManager;->invokeCommandExpNull(I[Ljava/lang/Object;)Ljava/lang/Object;

    .line 172
    return-void
.end method

.method public toTargetActivity(Landroid/content/Context;ILandroid/os/Bundle;)Z
    .registers 5

    .prologue
    .line 103
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    if-eqz v0, :cond_b

    .line 104
    iget-object v0, p0, Lcom/cm/plugincluster/vip/VipPluginManager;->vipModuleEntryDelegate:Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;

    invoke-interface {v0, p1, p2, p3}, Lcom/cm/plugincluster/vip/interfaces/IVipPluginModule;->toTargetActivity(Landroid/content/Context;ILandroid/os/Bundle;)Z

    move-result v0

    .line 106
    :goto_a
    return v0

    :cond_b
    const/4 v0, 0x0

    goto :goto_a
.end method