394 lines
9.2 KiB
Smali
394 lines
9.2 KiB
Smali
.class public Lcom/igexin/push/util/q;
|
|
.super Ljava/lang/Object;
|
|
|
|
|
|
# direct methods
|
|
.method public static a(Landroid/content/Context;Landroid/content/Intent;)V
|
|
.locals 3
|
|
|
|
:try_start_0
|
|
const-string v0, "us"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const-string v0, "us"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {}, Lcom/igexin/sdk/GTServiceManager;->getInstance()Lcom/igexin/sdk/GTServiceManager;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p0}, Lcom/igexin/sdk/GTServiceManager;->getUserPushService(Landroid/content/Context;)Ljava/lang/Class;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_1
|
|
|
|
sget-object v2, Lcom/igexin/push/core/a;->n:Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "us"
|
|
|
|
const-string v1, ""
|
|
|
|
invoke-static {p0, v0, v1}, Lcom/igexin/push/util/q;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const-string v1, "us"
|
|
|
|
invoke-static {p0, v1, v0}, Lcom/igexin/push/util/q;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const-string v0, "uis"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
invoke-static {}, Lcom/igexin/sdk/GTServiceManager;->getInstance()Lcom/igexin/sdk/GTServiceManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Lcom/igexin/sdk/GTServiceManager;->getUserIntentService(Landroid/content/Context;)Ljava/lang/Class;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "uis"
|
|
|
|
invoke-virtual {p1, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_3
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Class;->getName()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_4
|
|
|
|
:cond_2
|
|
const-string v0, "uis"
|
|
|
|
:goto_1
|
|
invoke-static {p0, v0, v1}, Lcom/igexin/push/util/q;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
goto :goto_2
|
|
|
|
:cond_3
|
|
if-eqz v0, :cond_4
|
|
|
|
const-string v0, "uis"
|
|
|
|
const-string v1, ""
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
:goto_2
|
|
const-string v0, "ua"
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Intent;->hasExtra(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
invoke-static {}, Lcom/igexin/sdk/GTServiceManager;->getInstance()Lcom/igexin/sdk/GTServiceManager;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p0}, Lcom/igexin/sdk/GTServiceManager;->getUserActivtiy(Landroid/content/Context;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "ua"
|
|
|
|
invoke-virtual {p1, v1}, Landroid/content/Intent;->getStringExtra(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_6
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
invoke-virtual {p1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_7
|
|
|
|
:cond_5
|
|
const-string v0, "ua"
|
|
|
|
invoke-static {p0, v0, p1}, Lcom/igexin/push/util/q;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)V
|
|
|
|
goto :goto_3
|
|
|
|
:cond_6
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_7
|
|
|
|
const-string p1, "ua"
|
|
|
|
const-string v0, ""
|
|
|
|
invoke-static {p0, p1, v0}, Lcom/igexin/push/util/q;->a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Throwable; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
:catch_0
|
|
:cond_7
|
|
:goto_3
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)V
|
|
.locals 2
|
|
|
|
const-string v0, "getui_sp"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-interface {p0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;
|
|
|
|
move-result-object p0
|
|
|
|
instance-of v0, p2, Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast p2, Ljava/lang/String;
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putString(Ljava/lang/String;Ljava/lang/String;)Landroid/content/SharedPreferences$Editor;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
instance-of v0, p2, Ljava/lang/Integer;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
check-cast p2, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
instance-of v0, p2, Ljava/lang/Boolean;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
check-cast p2, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putBoolean(Ljava/lang/String;Z)Landroid/content/SharedPreferences$Editor;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
instance-of v0, p2, Ljava/lang/Float;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
check-cast p2, Ljava/lang/Float;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Float;->floatValue()F
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences$Editor;->putFloat(Ljava/lang/String;F)Landroid/content/SharedPreferences$Editor;
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
instance-of v0, p2, Ljava/lang/Long;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
check-cast p2, Ljava/lang/Long;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-interface {p0, p1, v0, v1}, Landroid/content/SharedPreferences$Editor;->putLong(Ljava/lang/String;J)Landroid/content/SharedPreferences$Editor;
|
|
|
|
:cond_4
|
|
:goto_0
|
|
invoke-interface {p0}, Landroid/content/SharedPreferences$Editor;->commit()Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static b(Landroid/content/Context;Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;
|
|
.locals 2
|
|
|
|
const-string v0, "getui_sp"
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p0, v0, v1}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p0
|
|
|
|
instance-of v0, p2, Ljava/lang/String;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
check-cast p2, Ljava/lang/String;
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
instance-of v0, p2, Ljava/lang/Integer;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
check-cast p2, Ljava/lang/Integer;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences;->getInt(Ljava/lang/String;I)I
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_1
|
|
instance-of v0, p2, Ljava/lang/Boolean;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
check-cast p2, Ljava/lang/Boolean;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_2
|
|
instance-of v0, p2, Ljava/lang/Float;
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
check-cast p2, Ljava/lang/Float;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Float;->floatValue()F
|
|
|
|
move-result p2
|
|
|
|
invoke-interface {p0, p1, p2}, Landroid/content/SharedPreferences;->getFloat(Ljava/lang/String;F)F
|
|
|
|
move-result p0
|
|
|
|
invoke-static {p0}, Ljava/lang/Float;->valueOf(F)Ljava/lang/Float;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_3
|
|
instance-of v0, p2, Ljava/lang/Long;
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
check-cast p2, Ljava/lang/Long;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/Long;->longValue()J
|
|
|
|
move-result-wide v0
|
|
|
|
invoke-interface {p0, p1, v0, v1}, Landroid/content/SharedPreferences;->getLong(Ljava/lang/String;J)J
|
|
|
|
move-result-wide p0
|
|
|
|
invoke-static {p0, p1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_4
|
|
return-object p2
|
|
.end method
|