d.smali
.class public Lcom/cleanmaster/weather/data/d;
.super Ljava/lang/Object;
.source "WeatherUtils.java"
# static fields
.field public static a:Ljava/lang/String;
.field public static b:Ljava/lang/String;
.field public static c:Ljava/lang/String;
.field public static d:Ljava/lang/String;
# direct methods
.method static constructor <clinit>()V
.registers 1
.prologue
.line 30
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/ConflictCommons;->isCNVersion()Z
move-result v0
if-eqz v0, :cond_23
const-string v0, "https://weather.ksmobile.com/api/city/iplocate?"
:goto_8
sput-object v0, Lcom/cleanmaster/weather/data/d;->a:Ljava/lang/String;
.line 33
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/ConflictCommons;->isCNVersion()Z
move-result v0
if-eqz v0, :cond_26
const-string v0, "https://weather.ksmobile.com/api/forecasts?"
:goto_12
sput-object v0, Lcom/cleanmaster/weather/data/d;->b:Ljava/lang/String;
.line 36
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/ConflictCommons;->isCNVersion()Z
move-result v0
if-eqz v0, :cond_29
const-string v0, "https://weather.ksmobile.com/api/city/search?"
:goto_1c
sput-object v0, Lcom/cleanmaster/weather/data/d;->c:Ljava/lang/String;
.line 38
const-string v0, "http://w.cm.ksmobile.com/api/cm/cm?"
sput-object v0, Lcom/cleanmaster/weather/data/d;->d:Ljava/lang/String;
return-void
.line 30
:cond_23
const-string v0, "https://weather.ksmobile.net/api/city/iplocate?"
goto :goto_8
.line 33
:cond_26
const-string v0, "https://weather.ksmobile.net/api/forecasts?"
goto :goto_12
.line 36
:cond_29
const-string v0, "https://weather.ksmobile.net/api/city/search?"
goto :goto_1c
.end method
.method public static a(DDDD)D
.registers 20
.prologue
.line 57
invoke-static {p2, p3}, Ljava/lang/Math;->toRadians(D)D
move-result-wide v0
.line 58
invoke-static/range {p6 .. p7}, Ljava/lang/Math;->toRadians(D)D
move-result-wide v2
.line 59
invoke-static {p0, p1}, Ljava/lang/Math;->toRadians(D)D
move-result-wide v4
.line 60
invoke-static/range {p4 .. p5}, Ljava/lang/Math;->toRadians(D)D
move-result-wide v6
.line 61
sub-double v8, v0, v2
.line 62
sub-double/2addr v4, v6
.line 63
const-wide/high16 v6, 0x4000000000000000L # 2.0
const-wide/high16 v10, 0x4000000000000000L # 2.0
div-double/2addr v8, v10
invoke-static {v8, v9}, Ljava/lang/Math;->sin(D)D
move-result-wide v8
const-wide/high16 v10, 0x4000000000000000L # 2.0
invoke-static {v8, v9, v10, v11}, Ljava/lang/Math;->pow(DD)D
move-result-wide v8
invoke-static {v0, v1}, Ljava/lang/Math;->cos(D)D
move-result-wide v0
invoke-static {v2, v3}, Ljava/lang/Math;->cos(D)D
move-result-wide v2
mul-double/2addr v0, v2
const-wide/high16 v2, 0x4000000000000000L # 2.0
div-double v2, v4, v2
invoke-static {v2, v3}, Ljava/lang/Math;->sin(D)D
move-result-wide v2
const-wide/high16 v4, 0x4000000000000000L # 2.0
invoke-static {v2, v3, v4, v5}, Ljava/lang/Math;->pow(DD)D
move-result-wide v2
mul-double/2addr v0, v2
add-double/2addr v0, v8
invoke-static {v0, v1}, Ljava/lang/Math;->sqrt(D)D
move-result-wide v0
invoke-static {v0, v1}, Ljava/lang/Math;->asin(D)D
move-result-wide v0
mul-double/2addr v0, v6
.line 64
const-wide v2, 0x40b8ea23126e978dL # 6378.137
mul-double/2addr v0, v2
const-wide v2, 0x408f400000000000L # 1000.0
mul-double/2addr v0, v2
.line 65
return-wide v0
.end method
.method public static a(I)I
.registers 2
.prologue
const/4 v0, 0x0
.line 249
packed-switch p0, :pswitch_data_e
.line 261
:goto_4
:pswitch_4
return v0
.line 253
:pswitch_5
const/4 v0, 0x1
goto :goto_4
.line 255
:pswitch_7
const/4 v0, 0x2
goto :goto_4
.line 257
:pswitch_9
const/4 v0, 0x3
goto :goto_4
.line 259
:pswitch_b
const/4 v0, 0x4
goto :goto_4
.line 249
nop
:pswitch_data_e
.packed-switch 0x0
:pswitch_b
:pswitch_4
:pswitch_5
:pswitch_7
:pswitch_9
.end packed-switch
.end method
.method public static a()Ljava/lang/String;
.registers 3
.prologue
.line 69
const/4 v0, 0x1
invoke-static {v0}, Lcom/cleanmaster/weather/data/d;->a(Z)Ljava/lang/String;
move-result-object v0
.line 71
const-string v1, "ZH_CN"
invoke-virtual {v0}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_1f
const-string v1, "ZH_TW"
invoke-virtual {v0}, Ljava/lang/String;->toUpperCase()Ljava/lang/String;
move-result-object v2
invoke-virtual {v1, v2}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v1
if-nez v1, :cond_1f
.line 72
const-string v0, "EN_US"
.line 74
:cond_1f
return-object v0
.end method
.method public static a(Z)Ljava/lang/String;
.registers 4
.prologue
.line 94
const-string v0, ""
.line 95
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v1
invoke-static {v1}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v1
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v2
invoke-virtual {v1, v2}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getLanguageSelected(Landroid/content/Context;)Lcom/cm/plugincluster/cleanmaster/base/util/system/LanguageCountry;
move-result-object v1
.line 96
invoke-virtual {v1}, Lcom/cm/plugincluster/cleanmaster/base/util/system/LanguageCountry;->getLanguage()Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_1c
.line 97
invoke-virtual {v1}, Lcom/cm/plugincluster/cleanmaster/base/util/system/LanguageCountry;->getLanguage()Ljava/lang/String;
move-result-object v0
.line 99
:cond_1c
if-eqz p0, :cond_3f
invoke-virtual {v1}, Lcom/cm/plugincluster/cleanmaster/base/util/system/LanguageCountry;->getCountry()Ljava/lang/String;
move-result-object v2
if-eqz v2, :cond_3f
.line 100
new-instance v2, Ljava/lang/StringBuilder;
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
invoke-virtual {v2, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
const-string v2, "_"
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
move-result-object v0
invoke-virtual {v1}, Lcom/cm/plugincluster/cleanmaster/base/util/system/LanguageCountry;->getCountry()Ljava/lang/String;
move-result-object v1
invoke-virtual {v0, v1}, 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
.line 102
:cond_3f
return-object v0
.end method
.method public static b(I)I
.registers 2
.prologue
const/4 v0, 0x1
.line 266
packed-switch p0, :pswitch_data_e
.line 278
:goto_4
:pswitch_4
return v0
.line 270
:pswitch_5
const/4 v0, 0x2
goto :goto_4
.line 272
:pswitch_7
const/4 v0, 0x3
goto :goto_4
.line 274
:pswitch_9
const/4 v0, 0x4
goto :goto_4
.line 276
:pswitch_b
const/4 v0, 0x0
goto :goto_4
.line 266
nop
:pswitch_data_e
.packed-switch 0x0
:pswitch_4
:pswitch_5
:pswitch_7
:pswitch_9
:pswitch_b
.end packed-switch
.end method
.method public static b()Z
.registers 4
.prologue
const/4 v1, 0x1
const/4 v0, 0x0
.line 147
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v2
invoke-static {v2}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v2
invoke-virtual {v2}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getFloatWindowWeatherTemperatureIndex()I
move-result v2
.line 148
const/4 v3, -0x1
if-le v2, v3, :cond_14
.line 150
if-nez v2, :cond_2e
.line 171
:cond_13
:goto_13
return v0
.line 156
:cond_14
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v2
invoke-static {v2}, Lcom/utils/CommonUtils;->getMCC(Landroid/content/Context;)Ljava/lang/String;
move-result-object v2
.line 157
if-eqz v2, :cond_13
invoke-virtual {v2}, Ljava/lang/String;->length()I
move-result v3
if-lez v3, :cond_13
.line 158
const-string v3, "310,311,312,313,314,315,316,364,702,346,234,235,330,535,552"
.line 159
invoke-virtual {v3, v2}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
move-result v2
if-eqz v2, :cond_13
move v0, v1
.line 160
goto :goto_13
:cond_2e
move v0, v1
goto :goto_13
.end method
.method public static c()I
.registers 2
.prologue
.line 217
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getFloatWindowWeatherWindSpeedIndex()I
move-result v0
.line 218
const/4 v1, -0x1
if-le v0, v1, :cond_10
.line 245
:goto_f
return v0
.line 221
:cond_10
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/utils/CommonUtils;->getMCC(Landroid/content/Context;)Ljava/lang/String;
move-result-object v0
.line 224
:try_start_18
invoke-static {v0}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I
move-result v0
.line 225
invoke-static {v0}, Lcom/cm/f/a/a;->a(I)I
move-result v0
.line 227
invoke-static {v0}, Lcom/cleanmaster/weather/data/d;->a(I)I
:try_end_23
.catch Ljava/lang/Exception; {:try_start_18 .. :try_end_23} :catch_25
move-result v0
goto :goto_f
.line 228
:catch_25
move-exception v0
.line 245
const/4 v0, 0x0
goto :goto_f
.end method
.method public static d()J
.registers 3
.prologue
.line 295
const/16 v0, 0x3e8
.line 298
:try_start_2
const-string v1, "app_weather"
const-string v2, "app_weather_gps_non_request_range"
invoke-static {v1, v2, v0}, Lcom/cleanmaster/hpsharelib/cloudconfig/CloudCfgDataWrapper;->getCloudCfgIntValue(Ljava/lang/String;Ljava/lang/String;I)I
:try_end_9
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_9} :catch_c
move-result v0
int-to-long v0, v0
.line 302
:goto_b
return-wide v0
.line 299
:catch_c
move-exception v1
.line 302
int-to-long v0, v0
goto :goto_b
.end method
.method public static e()Ljava/lang/String;
.registers 2
.prologue
.line 444
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getCityCode()Ljava/lang/String;
move-result-object v0
.line 445
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_13
.line 448
:goto_12
return-object v0
:cond_13
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getCityCodeBy3G()Ljava/lang/String;
move-result-object v0
goto :goto_12
.end method
.method public static f()Ljava/lang/String;
.registers 2
.prologue
.line 452
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getCityName()Ljava/lang/String;
move-result-object v0
.line 453
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_13
.line 456
:goto_12
return-object v0
:cond_13
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getCityNameBy3G()Ljava/lang/String;
move-result-object v0
goto :goto_12
.end method
.method public static g()Ljava/lang/String;
.registers 1
.prologue
.line 467
const-string v0, ""
return-object v0
.end method
.method public static h()Z
.registers 2
.prologue
.line 512
invoke-static {}, Lcom/cleanmaster/weather/data/d;->e()Ljava/lang/String;
move-result-object v0
.line 513
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
move-result v1
if-nez v1, :cond_12
const-string v1, "null"
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
move-result v0
if-eqz v0, :cond_14
.line 514
:cond_12
const/4 v0, 0x1
.line 516
:goto_13
return v0
:cond_14
const/4 v0, 0x0
goto :goto_13
.end method
.method public static i()Z
.registers 1
.prologue
.line 542
invoke-static {}, Lcom/cleanmaster/weather/data/d;->l()Z
move-result v0
if-nez v0, :cond_8
const/4 v0, 0x0
:goto_7
return v0
:cond_8
const/4 v0, 0x1
goto :goto_7
.end method
.method public static j()Z
.registers 4
.prologue
.line 586
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
const-wide/16 v2, 0x0
invoke-virtual {v0, v2, v3}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getLastLocationUpdateTime(J)J
move-result-wide v0
.line 587
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
move-result-wide v2
.line 588
sub-long v0, v2, v0
const-wide/32 v2, 0x1499700
cmp-long v0, v0, v2
if-ltz v0, :cond_1d
const/4 v0, 0x1
:goto_1c
return v0
:cond_1d
const/4 v0, 0x0
goto :goto_1c
.end method
.method public static k()Z
.registers 1
.prologue
.line 722
invoke-static {}, Lcom/cleanmaster/hpsharelib/base/util/system/ConflictCommons;->isCNVersion()Z
move-result v0
if-eqz v0, :cond_16
invoke-static {}, Lcom/keniu/security/m;->d()Landroid/content/Context;
move-result-object v0
invoke-static {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getInstanse(Landroid/content/Context;)Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;
move-result-object v0
invoke-virtual {v0}, Lcom/cleanmaster/hpsharelib/configmanager/ServiceConfigManager;->getAllowPositioning()Z
move-result v0
if-eqz v0, :cond_16
const/4 v0, 0x1
:goto_15
return v0
:cond_16
const/4 v0, 0x0
goto :goto_15
.end method
.method private static l()Z
.registers 1
.prologue
.line 549
const/4 v0, 0x1
return v0
.end method