WechatSDKUtil.smali

.class public Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;
.super Ljava/lang/Object;
.source "WechatSDKUtil.java"


# static fields
.field public static final APP_ID:Ljava/lang/String; = "wxc54439c65ae32ec9"

.field public static final REQUEST_AUTH_SCOPE:Ljava/lang/String; = "snsapi_userinfo"

.field public static final REQUEST_AUTH_STATE_ANUM:Ljava/lang/String; = "cm_anum_login_auth"

.field public static final SEND_SCENE_SESSION:I = 0x1

.field public static final SEND_SCENE_TIMELINE:I = 0x2

.field private static final SHARE_VIDEO_WHEN_TITLE_NULL:Ljava/lang/String; = "\u8fd9\u4e2a\u89c6\u9891\u4e5f\u5c31\u770b\u4e868\u904d\u800c\u5df2\uff0c\u5fcd\u4e0d\u4f4f\u5206\u4eab\u7ed9\u4f60\u3002"

.field private static final TAG:Ljava/lang/String; = "CMWX"

.field private static final THUMB_SIZE:I = 0x50

.field private static mInstance:Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;


# instance fields
.field private mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

.field private mContext:Landroid/content/Context;

.field private mToupaiLogoCallback:Lcom/cm/plugincluster/news/interfaces/ILogoCallBack;


# direct methods
.method private constructor <init>(Landroid/content/Context;)V
    .registers 2

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

    .line 57
    iput-object p1, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mContext:Landroid/content/Context;

    .line 58
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->registerToWechat()V

    .line 59
    return-void
.end method

.method static synthetic access$000(Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V
    .registers 2

    .prologue
    .line 39
    invoke-direct {p0, p1}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->sendWechatRequest(Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V

    return-void
.end method

.method private bmpToByteArray(Landroid/graphics/Bitmap;Z)[B
    .registers 6

    .prologue
    .line 293
    new-instance v0, Ljava/io/ByteArrayOutputStream;

    invoke-direct {v0}, Ljava/io/ByteArrayOutputStream;-><init>()V

    .line 294
    sget-object v1, Landroid/graphics/Bitmap$CompressFormat;->PNG:Landroid/graphics/Bitmap$CompressFormat;

    const/16 v2, 0x64

    invoke-virtual {p1, v1, v2, v0}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 295
    if-eqz p2, :cond_11

    .line 296
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->recycle()V

    .line 299
    :cond_11
    invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v1

    .line 301
    :try_start_15
    invoke-virtual {v0}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_18
    .catch Ljava/lang/Exception; {:try_start_15 .. :try_end_18} :catch_19

    .line 306
    :goto_18
    return-object v1

    .line 302
    :catch_19
    move-exception v0

    .line 303
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_18
.end method

.method public static bmpToByteArray(Landroid/graphics/Bitmap;ZLandroid/graphics/Bitmap$CompressFormat;)[B
    .registers 7

    .prologue
    .line 479
    new-instance v1, Ljava/io/ByteArrayOutputStream;

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

    .line 480
    const/16 v0, 0x64

    invoke-virtual {p0, p2, v0, v1}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 481
    const/16 v0, 0x5a

    .line 482
    :goto_c
    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->size()I

    move-result v2

    const/16 v3, 0x7d00

    if-le v2, v3, :cond_1f

    if-lez v0, :cond_1f

    .line 483
    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->reset()V

    .line 484
    invoke-virtual {p0, p2, v0, v1}, Landroid/graphics/Bitmap;->compress(Landroid/graphics/Bitmap$CompressFormat;ILjava/io/OutputStream;)Z

    .line 485
    add-int/lit8 v0, v0, -0xa

    goto :goto_c

    .line 488
    :cond_1f
    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->toByteArray()[B

    move-result-object v0

    .line 490
    if-eqz p1, :cond_28

    .line 491
    invoke-virtual {p0}, Landroid/graphics/Bitmap;->recycle()V

    .line 495
    :cond_28
    :try_start_28
    invoke-virtual {v1}, Ljava/io/ByteArrayOutputStream;->close()V
    :try_end_2b
    .catch Ljava/lang/Exception; {:try_start_28 .. :try_end_2b} :catch_2c

    .line 500
    :goto_2b
    return-object v0

    .line 496
    :catch_2c
    move-exception v1

    .line 497
    invoke-virtual {v1}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_2b
.end method

.method private buildReq(Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Landroid/graphics/Bitmap;ILjava/lang/String;)Z
    .registers 12

    .prologue
    const/high16 v2, 0x3f800000    # 1.0f

    const/4 v3, 0x0

    .line 248
    if-nez p3, :cond_e

    .line 249
    const-string v0, "CMWX"

    const-string v1, "bitmap create failed."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    move v0, v3

    .line 272
    :goto_d
    return v0

    .line 253
    :cond_e
    invoke-direct {p0, p3, v2}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->compressBitmap(Landroid/graphics/Bitmap;F)[B

    move-result-object v0

    .line 254
    if-nez v0, :cond_20

    .line 255
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->shareImageErrorToast()V

    .line 256
    const-string v0, "CMWX"

    const-string v1, "bitmap compress failed."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    move v0, v3

    .line 257
    goto :goto_d

    :cond_20
    move v1, v2

    .line 259
    :cond_21
    array-length v4, v0

    const v5, 0x8000

    if-le v4, v5, :cond_3a

    .line 260
    add-float/2addr v1, v2

    invoke-direct {p0, p3, v1}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->compressBitmap(Landroid/graphics/Bitmap;F)[B

    move-result-object v0

    .line 261
    if-nez v0, :cond_21

    .line 262
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->shareImageErrorToast()V

    .line 263
    const-string v0, "CMWX"

    const-string v1, "bitmap compress failed."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    move v0, v3

    .line 264
    goto :goto_d

    .line 267
    :cond_3a
    iput-object v0, p2, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->thumbData:[B

    .line 269
    invoke-direct {p0, p5}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->buildTransaction(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, p1, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->transaction:Ljava/lang/String;

    .line 270
    iput-object p2, p1, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->message:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    .line 271
    invoke-direct {p0, p4}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->transformScene(I)I

    move-result v0

    iput v0, p1, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->scene:I

    .line 272
    const/4 v0, 0x1

    goto :goto_d
.end method

.method private buildTransaction(Ljava/lang/String;)Ljava/lang/String;
    .registers 6

    .prologue
    .line 288
    if-nez p1, :cond_b

    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v0

    invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v0

    :goto_a
    return-object v0

    :cond_b
    new-instance v0, Ljava/lang/StringBuilder;

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

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

    move-result-object v0

    .line 289
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v2

    invoke-virtual {v0, v2, v3}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    goto :goto_a
.end method

.method private compressBitmap(Landroid/graphics/Bitmap;F)[B
    .registers 8

    .prologue
    const/4 v4, 0x1

    .line 277
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getWidth()I

    move-result v0

    int-to-float v0, v0

    invoke-virtual {p1}, Landroid/graphics/Bitmap;->getHeight()I

    move-result v1

    int-to-float v1, v1

    div-float/2addr v0, v1

    .line 278
    const/high16 v1, 0x46f00000    # 30720.0f

    const/high16 v2, 0x40800000    # 4.0f

    mul-float/2addr v2, p2

    mul-float/2addr v2, v0

    div-float/2addr v1, v2

    float-to-double v2, v1

    invoke-static {v2, v3}, Ljava/lang/Math;->sqrt(D)D

    move-result-wide v2

    double-to-int v1, v2

    .line 279
    int-to-float v2, v1

    mul-float/2addr v0, v2

    float-to-int v0, v0

    .line 280
    invoke-static {p1, v0, v1, v4}, Landroid/graphics/Bitmap;->createScaledBitmap(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;

    move-result-object v0

    .line 281
    if-nez v0, :cond_24

    .line 282
    const/4 v0, 0x0

    .line 284
    :goto_23
    return-object v0

    .line 283
    :cond_24
    invoke-virtual {p1}, Landroid/graphics/Bitmap;->recycle()V

    .line 284
    invoke-direct {p0, v0, v4}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->bmpToByteArray(Landroid/graphics/Bitmap;Z)[B

    move-result-object v0

    goto :goto_23
.end method

.method public static getInstance(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;
    .registers 2

    .prologue
    .line 62
    sget-object v0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mInstance:Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;

    if-nez v0, :cond_b

    .line 63
    new-instance v0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;

    invoke-direct {v0, p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;-><init>(Landroid/content/Context;)V

    sput-object v0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mInstance:Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;

    .line 65
    :cond_b
    sget-object v0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mInstance:Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;

    return-object v0
.end method

.method private registerToWechat()V
    .registers 4

    .prologue
    .line 70
    :try_start_0
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mContext:Landroid/content/Context;

    const-string/jumbo v1, "wxc54439c65ae32ec9"

    const/4 v2, 0x1

    invoke-static {v0, v1, v2}, Lcom/tencent/mm/sdk/openapi/WXAPIFactory;->createWXAPI(Landroid/content/Context;Ljava/lang/String;Z)Lcom/tencent/mm/sdk/openapi/IWXAPI;

    move-result-object v0

    iput-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    .line 72
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    const-string/jumbo v1, "wxc54439c65ae32ec9"

    invoke-interface {v0, v1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->registerApp(Ljava/lang/String;)Z
    :try_end_14
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_14} :catch_15
    .catch Ljava/lang/Error; {:try_start_0 .. :try_end_14} :catch_1a

    .line 79
    :goto_14
    return-void

    .line 73
    :catch_15
    move-exception v0

    .line 75
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    goto :goto_14

    .line 76
    :catch_1a
    move-exception v0

    .line 77
    invoke-virtual {v0}, Ljava/lang/Error;->printStackTrace()V

    goto :goto_14
.end method

.method private sendWechatRequest(Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V
    .registers 4

    .prologue
    .line 454
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v0, p1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    move-result v0

    .line 456
    if-nez v0, :cond_15

    .line 457
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    const-string/jumbo v1, "wxc54439c65ae32ec9"

    invoke-interface {v0, v1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->registerApp(Ljava/lang/String;)Z

    .line 458
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v0, p1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    .line 460
    :cond_15
    return-void
.end method

.method private shareImageErrorToast()V
    .registers 4

    .prologue
    .line 147
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mContext:Landroid/content/Context;

    iget-object v1, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mContext:Landroid/content/Context;

    sget v2, Lcom/cleanmaster/hpsharelib/R$string;->share_image_to_wechat_failed_tips:I

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    const/4 v2, 0x0

    invoke-static {v0, v1, v2}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 148
    return-void
.end method

.method private transformScene(I)I
    .registers 3

    .prologue
    .line 310
    packed-switch p1, :pswitch_data_8

    .line 315
    const/4 v0, 0x0

    :goto_4
    return v0

    .line 312
    :pswitch_5
    const/4 v0, 0x1

    goto :goto_4

    .line 310
    nop

    :pswitch_data_8
    .packed-switch 0x2
        :pswitch_5
    .end packed-switch
.end method


# virtual methods
.method public downLoadImg(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V
    .registers 18

    .prologue
    .line 503
    new-instance v10, Lcom/android/volley/toolbox/ImageRequest;

    new-instance v0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$5;

    move-object v1, p0

    move-object v2, p1

    move v3, p2

    move-object v4, p3

    move-object/from16 v5, p4

    invoke-direct/range {v0 .. v5}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$5;-><init>(Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V

    const/4 v9, 0x0

    const/4 v11, 0x0

    sget-object v7, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    sget-object v8, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    new-instance v1, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$6;

    move-object v2, p0

    move-object v3, p1

    move v4, p2

    move-object v5, p3

    move-object/from16 v6, p4

    invoke-direct/range {v1 .. v6}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$6;-><init>(Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V

    move-object v2, v10

    move-object/from16 v3, p5

    move-object v4, v0

    move v5, v9

    move v6, v11

    move-object v9, v1

    invoke-direct/range {v2 .. v9}, Lcom/android/volley/toolbox/ImageRequest;-><init>(Ljava/lang/String;Lcom/android/volley/Response$Listener;IILandroid/widget/ImageView$ScaleType;Landroid/graphics/Bitmap$Config;Lcom/android/volley/Response$ErrorListener;)V

    .line 520
    invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/HostHelper;->getAppContext()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Lcom/android/volley/toolbox/Volley;->newRequestQueue(Landroid/content/Context;)Lcom/android/volley/RequestQueue;

    move-result-object v0

    .line 521
    invoke-virtual {v0, v10}, Lcom/android/volley/RequestQueue;->add(Lcom/android/volley/Request;)Lcom/android/volley/Request;

    .line 522
    return-void
.end method

.method public getApi()Lcom/tencent/mm/sdk/openapi/IWXAPI;
    .registers 2

    .prologue
    .line 82
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    return-object v0
.end method

.method public requestAuth(Ljava/lang/String;)Z
    .registers 4

    .prologue
    .line 86
    new-instance v0, Lcom/tencent/mm/sdk/modelmsg/SendAuth$Req;

    invoke-direct {v0}, Lcom/tencent/mm/sdk/modelmsg/SendAuth$Req;-><init>()V

    .line 87
    const-string v1, "snsapi_userinfo"

    iput-object v1, v0, Lcom/tencent/mm/sdk/modelmsg/SendAuth$Req;->scope:Ljava/lang/String;

    .line 88
    iput-object p1, v0, Lcom/tencent/mm/sdk/modelmsg/SendAuth$Req;->state:Ljava/lang/String;

    .line 89
    iget-object v1, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v1, v0}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    move-result v0

    if-eqz v0, :cond_15

    .line 90
    const/4 v0, 0x1

    .line 92
    :goto_14
    return v0

    :cond_15
    const/4 v0, 0x0

    goto :goto_14
.end method

.method public declared-synchronized sendImage(Ljava/lang/String;I)Z
    .registers 10

    .prologue
    const/4 v6, 0x0

    .line 201
    monitor-enter p0

    :try_start_2
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_c

    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    if-nez v0, :cond_19

    .line 202
    :cond_c
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->shareImageErrorToast()V

    .line 203
    const-string v0, "CMWX"

    const-string v1, "image path is empty."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_16
    .catchall {:try_start_2 .. :try_end_16} :catchall_a0

    move v0, v6

    .line 243
    :goto_17
    monitor-exit p0

    return v0

    .line 206
    :cond_19
    :try_start_19
    new-instance v0, Ljava/io/File;

    invoke-direct {v0, p1}, Ljava/io/File;-><init>(Ljava/lang/String;)V

    .line 207
    invoke-virtual {v0}, Ljava/io/File;->exists()Z

    move-result v1

    if-eqz v1, :cond_2a

    invoke-virtual {v0}, Ljava/io/File;->isFile()Z

    move-result v0

    if-nez v0, :cond_36

    .line 208
    :cond_2a
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->shareImageErrorToast()V

    .line 209
    const-string v0, "CMWX"

    const-string v1, "image not exist."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    move v0, v6

    .line 210
    goto :goto_17

    .line 213
    :cond_36
    new-instance v0, Lcom/tencent/mm/sdk/modelmsg/WXImageObject;

    invoke-direct {v0}, Lcom/tencent/mm/sdk/modelmsg/WXImageObject;-><init>()V

    .line 214
    invoke-virtual {v0, p1}, Lcom/tencent/mm/sdk/modelmsg/WXImageObject;->setImagePath(Ljava/lang/String;)V

    .line 216
    new-instance v2, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    invoke-direct {v2}, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;-><init>()V

    .line 217
    iput-object v0, v2, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->mediaObject:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage$IMediaObject;

    .line 219
    new-instance v1, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;

    invoke-direct {v1}, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;-><init>()V
    :try_end_4a
    .catchall {:try_start_19 .. :try_end_4a} :catchall_a0

    .line 221
    :try_start_4a
    invoke-static {p1}, Landroid/graphics/BitmapFactory;->decodeFile(Ljava/lang/String;)Landroid/graphics/Bitmap;

    move-result-object v3

    .line 222
    const-string v5, "img"

    move-object v0, p0

    move v4, p2

    invoke-direct/range {v0 .. v5}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->buildReq(Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Landroid/graphics/Bitmap;ILjava/lang/String;)Z
    :try_end_55
    .catch Ljava/lang/Exception; {:try_start_4a .. :try_end_55} :catch_5a
    .catchall {:try_start_4a .. :try_end_55} :catchall_a0

    move-result v0

    if-nez v0, :cond_7f

    move v0, v6

    .line 223
    goto :goto_17

    .line 225
    :catch_5a
    move-exception v0

    .line 226
    :try_start_5b
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 227
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->shareImageErrorToast()V

    .line 228
    const-string v1, "CMWX"

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "share image exception:"

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

    move-result-object v2

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

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

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    move v0, v6

    .line 229
    goto :goto_17

    .line 232
    :cond_7f
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v0, v1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    move-result v0

    .line 234
    if-nez v0, :cond_95

    .line 235
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    const-string/jumbo v2, "wxc54439c65ae32ec9"

    invoke-interface {v0, v2}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->registerApp(Ljava/lang/String;)Z

    .line 236
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v0, v1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    move-result v0

    .line 238
    :cond_95
    if-eqz v0, :cond_a3

    .line 239
    const-string v1, "CMWX"

    const-string v2, "share image success."

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_9e
    .catchall {:try_start_5b .. :try_end_9e} :catchall_a0

    goto/16 :goto_17

    .line 201
    :catchall_a0
    move-exception v0

    monitor-exit p0

    throw v0

    .line 241
    :cond_a3
    :try_start_a3
    const-string v1, "CMWX"

    const-string v2, "share image failed."

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_aa
    .catchall {:try_start_a3 .. :try_end_aa} :catchall_a0

    goto/16 :goto_17
.end method

.method public sendImageToSession(Ljava/lang/String;)Z
    .registers 3

    .prologue
    .line 139
    const/4 v0, 0x1

    invoke-virtual {p0, p1, v0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->sendImage(Ljava/lang/String;I)Z

    move-result v0

    return v0
.end method

.method public sendImageToTimeline(Ljava/lang/String;)Z
    .registers 3

    .prologue
    .line 143
    const/4 v0, 0x2

    invoke-virtual {p0, p1, v0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->sendImage(Ljava/lang/String;I)Z

    move-result v0

    return v0
.end method

.method public declared-synchronized sendText(Ljava/lang/String;I)Z
    .registers 6

    .prologue
    .line 104
    monitor-enter p0

    :try_start_1
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_b

    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    if-nez v0, :cond_16

    .line 105
    :cond_b
    const-string v0, "CMWX"

    const-string/jumbo v1, "text is empty."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_13
    .catchall {:try_start_1 .. :try_end_13} :catchall_5c

    .line 106
    const/4 v0, 0x0

    .line 135
    :goto_14
    monitor-exit p0

    return v0

    .line 109
    :cond_16
    :try_start_16
    new-instance v0, Lcom/tencent/mm/sdk/modelmsg/WXTextObject;

    invoke-direct {v0}, Lcom/tencent/mm/sdk/modelmsg/WXTextObject;-><init>()V

    .line 110
    iput-object p1, v0, Lcom/tencent/mm/sdk/modelmsg/WXTextObject;->text:Ljava/lang/String;

    .line 112
    new-instance v1, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    invoke-direct {v1}, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;-><init>()V

    .line 113
    iput-object v0, v1, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->mediaObject:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage$IMediaObject;

    .line 116
    iput-object p1, v1, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->description:Ljava/lang/String;

    .line 119
    new-instance v2, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;

    invoke-direct {v2}, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;-><init>()V

    .line 120
    const-string/jumbo v0, "text"

    invoke-direct {p0, v0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->buildTransaction(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

    iput-object v0, v2, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->transaction:Ljava/lang/String;

    .line 121
    iput-object v1, v2, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->message:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    .line 122
    invoke-direct {p0, p2}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->transformScene(I)I

    move-result v0

    iput v0, v2, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->scene:I

    .line 124
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v0, v2}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    move-result v0

    .line 126
    if-nez v0, :cond_52

    .line 127
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    const-string/jumbo v1, "wxc54439c65ae32ec9"

    invoke-interface {v0, v1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->registerApp(Ljava/lang/String;)Z

    .line 128
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v0, v2}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    move-result v0

    .line 130
    :cond_52
    if-eqz v0, :cond_5f

    .line 131
    const-string v1, "CMWX"

    const-string v2, "share text success."

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_5b
    .catchall {:try_start_16 .. :try_end_5b} :catchall_5c

    goto :goto_14

    .line 104
    :catchall_5c
    move-exception v0

    monitor-exit p0

    throw v0

    .line 133
    :cond_5f
    :try_start_5f
    const-string v1, "CMWX"

    const-string v2, "share text failed."

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_66
    .catchall {:try_start_5f .. :try_end_66} :catchall_5c

    goto :goto_14
.end method

.method public sendTextToSession(Ljava/lang/String;)Z
    .registers 3

    .prologue
    .line 96
    const/4 v0, 0x1

    invoke-virtual {p0, p1, v0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->sendText(Ljava/lang/String;I)Z

    move-result v0

    return v0
.end method

.method public sendTextToTimeline(Ljava/lang/String;)Z
    .registers 3

    .prologue
    .line 100
    const/4 v0, 0x2

    invoke-virtual {p0, p1, v0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->sendText(Ljava/lang/String;I)Z

    move-result v0

    return v0
.end method

.method public declared-synchronized sendUrlWebpage(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;Landroid/graphics/Bitmap;)Z
    .registers 13

    .prologue
    const/4 v6, 0x0

    .line 151
    monitor-enter p0

    :try_start_2
    invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v0

    if-nez v0, :cond_e

    if-eqz p5, :cond_e

    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    if-nez v0, :cond_1b

    .line 152
    :cond_e
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->shareImageErrorToast()V

    .line 153
    const-string v0, "CMWX"

    const-string v1, "image path is empty."

    invoke-static {v0, v1}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_18
    .catchall {:try_start_2 .. :try_end_18} :catchall_85

    move v0, v6

    .line 187
    :goto_19
    monitor-exit p0

    return v0

    .line 156
    :cond_1b
    :try_start_1b
    new-instance v0, Lcom/tencent/mm/sdk/modelmsg/WXWebpageObject;

    invoke-direct {v0}, Lcom/tencent/mm/sdk/modelmsg/WXWebpageObject;-><init>()V

    .line 157
    iput-object p1, v0, Lcom/tencent/mm/sdk/modelmsg/WXWebpageObject;->webpageUrl:Ljava/lang/String;

    .line 159
    new-instance v2, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    invoke-direct {v2}, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;-><init>()V

    .line 160
    iput-object v0, v2, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->mediaObject:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage$IMediaObject;

    .line 161
    iput-object p3, v2, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->title:Ljava/lang/String;

    .line 162
    iput-object p4, v2, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->description:Ljava/lang/String;

    .line 164
    new-instance v1, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;

    invoke-direct {v1}, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;-><init>()V
    :try_end_32
    .catchall {:try_start_1b .. :try_end_32} :catchall_85

    .line 166
    :try_start_32
    const-string/jumbo v5, "webpage"

    move-object v0, p0

    move-object v3, p5

    move v4, p2

    invoke-direct/range {v0 .. v5}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->buildReq(Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Landroid/graphics/Bitmap;ILjava/lang/String;)Z
    :try_end_3b
    .catch Ljava/lang/Exception; {:try_start_32 .. :try_end_3b} :catch_40
    .catchall {:try_start_32 .. :try_end_3b} :catchall_85

    move-result v0

    if-nez v0, :cond_65

    move v0, v6

    .line 167
    goto :goto_19

    .line 169
    :catch_40
    move-exception v0

    .line 170
    :try_start_41
    invoke-virtual {v0}, Ljava/lang/Exception;->printStackTrace()V

    .line 171
    invoke-direct {p0}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->shareImageErrorToast()V

    .line 172
    const-string v1, "CMWX"

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "share webpage exception:"

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

    move-result-object v2

    invoke-virtual {v0}, Ljava/lang/Exception;->getMessage()Ljava/lang/String;

    move-result-object v0

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

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    invoke-static {v1, v0}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I

    move v0, v6

    .line 173
    goto :goto_19

    .line 176
    :cond_65
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v0, v1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    move-result v0

    .line 178
    if-nez v0, :cond_7b

    .line 179
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    const-string/jumbo v2, "wxc54439c65ae32ec9"

    invoke-interface {v0, v2}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->registerApp(Ljava/lang/String;)Z

    .line 180
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mApi:Lcom/tencent/mm/sdk/openapi/IWXAPI;

    invoke-interface {v0, v1}, Lcom/tencent/mm/sdk/openapi/IWXAPI;->sendReq(Lcom/tencent/mm/sdk/modelbase/BaseReq;)Z

    move-result v0

    .line 182
    :cond_7b
    if-eqz v0, :cond_88

    .line 183
    const-string v1, "CMWX"

    const-string v2, "share image success."

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_84
    .catchall {:try_start_41 .. :try_end_84} :catchall_85

    goto :goto_19

    .line 151
    :catchall_85
    move-exception v0

    monitor-exit p0

    throw v0

    .line 185
    :cond_88
    :try_start_88
    const-string v1, "CMWX"

    const-string v2, "share image failed."

    invoke-static {v1, v2}, Landroid/util/Log;->e(Ljava/lang/String;Ljava/lang/String;)I
    :try_end_8f
    .catchall {:try_start_88 .. :try_end_8f} :catchall_85

    goto :goto_19
.end method

.method public setMsgThumbData(Landroid/content/Context;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Landroid/graphics/Bitmap;Ljava/lang/Object;)V
    .registers 7

    .prologue
    .line 464
    if-nez p3, :cond_8

    .line 465
    iget-object v0, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mToupaiLogoCallback:Lcom/cm/plugincluster/news/interfaces/ILogoCallBack;

    invoke-interface {v0}, Lcom/cm/plugincluster/news/interfaces/ILogoCallBack;->callback()Landroid/graphics/Bitmap;

    move-result-object p3

    .line 467
    :cond_8
    if-nez p3, :cond_b

    .line 475
    :goto_a
    return-void

    .line 472
    :cond_b
    const/4 v0, 0x0

    sget-object v1, Landroid/graphics/Bitmap$CompressFormat;->JPEG:Landroid/graphics/Bitmap$CompressFormat;

    invoke-static {p3, v0, v1}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->bmpToByteArray(Landroid/graphics/Bitmap;ZLandroid/graphics/Bitmap$CompressFormat;)[B

    move-result-object v0

    .line 474
    iput-object v0, p2, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->thumbData:[B

    goto :goto_a
.end method

.method public setToupaiLogo(Lcom/cm/plugincluster/news/interfaces/ILogoCallBack;)V
    .registers 2

    .prologue
    .line 525
    iput-object p1, p0, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->mToupaiLogoCallback:Lcom/cm/plugincluster/news/interfaces/ILogoCallBack;

    .line 526
    return-void
.end method

.method public shareByWeChat(Landroid/content/Context;Lorg/json/JSONObject;)V
    .registers 24

    .prologue
    .line 388
    new-instance v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    invoke-direct {v7}, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;-><init>()V

    .line 391
    const-string v5, ""

    .line 392
    const-string v8, ""

    .line 393
    const-string v6, ""

    .line 395
    :try_start_b
    const-string/jumbo v4, "title"

    move-object/from16 v0, p2

    invoke-virtual {v0, v4}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;
    :try_end_16
    .catch Lorg/json/JSONException; {:try_start_b .. :try_end_16} :catch_7a

    .line 396
    :try_start_16
    const-string v5, "imageUrl"

    move-object/from16 v0, p2

    invoke-virtual {v0, v5}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;
    :try_end_20
    .catch Lorg/json/JSONException; {:try_start_16 .. :try_end_20} :catch_c5

    .line 397
    :try_start_20
    new-instance v8, Ljava/lang/StringBuilder;

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

    const-string v9, "shareUrl"

    move-object/from16 v0, p2

    invoke-virtual {v0, v9}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "&share=cmnews"

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

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_3a
    .catch Lorg/json/JSONException; {:try_start_20 .. :try_end_3a} :catch_cc

    move-result-object v6

    move-object/from16 v18, v5

    move-object v5, v4

    move-object v4, v6

    .line 402
    :goto_3f
    invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v6

    if-nez v6, :cond_89

    .line 403
    iput-object v5, v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->title:Ljava/lang/String;

    .line 408
    :goto_47
    new-instance v5, Lcom/tencent/mm/sdk/modelmsg/WXVideoObject;

    invoke-direct {v5}, Lcom/tencent/mm/sdk/modelmsg/WXVideoObject;-><init>()V

    .line 409
    iput-object v5, v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->mediaObject:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage$IMediaObject;

    .line 410
    iput-object v4, v5, Lcom/tencent/mm/sdk/modelmsg/WXVideoObject;->videoUrl:Ljava/lang/String;

    .line 412
    new-instance v9, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;

    invoke-direct {v9}, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;-><init>()V

    .line 413
    invoke-static/range {v18 .. v18}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-eqz v4, :cond_8f

    .line 414
    const/4 v4, 0x0

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move-object/from16 v2, p2

    invoke-virtual {v0, v1, v7, v4, v2}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->setMsgThumbData(Landroid/content/Context;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Landroid/graphics/Bitmap;Ljava/lang/Object;)V

    .line 416
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v9, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->transaction:Ljava/lang/String;

    .line 417
    iput-object v7, v9, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->message:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    .line 418
    const/4 v4, 0x0

    iput v4, v9, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->scene:I

    .line 420
    move-object/from16 v0, p0

    invoke-direct {v0, v9}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->sendWechatRequest(Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V

    .line 450
    :goto_79
    return-void

    .line 398
    :catch_7a
    move-exception v4

    move-object/from16 v20, v4

    move-object v4, v5

    move-object v5, v8

    move-object/from16 v8, v20

    .line 399
    :goto_81
    invoke-virtual {v8}, Lorg/json/JSONException;->printStackTrace()V

    move-object/from16 v18, v5

    move-object v5, v4

    move-object v4, v6

    goto :goto_3f

    .line 405
    :cond_89
    const-string/jumbo v5, "\u8fd9\u4e2a\u89c6\u9891\u4e5f\u5c31\u770b\u4e868\u904d\u800c\u5df2\uff0c\u5fcd\u4e0d\u4f4f\u5206\u4eab\u7ed9\u4f60\u3002"

    iput-object v5, v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->description:Ljava/lang/String;

    goto :goto_47

    .line 422
    :cond_8f
    new-instance v19, Lcom/android/volley/toolbox/ImageRequest;

    new-instance v4, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$3;

    move-object/from16 v5, p0

    move-object/from16 v6, p1

    move-object/from16 v8, p2

    invoke-direct/range {v4 .. v9}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$3;-><init>(Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;Landroid/content/Context;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Lorg/json/JSONObject;Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V

    const/4 v5, 0x0

    const/4 v6, 0x0

    sget-object v16, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    sget-object v17, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    new-instance v10, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$4;

    move-object/from16 v11, p0

    move-object/from16 v12, p1

    move-object v13, v7

    move-object/from16 v14, p2

    move-object v15, v9

    invoke-direct/range {v10 .. v15}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$4;-><init>(Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;Landroid/content/Context;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Lorg/json/JSONObject;Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V

    move-object/from16 v11, v19

    move-object/from16 v12, v18

    move-object v13, v4

    move v14, v5

    move v15, v6

    move-object/from16 v18, v10

    invoke-direct/range {v11 .. v18}, Lcom/android/volley/toolbox/ImageRequest;-><init>(Ljava/lang/String;Lcom/android/volley/Response$Listener;IILandroid/widget/ImageView$ScaleType;Landroid/graphics/Bitmap$Config;Lcom/android/volley/Response$ErrorListener;)V

    .line 447
    invoke-static/range {p1 .. p1}, Lcom/android/volley/toolbox/Volley;->newRequestQueue(Landroid/content/Context;)Lcom/android/volley/RequestQueue;

    move-result-object v4

    .line 448
    move-object/from16 v0, v19

    invoke-virtual {v4, v0}, Lcom/android/volley/RequestQueue;->add(Lcom/android/volley/Request;)Lcom/android/volley/Request;

    goto :goto_79

    .line 398
    :catch_c5
    move-exception v5

    move-object/from16 v20, v5

    move-object v5, v8

    move-object/from16 v8, v20

    goto :goto_81

    :catch_cc
    move-exception v8

    goto :goto_81
.end method

.method public shareByWechatFriends(Landroid/content/Context;Lorg/json/JSONObject;)V
    .registers 24

    .prologue
    .line 321
    new-instance v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    invoke-direct {v7}, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;-><init>()V

    .line 323
    const-string v5, ""

    .line 324
    const-string v8, ""

    .line 325
    const-string v6, ""

    .line 327
    :try_start_b
    const-string/jumbo v4, "title"

    move-object/from16 v0, p2

    invoke-virtual {v0, v4}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v4

    check-cast v4, Ljava/lang/String;
    :try_end_16
    .catch Lorg/json/JSONException; {:try_start_b .. :try_end_16} :catch_7c

    .line 328
    :try_start_16
    const-string v5, "imageUrl"

    move-object/from16 v0, p2

    invoke-virtual {v0, v5}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Ljava/lang/String;
    :try_end_20
    .catch Lorg/json/JSONException; {:try_start_16 .. :try_end_20} :catch_cc

    .line 329
    :try_start_20
    new-instance v8, Ljava/lang/StringBuilder;

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

    const-string v9, "shareUrl"

    move-object/from16 v0, p2

    invoke-virtual {v0, v9}, Lorg/json/JSONObject;->get(Ljava/lang/String;)Ljava/lang/Object;

    move-result-object v9

    invoke-virtual {v8, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;

    move-result-object v8

    const-string v9, "&share=cmnews"

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

    move-result-object v8

    invoke-virtual {v8}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
    :try_end_3a
    .catch Lorg/json/JSONException; {:try_start_20 .. :try_end_3a} :catch_d3

    move-result-object v6

    move-object/from16 v18, v5

    move-object v5, v4

    move-object v4, v6

    .line 333
    :goto_3f
    invoke-static {v5}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v6

    if-nez v6, :cond_8b

    .line 334
    iput-object v5, v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->description:Ljava/lang/String;

    .line 335
    iput-object v5, v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->title:Ljava/lang/String;

    .line 340
    :goto_49
    new-instance v5, Lcom/tencent/mm/sdk/modelmsg/WXVideoObject;

    invoke-direct {v5}, Lcom/tencent/mm/sdk/modelmsg/WXVideoObject;-><init>()V

    .line 341
    iput-object v5, v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->mediaObject:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage$IMediaObject;

    .line 342
    iput-object v4, v5, Lcom/tencent/mm/sdk/modelmsg/WXVideoObject;->videoUrl:Ljava/lang/String;

    .line 345
    new-instance v9, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;

    invoke-direct {v9}, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;-><init>()V

    .line 346
    invoke-static/range {v18 .. v18}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z

    move-result v4

    if-eqz v4, :cond_96

    .line 347
    const/4 v4, 0x0

    move-object/from16 v0, p0

    move-object/from16 v1, p1

    move-object/from16 v2, p2

    invoke-virtual {v0, v1, v7, v4, v2}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->setMsgThumbData(Landroid/content/Context;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Landroid/graphics/Bitmap;Ljava/lang/Object;)V

    .line 348
    invoke-static {}, Ljava/lang/System;->currentTimeMillis()J

    move-result-wide v4

    invoke-static {v4, v5}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

    move-result-object v4

    iput-object v4, v9, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->transaction:Ljava/lang/String;

    .line 349
    iput-object v7, v9, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->message:Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;

    .line 350
    const/4 v4, 0x1

    iput v4, v9, Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;->scene:I

    .line 352
    move-object/from16 v0, p0

    invoke-direct {v0, v9}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;->sendWechatRequest(Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V

    .line 384
    :goto_7b
    return-void

    .line 330
    :catch_7c
    move-exception v4

    move-object/from16 v20, v4

    move-object v4, v5

    move-object v5, v8

    move-object/from16 v8, v20

    .line 331
    :goto_83
    invoke-virtual {v8}, Lorg/json/JSONException;->printStackTrace()V

    move-object/from16 v18, v5

    move-object v5, v4

    move-object v4, v6

    goto :goto_3f

    .line 337
    :cond_8b
    const-string/jumbo v5, "\u8fd9\u4e2a\u89c6\u9891\u4e5f\u5c31\u770b\u4e868\u904d\u800c\u5df2\uff0c\u5fcd\u4e0d\u4f4f\u5206\u4eab\u7ed9\u4f60\u3002"

    iput-object v5, v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->description:Ljava/lang/String;

    .line 338
    const-string/jumbo v5, "\u8fd9\u4e2a\u89c6\u9891\u4e5f\u5c31\u770b\u4e868\u904d\u800c\u5df2\uff0c\u5fcd\u4e0d\u4f4f\u5206\u4eab\u7ed9\u4f60\u3002"

    iput-object v5, v7, Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;->title:Ljava/lang/String;

    goto :goto_49

    .line 354
    :cond_96
    new-instance v19, Lcom/android/volley/toolbox/ImageRequest;

    new-instance v4, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$1;

    move-object/from16 v5, p0

    move-object/from16 v6, p1

    move-object/from16 v8, p2

    invoke-direct/range {v4 .. v9}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$1;-><init>(Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;Landroid/content/Context;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Lorg/json/JSONObject;Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V

    const/4 v5, 0x0

    const/4 v6, 0x0

    sget-object v16, Landroid/widget/ImageView$ScaleType;->CENTER:Landroid/widget/ImageView$ScaleType;

    sget-object v17, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    new-instance v10, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$2;

    move-object/from16 v11, p0

    move-object/from16 v12, p1

    move-object v13, v7

    move-object/from16 v14, p2

    move-object v15, v9

    invoke-direct/range {v10 .. v15}, Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil$2;-><init>(Lcom/cleanmaster/hpsharelib/share/WechatSDKUtil;Landroid/content/Context;Lcom/tencent/mm/sdk/modelmsg/WXMediaMessage;Lorg/json/JSONObject;Lcom/tencent/mm/sdk/modelmsg/SendMessageToWX$Req;)V

    move-object/from16 v11, v19

    move-object/from16 v12, v18

    move-object v13, v4

    move v14, v5

    move v15, v6

    move-object/from16 v18, v10

    invoke-direct/range {v11 .. v18}, Lcom/android/volley/toolbox/ImageRequest;-><init>(Ljava/lang/String;Lcom/android/volley/Response$Listener;IILandroid/widget/ImageView$ScaleType;Landroid/graphics/Bitmap$Config;Lcom/android/volley/Response$ErrorListener;)V

    .line 381
    invoke-static/range {p1 .. p1}, Lcom/android/volley/toolbox/Volley;->newRequestQueue(Landroid/content/Context;)Lcom/android/volley/RequestQueue;

    move-result-object v4

    .line 382
    move-object/from16 v0, v19

    invoke-virtual {v4, v0}, Lcom/android/volley/RequestQueue;->add(Lcom/android/volley/Request;)Lcom/android/volley/Request;

    goto :goto_7b

    .line 330
    :catch_cc
    move-exception v5

    move-object/from16 v20, v5

    move-object v5, v8

    move-object/from16 v8, v20

    goto :goto_83

    :catch_d3
    move-exception v8

    goto :goto_83
.end method