663 lines
12 KiB
Smali
663 lines
12 KiB
Smali
.class public Lcom/moji/base/AqiValueProvider;
|
|
.super Ljava/lang/Object;
|
|
.source "AqiValueProvider.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 25
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(I)I
|
|
.locals 0
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
.line 50
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_main_other:I
|
|
|
|
return p0
|
|
|
|
.line 48
|
|
:pswitch_0
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_main_bad:I
|
|
|
|
return p0
|
|
|
|
.line 46
|
|
:pswitch_1
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_main_severe:I
|
|
|
|
return p0
|
|
|
|
.line 44
|
|
:pswitch_2
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_main_moderate:I
|
|
|
|
return p0
|
|
|
|
.line 42
|
|
:pswitch_3
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_main_mild:I
|
|
|
|
return p0
|
|
|
|
.line 40
|
|
:pswitch_4
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_main_good:I
|
|
|
|
return p0
|
|
|
|
.line 38
|
|
:pswitch_5
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_main_best:I
|
|
|
|
return p0
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static final a(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
const-string v0, "\u6c61\u67d3"
|
|
|
|
.line 297
|
|
invoke-virtual {p0, v0}, Ljava/lang/String;->contains(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string v0, "\u6c61\u67d3"
|
|
|
|
const-string v1, ""
|
|
|
|
.line 298
|
|
invoke-virtual {p0, v0, v1}, Ljava/lang/String;->replace(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a()Z
|
|
.locals 2
|
|
|
|
.line 88
|
|
invoke-static {}, Lcom/moji/preferences/units/SettingCenter;->a()Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/units/SettingCenter;->b()Lcom/moji/preferences/units/ELanguage;
|
|
|
|
move-result-object v0
|
|
|
|
.line 89
|
|
sget-object v1, Lcom/moji/preferences/units/ELanguage;->HK:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/ELanguage;->TW:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return v0
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 v0, 0x1
|
|
|
|
return v0
|
|
.end method
|
|
|
|
.method public static b(I)Ljava/lang/String;
|
|
.locals 9
|
|
|
|
.line 55
|
|
invoke-static {p0}, Lcom/moji/tool/DeviceTool;->f(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 56
|
|
invoke-static {}, Lcom/moji/base/AqiValueProvider;->a()Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
return-object v0
|
|
|
|
.line 60
|
|
:cond_0
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
.line 61
|
|
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v2
|
|
|
|
.line 62
|
|
invoke-virtual {v2}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
|
|
|
|
move-result-object v3
|
|
|
|
.line 63
|
|
iget-object v4, v3, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
.line 65
|
|
:try_start_0
|
|
new-instance v6, Ljava/util/Locale;
|
|
|
|
const-string v7, "zh"
|
|
|
|
const-string v8, "TW"
|
|
|
|
invoke-direct {v6, v7, v8}, Ljava/util/Locale;-><init>(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 66
|
|
sget v7, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v8, 0x11
|
|
|
|
if-lt v7, v8, :cond_1
|
|
|
|
.line 67
|
|
new-instance v7, Landroid/content/res/Configuration;
|
|
|
|
invoke-virtual {v1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-virtual {v8}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;
|
|
|
|
move-result-object v8
|
|
|
|
invoke-direct {v7, v8}, Landroid/content/res/Configuration;-><init>(Landroid/content/res/Configuration;)V
|
|
|
|
.line 68
|
|
invoke-virtual {v7, v6}, Landroid/content/res/Configuration;->setLocale(Ljava/util/Locale;)V
|
|
|
|
.line 69
|
|
invoke-virtual {v1, v7}, Landroid/content/Context;->createConfigurationContext(Landroid/content/res/Configuration;)Landroid/content/Context;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, p0}, Landroid/content/Context;->getText(I)Ljava/lang/CharSequence;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-interface {p0}, Ljava/lang/CharSequence;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
goto :goto_0
|
|
|
|
.line 71
|
|
:cond_1
|
|
iput-object v6, v3, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
|
|
|
|
.line 72
|
|
invoke-virtual {v2, v3, v5}, Landroid/content/res/Resources;->updateConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;)V
|
|
|
|
.line 74
|
|
invoke-virtual {v2, p0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
:goto_0
|
|
move-object v0, p0
|
|
|
|
goto :goto_1
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
goto :goto_2
|
|
|
|
:catch_0
|
|
:try_start_1
|
|
const-string p0, "getLocaleString"
|
|
|
|
const-string v1, "get string error"
|
|
|
|
.line 77
|
|
invoke-static {p0, v1}, Lcom/moji/tool/log/MJLogger;->e(Ljava/lang/String;Ljava/lang/String;)V
|
|
:try_end_1
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_0
|
|
|
|
.line 80
|
|
:goto_1
|
|
iput-object v4, v3, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
|
|
|
|
.line 81
|
|
invoke-virtual {v2, v3, v5}, Landroid/content/res/Resources;->updateConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;)V
|
|
|
|
return-object v0
|
|
|
|
.line 80
|
|
:goto_2
|
|
iput-object v4, v3, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;
|
|
|
|
.line 81
|
|
invoke-virtual {v2, v3, v5}, Landroid/content/res/Resources;->updateConfiguration(Landroid/content/res/Configuration;Landroid/util/DisplayMetrics;)V
|
|
|
|
.line 82
|
|
throw p0
|
|
.end method
|
|
|
|
.method public static c(I)I
|
|
.locals 0
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
.line 120
|
|
sget p0, Lcom/moji/base/R$drawable;->notif_level1:I
|
|
|
|
return p0
|
|
|
|
.line 118
|
|
:pswitch_0
|
|
sget p0, Lcom/moji/base/R$drawable;->notif_level7:I
|
|
|
|
return p0
|
|
|
|
.line 116
|
|
:pswitch_1
|
|
sget p0, Lcom/moji/base/R$drawable;->notif_level6:I
|
|
|
|
return p0
|
|
|
|
.line 114
|
|
:pswitch_2
|
|
sget p0, Lcom/moji/base/R$drawable;->notif_level5:I
|
|
|
|
return p0
|
|
|
|
.line 112
|
|
:pswitch_3
|
|
sget p0, Lcom/moji/base/R$drawable;->notif_level4:I
|
|
|
|
return p0
|
|
|
|
.line 110
|
|
:pswitch_4
|
|
sget p0, Lcom/moji/base/R$drawable;->notif_level3:I
|
|
|
|
return p0
|
|
|
|
.line 108
|
|
:pswitch_5
|
|
sget p0, Lcom/moji/base/R$drawable;->notif_level2:I
|
|
|
|
return p0
|
|
|
|
.line 106
|
|
:pswitch_6
|
|
sget p0, Lcom/moji/base/R$drawable;->notif_level1:I
|
|
|
|
return p0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_6
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static d(I)I
|
|
.locals 0
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
.line 141
|
|
sget p0, Lcom/moji/base/R$drawable;->simple_aqi_level_1_2:I
|
|
|
|
return p0
|
|
|
|
.line 139
|
|
:pswitch_0
|
|
sget p0, Lcom/moji/base/R$drawable;->simple_aqi_level_6:I
|
|
|
|
return p0
|
|
|
|
.line 137
|
|
:pswitch_1
|
|
sget p0, Lcom/moji/base/R$drawable;->simple_aqi_level_6:I
|
|
|
|
return p0
|
|
|
|
.line 135
|
|
:pswitch_2
|
|
sget p0, Lcom/moji/base/R$drawable;->simple_aqi_level_5:I
|
|
|
|
return p0
|
|
|
|
.line 133
|
|
:pswitch_3
|
|
sget p0, Lcom/moji/base/R$drawable;->simple_aqi_level_3_4:I
|
|
|
|
return p0
|
|
|
|
.line 131
|
|
:pswitch_4
|
|
sget p0, Lcom/moji/base/R$drawable;->simple_aqi_level_3_4:I
|
|
|
|
return p0
|
|
|
|
.line 129
|
|
:pswitch_5
|
|
sget p0, Lcom/moji/base/R$drawable;->simple_aqi_level_1_2:I
|
|
|
|
return p0
|
|
|
|
.line 127
|
|
:pswitch_6
|
|
sget p0, Lcom/moji/base/R$drawable;->simple_aqi_level_1_2:I
|
|
|
|
return p0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_6
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static e(I)I
|
|
.locals 0
|
|
.annotation build Landroid/support/annotation/ColorRes;
|
|
.end annotation
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
.line 167
|
|
sget p0, Lcom/moji/base/R$color;->aqi_main_other:I
|
|
|
|
return p0
|
|
|
|
.line 165
|
|
:pswitch_0
|
|
sget p0, Lcom/moji/base/R$color;->aqi_main_bad:I
|
|
|
|
return p0
|
|
|
|
.line 163
|
|
:pswitch_1
|
|
sget p0, Lcom/moji/base/R$color;->aqi_main_severe:I
|
|
|
|
return p0
|
|
|
|
.line 161
|
|
:pswitch_2
|
|
sget p0, Lcom/moji/base/R$color;->aqi_main_moderate:I
|
|
|
|
return p0
|
|
|
|
.line 159
|
|
:pswitch_3
|
|
sget p0, Lcom/moji/base/R$color;->aqi_main_mild:I
|
|
|
|
return p0
|
|
|
|
.line 157
|
|
:pswitch_4
|
|
sget p0, Lcom/moji/base/R$color;->aqi_main_good:I
|
|
|
|
return p0
|
|
|
|
.line 155
|
|
:pswitch_5
|
|
sget p0, Lcom/moji/base/R$color;->aqi_main_best:I
|
|
|
|
return p0
|
|
|
|
.line 153
|
|
:pswitch_6
|
|
sget p0, Lcom/moji/base/R$color;->aqi_main_invalid:I
|
|
|
|
return p0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_6
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static f(I)I
|
|
.locals 0
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
.line 193
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_bubble_invalid:I
|
|
|
|
return p0
|
|
|
|
.line 191
|
|
:pswitch_0
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_bubble_bad:I
|
|
|
|
return p0
|
|
|
|
.line 189
|
|
:pswitch_1
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_bubble_severe:I
|
|
|
|
return p0
|
|
|
|
.line 187
|
|
:pswitch_2
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_bubble_moderate:I
|
|
|
|
return p0
|
|
|
|
.line 185
|
|
:pswitch_3
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_bubble_mild:I
|
|
|
|
return p0
|
|
|
|
.line 183
|
|
:pswitch_4
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_bubble_good:I
|
|
|
|
return p0
|
|
|
|
.line 181
|
|
:pswitch_5
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_bubble_best:I
|
|
|
|
return p0
|
|
|
|
.line 179
|
|
:pswitch_6
|
|
sget p0, Lcom/moji/base/R$drawable;->aqi_bubble_invalid:I
|
|
|
|
return p0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x0
|
|
:pswitch_6
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static g(I)I
|
|
.locals 0
|
|
.annotation build Landroid/support/annotation/DrawableRes;
|
|
.end annotation
|
|
|
|
packed-switch p0, :pswitch_data_0
|
|
|
|
.line 232
|
|
sget p0, Lcom/moji/base/R$drawable;->bk_level_7:I
|
|
|
|
return p0
|
|
|
|
.line 230
|
|
:pswitch_0
|
|
sget p0, Lcom/moji/base/R$drawable;->bk_level_6:I
|
|
|
|
return p0
|
|
|
|
.line 228
|
|
:pswitch_1
|
|
sget p0, Lcom/moji/base/R$drawable;->bk_level_5:I
|
|
|
|
return p0
|
|
|
|
.line 226
|
|
:pswitch_2
|
|
sget p0, Lcom/moji/base/R$drawable;->bk_level_4:I
|
|
|
|
return p0
|
|
|
|
.line 224
|
|
:pswitch_3
|
|
sget p0, Lcom/moji/base/R$drawable;->bk_level_3:I
|
|
|
|
return p0
|
|
|
|
.line 222
|
|
:pswitch_4
|
|
sget p0, Lcom/moji/base/R$drawable;->bk_level_2:I
|
|
|
|
return p0
|
|
|
|
.line 220
|
|
:pswitch_5
|
|
sget p0, Lcom/moji/base/R$drawable;->bk_level_1:I
|
|
|
|
return p0
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_5
|
|
:pswitch_4
|
|
:pswitch_3
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static h(I)I
|
|
.locals 2
|
|
|
|
const/16 v0, 0x32
|
|
|
|
if-ltz p0, :cond_0
|
|
|
|
if-gt p0, v0, :cond_0
|
|
|
|
return v0
|
|
|
|
:cond_0
|
|
const/16 v1, 0x64
|
|
|
|
if-lt p0, v0, :cond_1
|
|
|
|
if-gt p0, v1, :cond_1
|
|
|
|
return v1
|
|
|
|
:cond_1
|
|
const/16 v0, 0xc8
|
|
|
|
if-lt p0, v1, :cond_2
|
|
|
|
if-gt p0, v0, :cond_2
|
|
|
|
return v0
|
|
|
|
:cond_2
|
|
const/16 v1, 0x12c
|
|
|
|
if-lt p0, v0, :cond_3
|
|
|
|
if-gt p0, v1, :cond_3
|
|
|
|
return v1
|
|
|
|
:cond_3
|
|
const/16 v0, 0x190
|
|
|
|
if-lt p0, v1, :cond_4
|
|
|
|
if-gt p0, v0, :cond_4
|
|
|
|
return v0
|
|
|
|
:cond_4
|
|
const/16 v1, 0x1f4
|
|
|
|
if-lt p0, v0, :cond_5
|
|
|
|
return v1
|
|
|
|
:cond_5
|
|
return v1
|
|
.end method
|