840 lines
21 KiB
Smali
840 lines
21 KiB
Smali
.class public Lcom/moji/preferences/units/SettingCenter;
|
|
.super Ljava/lang/Object;
|
|
.source "SettingCenter.java"
|
|
|
|
|
|
# static fields
|
|
.field static a:Landroid/content/SharedPreferences;
|
|
|
|
.field private static final b:Ljava/lang/Object;
|
|
|
|
.field private static c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
.field private static d:[Ljava/lang/String;
|
|
|
|
.field private static e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
|
|
# instance fields
|
|
.field private f:Ljava/lang/String;
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 1
|
|
|
|
.line 27
|
|
new-instance v0, Ljava/lang/Object;
|
|
|
|
invoke-direct {v0}, Ljava/lang/Object;-><init>()V
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/SettingCenter;->b:Ljava/lang/Object;
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 30
|
|
sput-object v0, Lcom/moji/preferences/units/SettingCenter;->d:[Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 40
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 38
|
|
iput-object v0, p0, Lcom/moji/preferences/units/SettingCenter;->f:Ljava/lang/String;
|
|
|
|
.line 41
|
|
new-instance v0, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {v0}, Lcom/moji/preferences/ProcessPrefer;-><init>()V
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
.line 42
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {v0}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/SettingCenter;->a:Landroid/content/SharedPreferences;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Landroid/content/Context;)V
|
|
.locals 1
|
|
|
|
.line 45
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
const/4 v0, 0x0
|
|
|
|
.line 38
|
|
iput-object v0, p0, Lcom/moji/preferences/units/SettingCenter;->f:Ljava/lang/String;
|
|
|
|
.line 46
|
|
new-instance v0, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {v0, p1}, Lcom/moji/preferences/ProcessPrefer;-><init>(Landroid/content/Context;)V
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
.line 47
|
|
invoke-static {p1}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object p1
|
|
|
|
sput-object p1, Lcom/moji/preferences/units/SettingCenter;->a:Landroid/content/SharedPreferences;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a()Lcom/moji/preferences/units/SettingCenter;
|
|
.locals 2
|
|
|
|
.line 51
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 52
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->b:Ljava/lang/Object;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 53
|
|
:try_start_0
|
|
sget-object v1, Lcom/moji/preferences/units/SettingCenter;->c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 54
|
|
new-instance v1, Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
invoke-direct {v1}, Lcom/moji/preferences/units/SettingCenter;-><init>()V
|
|
|
|
sput-object v1, Lcom/moji/preferences/units/SettingCenter;->c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
.line 56
|
|
:cond_0
|
|
monitor-exit v0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw v1
|
|
|
|
.line 58
|
|
:cond_1
|
|
:goto_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static a(Landroid/content/Context;)Lcom/moji/preferences/units/SettingCenter;
|
|
.locals 2
|
|
|
|
.line 62
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
.line 63
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->b:Ljava/lang/Object;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 64
|
|
:try_start_0
|
|
sget-object v1, Lcom/moji/preferences/units/SettingCenter;->c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 65
|
|
new-instance v1, Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
invoke-direct {v1, p0}, Lcom/moji/preferences/units/SettingCenter;-><init>(Landroid/content/Context;)V
|
|
|
|
sput-object v1, Lcom/moji/preferences/units/SettingCenter;->c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
.line 67
|
|
:cond_0
|
|
monitor-exit v0
|
|
|
|
goto :goto_0
|
|
|
|
:catchall_0
|
|
move-exception p0
|
|
|
|
monitor-exit v0
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
throw p0
|
|
|
|
.line 69
|
|
:cond_1
|
|
:goto_0
|
|
sget-object p0, Lcom/moji/preferences/units/SettingCenter;->c:Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private j()V
|
|
.locals 7
|
|
.annotation build Landroid/annotation/TargetApi;
|
|
value = 0x15
|
|
.end annotation
|
|
|
|
.line 165
|
|
invoke-static {}, Lcom/moji/preferences/units/ELanguage;->values()[Lcom/moji/preferences/units/ELanguage;
|
|
|
|
move-result-object v0
|
|
|
|
.line 166
|
|
array-length v1, v0
|
|
|
|
add-int/lit8 v1, v1, -0x1
|
|
|
|
new-array v1, v1, [Ljava/lang/String;
|
|
|
|
sput-object v1, Lcom/moji/preferences/units/SettingCenter;->d:[Ljava/lang/String;
|
|
|
|
.line 168
|
|
array-length v1, v0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v2, v1, :cond_1
|
|
|
|
aget-object v4, v0, v2
|
|
|
|
.line 169
|
|
sget-object v5, Lcom/moji/preferences/units/ELanguage;->DEFAULT:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
if-ne v5, v4, :cond_0
|
|
|
|
goto :goto_1
|
|
|
|
.line 172
|
|
:cond_0
|
|
sget-object v5, Lcom/moji/preferences/units/SettingCenter;->d:[Ljava/lang/String;
|
|
|
|
add-int/lit8 v6, v3, 0x1
|
|
|
|
invoke-virtual {v4}, Lcom/moji/preferences/units/ELanguage;->getLocale()Ljava/util/Locale;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4}, Ljava/util/Locale;->toLanguageTag()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
aput-object v4, v5, v3
|
|
|
|
move v3, v6
|
|
|
|
:goto_1
|
|
add-int/lit8 v2, v2, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Ljava/lang/Boolean;)Lcom/moji/preferences/units/ELanguage;
|
|
.locals 1
|
|
|
|
.line 125
|
|
sget-object p1, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
sget-object v0, Lcom/moji/preferences/units/ELanguage;->DEFAULT:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/units/ELanguage;->name()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, v0}, Lcom/moji/preferences/ProcessPrefer;->j(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 126
|
|
invoke-static {p1}, Lcom/moji/preferences/units/ELanguage;->valueOf(Ljava/lang/String;)Lcom/moji/preferences/units/ELanguage;
|
|
|
|
move-result-object p1
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/preferences/units/ELanguage;)V
|
|
.locals 1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 75
|
|
sget-object p1, Lcom/moji/preferences/units/ELanguage;->DEFAULT:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
.line 77
|
|
:cond_0
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->b()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
.line 78
|
|
invoke-virtual {p1}, Lcom/moji/preferences/units/ELanguage;->name()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
iput-object v0, p0, Lcom/moji/preferences/units/SettingCenter;->f:Ljava/lang/String;
|
|
|
|
.line 80
|
|
:cond_1
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/preferences/units/ELanguage;->name()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/ProcessPrefer;->e(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/preferences/units/UNIT_PRESSURE;)V
|
|
.locals 1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 194
|
|
sget-object p1, Lcom/moji/preferences/units/UNIT_PRESSURE;->HECTOPASCAL:Lcom/moji/preferences/units/UNIT_PRESSURE;
|
|
|
|
.line 196
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/preferences/units/UNIT_PRESSURE;->name()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/ProcessPrefer;->h(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/preferences/units/UNIT_SPEED;)V
|
|
.locals 1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 209
|
|
sget-object p1, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.line 211
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/preferences/units/UNIT_SPEED;->name()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/ProcessPrefer;->i(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/preferences/units/UNIT_TEMP;)V
|
|
.locals 1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 179
|
|
sget-object p1, Lcom/moji/preferences/units/UNIT_TEMP;->CENTIGRADE:Lcom/moji/preferences/units/UNIT_TEMP;
|
|
|
|
.line 181
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/preferences/units/UNIT_TEMP;->name()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/ProcessPrefer;->g(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Lcom/moji/preferences/units/VOICE_LANGUAGE;)V
|
|
.locals 1
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 106
|
|
sget-object p1, Lcom/moji/preferences/units/VOICE_LANGUAGE;->DEFAULT_VOICE:Lcom/moji/preferences/units/VOICE_LANGUAGE;
|
|
|
|
.line 108
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {p1}, Lcom/moji/preferences/units/VOICE_LANGUAGE;->name()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/ProcessPrefer;->f(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public a(Z)V
|
|
.locals 1
|
|
|
|
.line 223
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/ProcessPrefer;->b(Z)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b()Lcom/moji/preferences/units/ELanguage;
|
|
.locals 2
|
|
|
|
.line 85
|
|
iget-object v0, p0, Lcom/moji/preferences/units/SettingCenter;->f:Ljava/lang/String;
|
|
|
|
.line 86
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 87
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/ELanguage;->DEFAULT:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/preferences/units/ELanguage;->name()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/preferences/ProcessPrefer;->j(Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 88
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->b()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 89
|
|
iput-object v0, p0, Lcom/moji/preferences/units/SettingCenter;->f:Ljava/lang/String;
|
|
|
|
.line 92
|
|
:cond_0
|
|
sget-object v1, Lcom/moji/preferences/units/ELanguage;->DEFAULT:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/preferences/units/ELanguage;->name()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_2
|
|
|
|
.line 93
|
|
invoke-virtual {p0}, Lcom/moji/preferences/units/SettingCenter;->d()Lcom/moji/preferences/units/ELanguage;
|
|
|
|
move-result-object v0
|
|
|
|
.line 94
|
|
sget-object v1, Lcom/moji/preferences/units/ELanguage;->DEFAULT:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
return-object v0
|
|
|
|
.line 97
|
|
:cond_1
|
|
sget-object v0, Lcom/moji/preferences/units/ELanguage;->CN:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
return-object v0
|
|
|
|
.line 100
|
|
:cond_2
|
|
invoke-static {v0}, Lcom/moji/preferences/units/ELanguage;->valueOf(Ljava/lang/String;)Lcom/moji/preferences/units/ELanguage;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public c()Lcom/moji/preferences/units/VOICE_LANGUAGE;
|
|
.locals 2
|
|
|
|
.line 113
|
|
new-instance v0, Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
invoke-direct {v0}, Lcom/moji/preferences/DefaultPrefer;-><init>()V
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/DefaultPrefer;->e()I
|
|
|
|
move-result v0
|
|
|
|
const/4 v1, 0x2
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const/16 v1, 0x8
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 118
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/preferences/units/VOICE_LANGUAGE;->CN:Lcom/moji/preferences/units/VOICE_LANGUAGE;
|
|
|
|
return-object v0
|
|
|
|
.line 115
|
|
:cond_1
|
|
:goto_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/ProcessPrefer;->m()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 116
|
|
invoke-static {v0}, Lcom/moji/preferences/units/VOICE_LANGUAGE;->valueOf(Ljava/lang/String;)Lcom/moji/preferences/units/VOICE_LANGUAGE;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public d()Lcom/moji/preferences/units/ELanguage;
|
|
.locals 3
|
|
|
|
.line 132
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
const/16 v1, 0x17
|
|
|
|
if-le v0, v1, :cond_1
|
|
|
|
.line 133
|
|
invoke-static {}, Lcom/moji/helper/ContextLanguageHelper;->a()Landroid/os/LocaleList;
|
|
|
|
move-result-object v0
|
|
|
|
.line 134
|
|
sget-object v1, Lcom/moji/preferences/units/SettingCenter;->d:[Ljava/lang/String;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 135
|
|
invoke-direct {p0}, Lcom/moji/preferences/units/SettingCenter;->j()V
|
|
|
|
.line 137
|
|
:cond_0
|
|
sget-object v1, Lcom/moji/preferences/units/SettingCenter;->d:[Ljava/lang/String;
|
|
|
|
invoke-virtual {v0, v1}, Landroid/os/LocaleList;->getFirstMatch([Ljava/lang/String;)Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v0, 0x0
|
|
|
|
:goto_0
|
|
if-nez v0, :cond_2
|
|
|
|
.line 141
|
|
invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;
|
|
|
|
move-result-object v0
|
|
|
|
.line 144
|
|
:cond_2
|
|
invoke-virtual {v0}, Ljava/util/Locale;->getLanguage()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->toUpperCase(Ljava/util/Locale;)Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
.line 145
|
|
invoke-virtual {v0}, Ljava/util/Locale;->getCountry()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v2, "zh"
|
|
|
|
.line 147
|
|
invoke-virtual {v2, v1}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_6
|
|
|
|
const-string v1, "HK"
|
|
|
|
.line 148
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_3
|
|
|
|
.line 149
|
|
sget-object v0, Lcom/moji/preferences/units/ELanguage;->HK:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const-string v1, "TW"
|
|
|
|
.line 150
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
.line 151
|
|
sget-object v0, Lcom/moji/preferences/units/ELanguage;->TW:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
goto :goto_1
|
|
|
|
:cond_4
|
|
const-string v1, "MO"
|
|
|
|
.line 152
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
.line 153
|
|
sget-object v0, Lcom/moji/preferences/units/ELanguage;->HK:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
goto :goto_1
|
|
|
|
.line 155
|
|
:cond_5
|
|
sget-object v0, Lcom/moji/preferences/units/ELanguage;->CN:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
goto :goto_1
|
|
|
|
.line 158
|
|
:cond_6
|
|
sget-object v0, Lcom/moji/preferences/units/ELanguage;->CN:Lcom/moji/preferences/units/ELanguage;
|
|
|
|
:goto_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public e()Lcom/moji/preferences/units/UNIT_TEMP;
|
|
.locals 2
|
|
|
|
.line 185
|
|
invoke-virtual {p0}, Lcom/moji/preferences/units/SettingCenter;->h()Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 186
|
|
invoke-static {}, Lcom/moji/preferences/units/UNIT_TEMP;->getUnitTempByCurrentLanguage()Lcom/moji/preferences/units/UNIT_TEMP;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 188
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_TEMP;->CENTIGRADE:Lcom/moji/preferences/units/UNIT_TEMP;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/preferences/units/UNIT_TEMP;->name()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/preferences/ProcessPrefer;->l(Ljava/lang/String;)Lcom/moji/preferences/units/UNIT_TEMP;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/units/UNIT_TEMP;->name()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 189
|
|
invoke-static {v0}, Lcom/moji/preferences/units/UNIT_TEMP;->valueOf(Ljava/lang/String;)Lcom/moji/preferences/units/UNIT_TEMP;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public f()Lcom/moji/preferences/units/UNIT_PRESSURE;
|
|
.locals 2
|
|
|
|
.line 200
|
|
invoke-virtual {p0}, Lcom/moji/preferences/units/SettingCenter;->h()Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 201
|
|
invoke-static {}, Lcom/moji/preferences/units/UNIT_PRESSURE;->getUnitPressureByCurrentLanguage()Lcom/moji/preferences/units/UNIT_PRESSURE;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 203
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_PRESSURE;->HECTOPASCAL:Lcom/moji/preferences/units/UNIT_PRESSURE;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/preferences/units/UNIT_PRESSURE;->name()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/preferences/ProcessPrefer;->m(Ljava/lang/String;)Lcom/moji/preferences/units/UNIT_PRESSURE;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/units/UNIT_PRESSURE;->name()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 204
|
|
invoke-static {v0}, Lcom/moji/preferences/units/UNIT_PRESSURE;->valueOf(Ljava/lang/String;)Lcom/moji/preferences/units/UNIT_PRESSURE;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public g()Lcom/moji/preferences/units/UNIT_SPEED;
|
|
.locals 2
|
|
|
|
.line 215
|
|
invoke-virtual {p0}, Lcom/moji/preferences/units/SettingCenter;->h()Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Boolean;->booleanValue()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 216
|
|
invoke-static {}, Lcom/moji/preferences/units/UNIT_SPEED;->getUnitSpeedByCurrentLanguage()Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
|
|
.line 218
|
|
:cond_0
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
invoke-virtual {v1}, Lcom/moji/preferences/units/UNIT_SPEED;->name()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/preferences/ProcessPrefer;->n(Ljava/lang/String;)Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/units/UNIT_SPEED;->name()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 219
|
|
invoke-static {v0}, Lcom/moji/preferences/units/UNIT_SPEED;->valueOf(Ljava/lang/String;)Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public h()Ljava/lang/Boolean;
|
|
.locals 1
|
|
|
|
.line 227
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->e:Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/ProcessPrefer;->q()Ljava/lang/Boolean;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public i()Z
|
|
.locals 3
|
|
|
|
.line 236
|
|
sget-object v0, Lcom/moji/preferences/units/SettingCenter;->a:Landroid/content/SharedPreferences;
|
|
|
|
const-string v1, "pref_key_mn_weather_alert"
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getBoolean(Ljava/lang/String;Z)Z
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|