RongPushClient.smali

.class public Lio/rong/push/RongPushClient;
.super Ljava/lang/Object;
.source "RongPushClient.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lio/rong/push/RongPushClient$ConversationType;
    }
.end annotation


# static fields
.field private static final TAG:Ljava/lang/String; = "RongPushClient"

.field private static miAppId:Ljava/lang/String;

.field private static miAppKey:Ljava/lang/String;

.field private static mzAppId:Ljava/lang/String;

.field private static mzAppKey:Ljava/lang/String;

.field private static pushConfig:Lio/rong/push/pushconfig/PushConfig;

.field private static final registeredType:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lio/rong/push/PushType;",
            ">;"
        }
    .end annotation
.end field


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

    .line 1
    new-instance v0, Ljava/util/ArrayList;

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

    sput-object v0, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

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

    return-void
.end method

.method public static cancelPushHeartBeat(Landroid/content/Context;)V
    .registers 3

    .line 1
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lio/rong/push/rongpush/PushService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "io.rong.push.intent.action.CANCEL_HEART_BEAT"

    .line 2
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 3
    invoke-static {p0, v0}, Lio/rong/push/rongpush/PushService;->enqueueWork(Landroid/content/Context;Landroid/content/Intent;)V

    return-void
.end method

.method public static checkManifest(Landroid/content/Context;)V
    .registers 1
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    return-void
.end method

.method public static clearAllNotifications(Landroid/content/Context;)V
    .registers 3

    .line 1
    sget-object v0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string v1, "clearAllNotifications"

    invoke-static {v0, v1}, Lio/rong/push/common/RLog;->i(Ljava/lang/String;Ljava/lang/String;)V

    .line 2
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getConfigPushType(Landroid/content/Context;)Lio/rong/push/PushType;

    move-result-object v0

    sget-object v1, Lio/rong/push/PushType;->XIAOMI:Lio/rong/push/PushType;

    invoke-virtual {v0, v1}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1a

    .line 3
    invoke-static {p0}, Lcom/xiaomi/mipush/sdk/MiPushClient;->clearNotification(Landroid/content/Context;)V

    .line 4
    :cond_1a
    invoke-static {p0}, Lio/rong/push/notification/RongNotificationInterface;->removeAllNotification(Landroid/content/Context;)V

    return-void
.end method

.method public static clearAllPushNotifications(Landroid/content/Context;)V
    .registers 3

    .line 1
    sget-object v0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string v1, "clearAllPushNotifications"

    invoke-static {v0, v1}, Lio/rong/push/common/RLog;->i(Ljava/lang/String;Ljava/lang/String;)V

    .line 2
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getConfigPushType(Landroid/content/Context;)Lio/rong/push/PushType;

    move-result-object v0

    sget-object v1, Lio/rong/push/PushType;->XIAOMI:Lio/rong/push/PushType;

    invoke-virtual {v0, v1}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_1a

    .line 3
    invoke-static {p0}, Lcom/xiaomi/mipush/sdk/MiPushClient;->clearNotification(Landroid/content/Context;)V

    .line 4
    :cond_1a
    invoke-static {p0}, Lio/rong/push/notification/RongNotificationInterface;->removeAllPushNotification(Landroid/content/Context;)V

    return-void
.end method

.method public static clearAllPushServiceNotifications(Landroid/content/Context;)V
    .registers 3

    .line 1
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getConfigPushType(Landroid/content/Context;)Lio/rong/push/PushType;

    move-result-object v0

    sget-object v1, Lio/rong/push/PushType;->XIAOMI:Lio/rong/push/PushType;

    invoke-virtual {v0, v1}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_13

    .line 2
    invoke-static {p0}, Lcom/xiaomi/mipush/sdk/MiPushClient;->clearNotification(Landroid/content/Context;)V

    .line 3
    :cond_13
    invoke-static {p0}, Lio/rong/push/notification/RongNotificationInterface;->removeAllPushServiceNotification(Landroid/content/Context;)V

    return-void
.end method

.method public static clearNotificationById(Landroid/content/Context;I)V
    .registers 4

    .line 1
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getConfigPushType(Landroid/content/Context;)Lio/rong/push/PushType;

    move-result-object v0

    sget-object v1, Lio/rong/push/PushType;->XIAOMI:Lio/rong/push/PushType;

    invoke-virtual {v0, v1}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_13

    .line 2
    invoke-static {p0, p1}, Lcom/xiaomi/mipush/sdk/MiPushClient;->clearNotification(Landroid/content/Context;I)V

    .line 3
    :cond_13
    invoke-static {p0, p1}, Lio/rong/push/notification/RongNotificationInterface;->removeNotification(Landroid/content/Context;I)V

    return-void
.end method

.method public static getCurrentPushType(Landroid/content/Context;)Lio/rong/push/PushType;
    .registers 2

    .line 1
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->isConfigDone(Landroid/content/Context;)Z

    move-result v0

    if-eqz v0, :cond_13

    .line 2
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getConfigPushType(Landroid/content/Context;)Lio/rong/push/PushType;

    move-result-object p0

    return-object p0

    .line 3
    :cond_13
    sget-object p0, Lio/rong/push/PushType;->UNKNOWN:Lio/rong/push/PushType;

    return-object p0
.end method

.method public static init(Landroid/content/Context;Ljava/lang/String;)V
    .registers 3

    const-string v0, ""

    .line 1
    invoke-static {p0, p1, v0}, Lio/rong/push/RongPushClient;->init(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method public static init(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .registers 8

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

    move-result v0

    if-nez v0, :cond_64

    .line 3
    sget-object v0, Lio/rong/push/RongPushClient;->pushConfig:Lio/rong/push/pushconfig/PushConfig;

    if-nez v0, :cond_52

    .line 4
    sget-object v0, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    sget-object v1, Lio/rong/push/PushType;->HUAWEI:Lio/rong/push/PushType;

    invoke-virtual {v0, v1}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v0

    .line 5
    sget-object v1, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    sget-object v2, Lio/rong/push/PushType;->GOOGLE_GCM:Lio/rong/push/PushType;

    invoke-virtual {v1, v2}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v1

    .line 6
    sget-object v2, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    sget-object v3, Lio/rong/push/PushType;->GOOGLE_FCM:Lio/rong/push/PushType;

    invoke-virtual {v2, v3}, Ljava/util/ArrayList;->contains(Ljava/lang/Object;)Z

    move-result v2

    .line 7
    new-instance v3, Lio/rong/push/pushconfig/PushConfig$Builder;

    invoke-direct {v3}, Lio/rong/push/pushconfig/PushConfig$Builder;-><init>()V

    .line 8
    invoke-virtual {v3, v0}, Lio/rong/push/pushconfig/PushConfig$Builder;->enableHWPush(Z)Lio/rong/push/pushconfig/PushConfig$Builder;

    move-result-object v0

    sget-object v3, Lio/rong/push/RongPushClient;->miAppId:Ljava/lang/String;

    sget-object v4, Lio/rong/push/RongPushClient;->miAppKey:Ljava/lang/String;

    .line 9
    invoke-virtual {v0, v3, v4}, Lio/rong/push/pushconfig/PushConfig$Builder;->enableMiPush(Ljava/lang/String;Ljava/lang/String;)Lio/rong/push/pushconfig/PushConfig$Builder;

    move-result-object v0

    sget-object v3, Lio/rong/push/RongPushClient;->mzAppId:Ljava/lang/String;

    sget-object v4, Lio/rong/push/RongPushClient;->mzAppKey:Ljava/lang/String;

    .line 10
    invoke-virtual {v0, v3, v4}, Lio/rong/push/pushconfig/PushConfig$Builder;->enableMeiZuPush(Ljava/lang/String;Ljava/lang/String;)Lio/rong/push/pushconfig/PushConfig$Builder;

    move-result-object v0

    .line 11
    invoke-virtual {v0, v2}, Lio/rong/push/pushconfig/PushConfig$Builder;->enableFCM(Z)Lio/rong/push/pushconfig/PushConfig$Builder;

    move-result-object v0

    .line 12
    invoke-virtual {v0, v1}, Lio/rong/push/pushconfig/PushConfig$Builder;->enableGCM(Z)Lio/rong/push/pushconfig/PushConfig$Builder;

    move-result-object v0

    .line 13
    invoke-virtual {v0, p1}, Lio/rong/push/pushconfig/PushConfig$Builder;->setAppKey(Ljava/lang/String;)Lio/rong/push/pushconfig/PushConfig$Builder;

    move-result-object p1

    .line 14
    invoke-virtual {p1, p2}, Lio/rong/push/pushconfig/PushConfig$Builder;->setPushNaviAddress(Ljava/lang/String;)Lio/rong/push/pushconfig/PushConfig$Builder;

    move-result-object p1

    .line 15
    invoke-virtual {p1}, Lio/rong/push/pushconfig/PushConfig$Builder;->build()Lio/rong/push/pushconfig/PushConfig;

    move-result-object p1

    sput-object p1, Lio/rong/push/RongPushClient;->pushConfig:Lio/rong/push/pushconfig/PushConfig;

    goto :goto_5a

    .line 16
    :cond_52
    invoke-virtual {v0, p2}, Lio/rong/push/pushconfig/PushConfig;->setPushNaviAddress(Ljava/lang/String;)V

    .line 17
    sget-object p2, Lio/rong/push/RongPushClient;->pushConfig:Lio/rong/push/pushconfig/PushConfig;

    invoke-virtual {p2, p1}, Lio/rong/push/pushconfig/PushConfig;->setAppKey(Ljava/lang/String;)V

    .line 18
    :goto_5a
    invoke-static {}, Lio/rong/push/PushManager;->getInstance()Lio/rong/push/PushManager;

    move-result-object p1

    sget-object p2, Lio/rong/push/RongPushClient;->pushConfig:Lio/rong/push/pushconfig/PushConfig;

    invoke-virtual {p1, p0, p2}, Lio/rong/push/PushManager;->init(Landroid/content/Context;Lio/rong/push/pushconfig/PushConfig;)V

    return-void

    .line 19
    :cond_64
    new-instance p0, Ljava/lang/ExceptionInInitializerError;

    const-string p1, "appKey can\'t be empty!"

    invoke-direct {p0, p1}, Ljava/lang/ExceptionInInitializerError;-><init>(Ljava/lang/String;)V

    throw p0
.end method

.method public static recordHWNotificationEvent(Landroid/content/Intent;)V
    .registers 6

    const-string v0, "rc"

    if-nez p0, :cond_5

    return-void

    :cond_5
    const-string v1, "options"

    .line 1
    invoke-virtual {p0, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

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

    move-result v1

    if-nez v1, :cond_60

    .line 3
    :try_start_11
    new-instance v1, Lorg/json/JSONObject;

    invoke-direct {v1, p0}, Lorg/json/JSONObject;-><init>(Ljava/lang/String;)V

    .line 4
    invoke-virtual {v1, v0}, Lorg/json/JSONObject;->has(Ljava/lang/String;)Z

    move-result p0

    if-eqz p0, :cond_60

    .line 5
    invoke-virtual {v1, v0}, Lorg/json/JSONObject;->getJSONObject(Ljava/lang/String;)Lorg/json/JSONObject;

    move-result-object p0

    const-string v0, "id"

    .line 6
    invoke-virtual {p0, v0}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v0

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

    move-result v1

    if-eqz v1, :cond_34

    .line 8
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string v0, "pushId is empty,recordNotificationEvent is failure"

    invoke-static {p0, v0}, Lio/rong/push/common/RLog;->d(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    :cond_34
    const-string v1, "objectName"

    .line 9
    invoke-virtual {p0, v1}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v1

    const-string v2, "tId"

    .line 10
    invoke-virtual {p0, v2}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v2

    const-string v3, "sourceType"

    .line 11
    invoke-virtual {p0, v3}, Lorg/json/JSONObject;->optString(Ljava/lang/String;)Ljava/lang/String;

    move-result-object p0

    .line 12
    sget-object v3, Lio/rong/push/notification/PushNotificationMessage$PushSourceType;->FROM_ADMIN:Lio/rong/push/notification/PushNotificationMessage$PushSourceType;

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

    move-result v4

    if-nez v4, :cond_58

    .line 14
    invoke-static {}, Lio/rong/push/notification/PushNotificationMessage$PushSourceType;->values()[Lio/rong/push/notification/PushNotificationMessage$PushSourceType;

    move-result-object v3

    invoke-static {p0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result p0

    aget-object v3, v3, p0

    .line 15
    :cond_58
    invoke-static {v0, v2, v1, v3}, Lio/rong/push/RongPushClient;->recordNotificationEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/rong/push/notification/PushNotificationMessage$PushSourceType;)V
    :try_end_5b
    .catch Lorg/json/JSONException; {:try_start_11 .. :try_end_5b} :catch_5c

    goto :goto_60

    :catch_5c
    move-exception p0

    .line 16
    invoke-virtual {p0}, Lorg/json/JSONException;->printStackTrace()V

    :cond_60
    :goto_60
    return-void
.end method

.method public static recordNotificationEvent(Lio/rong/push/notification/PushNotificationMessage;)V
    .registers 4

    .line 9
    invoke-virtual {p0}, Lio/rong/push/notification/PushNotificationMessage;->getPushId()Ljava/lang/String;

    move-result-object v0

    invoke-virtual {p0}, Lio/rong/push/notification/PushNotificationMessage;->getToId()Ljava/lang/String;

    move-result-object v1

    .line 10
    invoke-virtual {p0}, Lio/rong/push/notification/PushNotificationMessage;->getObjectName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {p0}, Lio/rong/push/notification/PushNotificationMessage;->getSourceType()Lio/rong/push/notification/PushNotificationMessage$PushSourceType;

    move-result-object p0

    .line 11
    invoke-static {v0, v1, v2, p0}, Lio/rong/push/RongPushClient;->recordNotificationEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/rong/push/notification/PushNotificationMessage$PushSourceType;)V

    return-void
.end method

.method public static recordNotificationEvent(Ljava/lang/String;)V
    .registers 4
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 1
    new-instance v0, Ljava/util/HashMap;

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

    if-eqz p0, :cond_38

    const-string v1, ""

    .line 2
    invoke-virtual {p0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_10

    goto :goto_38

    .line 3
    :cond_10
    invoke-static {}, Lio/rong/imlib/statistics/Statistics;->sharedInstance()Lio/rong/imlib/statistics/Statistics;

    move-result-object v1

    invoke-virtual {v1}, Lio/rong/imlib/statistics/Statistics;->isInitialized()Z

    move-result v1

    if-nez v1, :cond_22

    .line 4
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string v0, "Statistics should be initialized firstly!"

    invoke-static {p0, v0}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    .line 5
    :cond_22
    sget-object v1, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string v2, "recordNotificationEvent"

    invoke-static {v1, v2}, Lio/rong/push/common/RLog;->i(Ljava/lang/String;Ljava/lang/String;)V

    const-string v1, "id"

    .line 6
    invoke-interface {v0, v1, p0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 7
    invoke-static {}, Lio/rong/imlib/statistics/Statistics;->sharedInstance()Lio/rong/imlib/statistics/Statistics;

    move-result-object p0

    const-string v1, "pushEvent"

    invoke-virtual {p0, v1, v0}, Lio/rong/imlib/statistics/Statistics;->recordEvent(Ljava/lang/String;Ljava/util/Map;)V

    return-void

    .line 8
    :cond_38
    :goto_38
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string v0, "pushId can\'t be null!"

    invoke-static {p0, v0}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    return-void
.end method

.method private static recordNotificationEvent(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Lio/rong/push/notification/PushNotificationMessage$PushSourceType;)V
    .registers 7

    .line 12
    new-instance v0, Ljava/util/HashMap;

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

    .line 13
    invoke-static {}, Lio/rong/imlib/statistics/Statistics;->sharedInstance()Lio/rong/imlib/statistics/Statistics;

    move-result-object v1

    invoke-virtual {v1}, Lio/rong/imlib/statistics/Statistics;->isInitialized()Z

    move-result v1

    if-nez v1, :cond_17

    .line 14
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string p1, "Statistics should be initialized firstly!"

    invoke-static {p0, p1}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    .line 15
    :cond_17
    sget-object v1, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string v2, "recordNotificationEvent"

    invoke-static {v1, v2}, Lio/rong/push/common/RLog;->i(Ljava/lang/String;Ljava/lang/String;)V

    const-string v1, "id"

    .line 16
    invoke-interface {v0, v1, p0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const-string p0, "osName"

    const-string v1, "Android"

    .line 17
    invoke-interface {v0, p0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const/4 p0, 0x2

    .line 18
    new-array p0, p0, [Ljava/lang/Object;

    const/4 v1, 0x0

    sget-object v2, Landroid/os/Build;->MANUFACTURER:Ljava/lang/String;

    aput-object v2, p0, v1

    const/4 v1, 0x1

    sget-object v2, Landroid/os/Build;->MODEL:Ljava/lang/String;

    aput-object v2, p0, v1

    const-string v1, "%s|%s"

    invoke-static {v1, p0}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p0

    const-string v1, "osVersion"

    .line 19
    invoke-interface {v0, v1, p0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    const-string p0, "sdkVersion"

    const-string v1, "4.1.0"

    .line 20
    invoke-interface {v0, p0, v1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

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

    move-result p0

    if-eqz p0, :cond_51

    const-string p2, "unKnow"

    :cond_51
    const-string p0, "objectName"

    .line 22
    invoke-interface {v0, p0, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

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

    move-result p0

    if-eqz p0, :cond_5e

    const-string p1, "push_targetId"

    :cond_5e
    const-string p0, "userId"

    .line 24
    invoke-interface {v0, p0, p1}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 25
    invoke-virtual {p3}, Ljava/lang/Enum;->ordinal()I

    move-result p0

    invoke-static {p0}, Ljava/lang/Integer;->toString(I)Ljava/lang/String;

    move-result-object p0

    const-string p1, "sourceType"

    invoke-interface {v0, p1, p0}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    .line 26
    invoke-static {}, Lio/rong/imlib/statistics/Statistics;->sharedInstance()Lio/rong/imlib/statistics/Statistics;

    move-result-object p0

    const-string p1, "pushEvent"

    invoke-virtual {p0, p1, v0}, Lio/rong/imlib/statistics/Statistics;->recordEvent(Ljava/lang/String;Ljava/util/Map;)V

    return-void
.end method

.method public static redirected(Landroid/content/Context;)V
    .registers 3

    .line 1
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getConfigPushType(Landroid/content/Context;)Lio/rong/push/PushType;

    move-result-object v0

    invoke-virtual {v0}, Lio/rong/push/PushType;->getName()Ljava/lang/String;

    move-result-object v0

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

    move-result v0

    if-eqz v0, :cond_21

    .line 3
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lio/rong/push/rongpush/PushService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "io.rong.push.intent.action.REDIRECT"

    .line 4
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 5
    invoke-static {p0, v0}, Lio/rong/push/rongpush/PushService;->enqueueWork(Landroid/content/Context;Landroid/content/Intent;)V

    :cond_21
    return-void
.end method

.method public static registerFCM(Landroid/content/Context;)V
    .registers 2
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 1
    sget-object p0, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    sget-object v0, Lio/rong/push/PushType;->GOOGLE_FCM:Lio/rong/push/PushType;

    invoke-virtual {p0, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    return-void
.end method

.method public static registerGCM(Landroid/content/Context;)V
    .registers 2
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 1
    sget-object p0, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    sget-object v0, Lio/rong/push/PushType;->GOOGLE_GCM:Lio/rong/push/PushType;

    invoke-virtual {p0, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    return-void
.end method

.method public static registerHWPush(Landroid/content/Context;)V
    .registers 2
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 1
    sget-object p0, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    sget-object v0, Lio/rong/push/PushType;->HUAWEI:Lio/rong/push/PushType;

    invoke-virtual {p0, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    return-void
.end method

.method public static registerMZPush(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .registers 4
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

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

    move-result p0

    if-nez p0, :cond_18

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

    move-result p0

    if-nez p0, :cond_18

    .line 2
    sget-object p0, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    sget-object v0, Lio/rong/push/PushType;->MEIZU:Lio/rong/push/PushType;

    invoke-virtual {p0, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    .line 3
    sput-object p1, Lio/rong/push/RongPushClient;->mzAppId:Ljava/lang/String;

    .line 4
    sput-object p2, Lio/rong/push/RongPushClient;->mzAppKey:Ljava/lang/String;

    return-void

    .line 5
    :cond_18
    new-instance p0, Ljava/lang/IllegalArgumentException;

    const-string p1, "Failed registerMZPush. appKey or appId can\'t be empty."

    invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p0
.end method

.method public static registerMiPush(Landroid/content/Context;Ljava/lang/String;Ljava/lang/String;)V
    .registers 3
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

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

    move-result p0

    if-nez p0, :cond_18

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

    move-result p0

    if-nez p0, :cond_18

    .line 2
    sput-object p1, Lio/rong/push/RongPushClient;->miAppId:Ljava/lang/String;

    .line 3
    sput-object p2, Lio/rong/push/RongPushClient;->miAppKey:Ljava/lang/String;

    .line 4
    sget-object p0, Lio/rong/push/RongPushClient;->registeredType:Ljava/util/ArrayList;

    sget-object p1, Lio/rong/push/PushType;->XIAOMI:Lio/rong/push/PushType;

    invoke-virtual {p0, p1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    return-void

    .line 5
    :cond_18
    new-instance p0, Ljava/lang/IllegalArgumentException;

    const-string p1, "Failed registerMiPush. miAppId or miAppKey can\'t be empty."

    invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V

    throw p0
.end method

.method public static resolveHMSCoreUpdate(Landroid/app/Activity;)V
    .registers 4
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation

    if-eqz p0, :cond_59

    .line 1
    invoke-static {}, Lio/rong/push/PushManager;->getInstance()Lio/rong/push/PushManager;

    move-result-object v0

    invoke-virtual {v0}, Lio/rong/push/PushManager;->getServerPushType()Lio/rong/push/PushType;

    move-result-object v0

    .line 2
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v1

    invoke-virtual {v1, p0}, Lio/rong/push/common/PushCacheHelper;->isConfigDone(Landroid/content/Context;)Z

    move-result v1

    if-nez v1, :cond_42

    if-eqz v0, :cond_42

    invoke-virtual {v0}, Lio/rong/push/PushType;->getName()Ljava/lang/String;

    move-result-object v1

    sget-object v2, Lio/rong/push/PushType;->HUAWEI:Lio/rong/push/PushType;

    invoke-virtual {v2}, Lio/rong/push/PushType;->getName()Ljava/lang/String;

    move-result-object v2

    invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v1

    if-eqz v1, :cond_42

    .line 3
    sget-object v0, Lio/rong/push/PushType;->HUAWEI:Lio/rong/push/PushType;

    invoke-static {v0}, Lio/rong/push/pushconfig/PushFactory;->getPushProcessorByType(Lio/rong/push/PushType;)Lio/rong/push/platform/IPush;

    move-result-object v0

    if-eqz v0, :cond_3a

    .line 4
    invoke-static {}, Lio/rong/push/PushManager;->getInstance()Lio/rong/push/PushManager;

    move-result-object v1

    invoke-virtual {v1}, Lio/rong/push/PushManager;->getPushConfig()Lio/rong/push/pushconfig/PushConfig;

    move-result-object v1

    invoke-interface {v0, p0, v1}, Lio/rong/push/platform/IPush;->register(Landroid/content/Context;Lio/rong/push/pushconfig/PushConfig;)V

    goto :goto_58

    .line 5
    :cond_3a
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string v0, "no register HWPush"

    invoke-static {p0, v0}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_58

    .line 6
    :cond_42
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    new-instance v1, Ljava/lang/StringBuilder;

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

    const-string v2, "current pushType is "

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

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

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

    move-result-object v0

    invoke-static {p0, v0}, Lio/rong/push/common/RLog;->i(Ljava/lang/String;Ljava/lang/String;)V

    :goto_58
    return-void

    .line 7
    :cond_59
    new-instance p0, Ljava/lang/IllegalStateException;

    const-string v0, "resolve HWPush Error activity is null !"

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

    throw p0
.end method

.method public static resolveHWPushError(Landroid/app/Activity;J)V
    .registers 3
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/IllegalStateException;
        }
    .end annotation

    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    if-eqz p0, :cond_3

    return-void

    .line 1
    :cond_3
    new-instance p0, Ljava/lang/IllegalStateException;

    const-string p1, "resolve HWPush Error activity is null !"

    invoke-direct {p0, p1}, Ljava/lang/IllegalStateException;-><init>(Ljava/lang/String;)V

    throw p0
.end method

.method public static sendNotification(Landroid/content/Context;Lio/rong/push/notification/PushNotificationMessage;)V
    .registers 5

    .line 1
    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v0

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

    move-result v1

    if-eqz v1, :cond_12

    .line 3
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string p1, "package name can\'t empty!"

    invoke-static {p0, p1}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    :cond_12
    if-nez p1, :cond_1c

    .line 4
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string p1, "notificationMessage  can\'t be  null!"

    invoke-static {p0, p1}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    .line 5
    :cond_1c
    new-instance v1, Landroid/content/Intent;

    invoke-direct {v1}, Landroid/content/Intent;-><init>()V

    const-string v2, "io.rong.push.intent.MESSAGE_ARRIVED"

    .line 6
    invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 7
    invoke-virtual {v1, v0}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 8
    sget-object v0, Lio/rong/push/PushType;->RONG:Lio/rong/push/PushType;

    invoke-virtual {v0}, Lio/rong/push/PushType;->getName()Ljava/lang/String;

    move-result-object v0

    const-string v2, "pushType"

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v0, "message"

    .line 9
    invoke-virtual {v1, v0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    .line 10
    sget p1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 v0, 0xc

    if-lt p1, v0, :cond_44

    const/16 p1, 0x20

    .line 11
    invoke-virtual {v1, p1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 12
    :cond_44
    invoke-virtual {p0, v1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    return-void
.end method

.method public static sendNotification(Landroid/content/Context;Lio/rong/push/notification/PushNotificationMessage;I)V
    .registers 6

    .line 13
    invoke-virtual {p0}, Landroid/content/Context;->getPackageName()Ljava/lang/String;

    move-result-object v0

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

    move-result v1

    if-eqz v1, :cond_12

    .line 15
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string p1, "package name can\'t empty!"

    invoke-static {p0, p1}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    :cond_12
    if-nez p1, :cond_1c

    .line 16
    sget-object p0, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    const-string p1, "notificationMessage  can\'t be  null!"

    invoke-static {p0, p1}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    return-void

    .line 17
    :cond_1c
    new-instance v1, Landroid/content/Intent;

    invoke-direct {v1}, Landroid/content/Intent;-><init>()V

    const-string v2, "io.rong.push.intent.MESSAGE_ARRIVED"

    .line 18
    invoke-virtual {v1, v2}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 19
    invoke-virtual {v1, v0}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent;

    .line 20
    sget-object v0, Lio/rong/push/PushType;->RONG:Lio/rong/push/PushType;

    invoke-virtual {v0}, Lio/rong/push/PushType;->getName()Ljava/lang/String;

    move-result-object v0

    const-string v2, "pushType"

    invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    const-string v0, "message"

    .line 21
    invoke-virtual {v1, v0, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;

    const-string p1, "left"

    .line 22
    invoke-virtual {v1, p1, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 23
    sget p1, Landroid/os/Build$VERSION;->SDK_INT:I

    const/16 p2, 0xc

    if-lt p1, p2, :cond_49

    const/16 p1, 0x20

    .line 24
    invoke-virtual {v1, p1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 25
    :cond_49
    invoke-virtual {p0, v1}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    return-void
.end method

.method public static sendPushPing(Landroid/content/Context;)V
    .registers 3

    .line 1
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lio/rong/push/rongpush/PushService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "io.rong.push.intent.action.CUSTOM_HEART_BEAT"

    .line 2
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 3
    invoke-static {p0, v0}, Lio/rong/push/rongpush/PushService;->enqueueWork(Landroid/content/Context;Landroid/content/Intent;)V

    return-void
.end method

.method public static setNotifiationSound(Landroid/net/Uri;)V
    .registers 1

    .line 1
    invoke-static {p0}, Lio/rong/push/notification/RongNotificationInterface;->setNotificationSound(Landroid/net/Uri;)V

    return-void
.end method

.method public static setPushConfig(Lio/rong/push/pushconfig/PushConfig;)V
    .registers 1

    .line 1
    sput-object p0, Lio/rong/push/RongPushClient;->pushConfig:Lio/rong/push/pushconfig/PushConfig;

    return-void
.end method

.method public static stopRongPush(Landroid/content/Context;)V
    .registers 3
    .annotation runtime Ljava/lang/Deprecated;
    .end annotation

    .line 1
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lio/rong/push/rongpush/PushService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "io.rong.push.intent.action.STOP_PUSH"

    .line 2
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 3
    invoke-static {p0, v0}, Lio/rong/push/rongpush/PushService;->enqueueWork(Landroid/content/Context;Landroid/content/Intent;)V

    return-void
.end method

.method public static stopService(Landroid/content/Context;)V
    .registers 5

    .line 1
    :try_start_0
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getConfigPushType(Landroid/content/Context;)Lio/rong/push/PushType;

    move-result-object v0

    sget-object v1, Lio/rong/push/PushType;->HUAWEI:Lio/rong/push/PushType;

    invoke-virtual {v0, v1}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_11

    goto :goto_43

    .line 2
    :cond_11
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getConfigPushType(Landroid/content/Context;)Lio/rong/push/PushType;

    move-result-object v0

    sget-object v1, Lio/rong/push/PushType;->XIAOMI:Lio/rong/push/PushType;

    invoke-virtual {v0, v1}, Ljava/lang/Enum;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_43

    .line 3
    invoke-static {p0}, Lcom/xiaomi/mipush/sdk/MiPushClient;->unregisterPush(Landroid/content/Context;)V
    :try_end_24
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_24} :catch_25

    goto :goto_43

    :catch_25
    move-exception v0

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

    .line 5
    sget-object v1, Lio/rong/push/RongPushClient;->TAG:Ljava/lang/String;

    new-instance v2, Ljava/lang/StringBuilder;

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

    const-string v3, "stopService throw exception: "

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

    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;

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

    move-result-object v0

    invoke-static {v1, v0}, Lio/rong/push/common/RLog;->e(Ljava/lang/String;Ljava/lang/String;)V

    .line 6
    :cond_43
    :goto_43
    new-instance v0, Landroid/content/ComponentName;

    const-class v1, Lio/rong/push/rongpush/PushReceiver;

    invoke-direct {v0, p0, v1}, Landroid/content/ComponentName;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 7
    invoke-virtual {p0}, Landroid/content/Context;->getPackageManager()Landroid/content/pm/PackageManager;

    move-result-object v1

    const/4 v2, 0x2

    const/4 v3, 0x1

    invoke-virtual {v1, v0, v2, v3}, Landroid/content/pm/PackageManager;->setComponentEnabledSetting(Landroid/content/ComponentName;II)V

    .line 8
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lio/rong/push/rongpush/PushService;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    const-string v1, "io.rong.push.intent.action.UNINIT"

    .line 9
    invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;

    .line 10
    invoke-static {p0, v0}, Lio/rong/push/rongpush/PushService;->enqueueWork(Landroid/content/Context;Landroid/content/Intent;)V

    return-void
.end method

.method public static updatePushContentShowStatus(Landroid/content/Context;Z)V
    .registers 3

    .line 1
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0}, Lio/rong/push/common/PushCacheHelper;->getPushContentShowStatus(Landroid/content/Context;)Z

    move-result v0

    xor-int/2addr v0, p1

    if-eqz v0, :cond_12

    .line 2
    invoke-static {}, Lio/rong/push/common/PushCacheHelper;->getInstance()Lio/rong/push/common/PushCacheHelper;

    move-result-object v0

    invoke-virtual {v0, p0, p1}, Lio/rong/push/common/PushCacheHelper;->setPushContentShowStatus(Landroid/content/Context;Z)V

    :cond_12
    return-void
.end method