1219 lines
25 KiB
Smali
1219 lines
25 KiB
Smali
.class public final enum Lcom/moji/preferences/units/UNIT_SPEED;
|
|
.super Ljava/lang/Enum;
|
|
.source "UNIT_SPEED.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Ljava/lang/Enum<",
|
|
"Lcom/moji/preferences/units/UNIT_SPEED;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# static fields
|
|
.field private static final synthetic $VALUES:[Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.field public static final enum BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.field public static final enum DESCRIP_HK:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.field public static final enum KILOMETERS_PER_HOUR:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.field public static final enum KNOT:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.field public static final enum METERS_PER_SECOND:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.field public static final enum MILES_PER_HOUR:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.field private static mContext:Landroid/content/Context;
|
|
|
|
|
|
# instance fields
|
|
.field private mHttpTag:Ljava/lang/String;
|
|
|
|
.field private mNameId:I
|
|
|
|
.field private mUnitSymbolId:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 13
|
|
|
|
.line 12
|
|
new-instance v6, Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const-string v1, "BEAUFORT_SCALE"
|
|
|
|
sget v3, Lcom/moji/mjcore/R$string;->units_speed_beau:I
|
|
|
|
sget v4, Lcom/moji/mjcore/R$string;->units_speed_beau_symbol:I
|
|
|
|
const-string v5, "beau"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
move-object v0, v6
|
|
|
|
invoke-direct/range {v0 .. v5}, Lcom/moji/preferences/units/UNIT_SPEED;-><init>(Ljava/lang/String;IIILjava/lang/String;)V
|
|
|
|
sput-object v6, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.line 13
|
|
new-instance v0, Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const-string v8, "KILOMETERS_PER_HOUR"
|
|
|
|
sget v10, Lcom/moji/mjcore/R$string;->units_speed_km:I
|
|
|
|
sget v11, Lcom/moji/mjcore/R$string;->units_speed_km_symbol:I
|
|
|
|
const-string v12, "kmh"
|
|
|
|
const/4 v9, 0x1
|
|
|
|
move-object v7, v0
|
|
|
|
invoke-direct/range {v7 .. v12}, Lcom/moji/preferences/units/UNIT_SPEED;-><init>(Ljava/lang/String;IIILjava/lang/String;)V
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->KILOMETERS_PER_HOUR:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.line 14
|
|
new-instance v0, Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const-string v2, "MILES_PER_HOUR"
|
|
|
|
sget v4, Lcom/moji/mjcore/R$string;->units_speed_mile:I
|
|
|
|
sget v5, Lcom/moji/mjcore/R$string;->units_speed_mile_symbol:I
|
|
|
|
const-string v6, "mph"
|
|
|
|
const/4 v3, 0x2
|
|
|
|
move-object v1, v0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/moji/preferences/units/UNIT_SPEED;-><init>(Ljava/lang/String;IIILjava/lang/String;)V
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->MILES_PER_HOUR:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.line 15
|
|
new-instance v0, Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const-string v8, "METERS_PER_SECOND"
|
|
|
|
sget v10, Lcom/moji/mjcore/R$string;->units_speed_meter:I
|
|
|
|
sget v11, Lcom/moji/mjcore/R$string;->units_speed_meter_symbol:I
|
|
|
|
const-string v12, "ms"
|
|
|
|
const/4 v9, 0x3
|
|
|
|
move-object v7, v0
|
|
|
|
invoke-direct/range {v7 .. v12}, Lcom/moji/preferences/units/UNIT_SPEED;-><init>(Ljava/lang/String;IIILjava/lang/String;)V
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->METERS_PER_SECOND:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.line 16
|
|
new-instance v0, Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const-string v2, "KNOT"
|
|
|
|
sget v4, Lcom/moji/mjcore/R$string;->units_speed_kt:I
|
|
|
|
sget v5, Lcom/moji/mjcore/R$string;->units_speed_kt_symbol:I
|
|
|
|
const-string v6, "knot"
|
|
|
|
const/4 v3, 0x4
|
|
|
|
move-object v1, v0
|
|
|
|
invoke-direct/range {v1 .. v6}, Lcom/moji/preferences/units/UNIT_SPEED;-><init>(Ljava/lang/String;IIILjava/lang/String;)V
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->KNOT:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.line 17
|
|
new-instance v0, Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const-string v8, "DESCRIP_HK"
|
|
|
|
sget v10, Lcom/moji/mjcore/R$string;->units_speed_hk:I
|
|
|
|
sget v11, Lcom/moji/mjcore/R$string;->units_speed_hk_symbol:I
|
|
|
|
const-string v12, "hk"
|
|
|
|
const/4 v9, 0x5
|
|
|
|
move-object v7, v0
|
|
|
|
invoke-direct/range {v7 .. v12}, Lcom/moji/preferences/units/UNIT_SPEED;-><init>(Ljava/lang/String;IIILjava/lang/String;)V
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->DESCRIP_HK:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const/4 v0, 0x6
|
|
|
|
.line 11
|
|
new-array v0, v0, [Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED;->KILOMETERS_PER_HOUR:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED;->MILES_PER_HOUR:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED;->METERS_PER_SECOND:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED;->KNOT:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const/4 v2, 0x4
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED;->DESCRIP_HK:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
const/4 v2, 0x5
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->$VALUES:[Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
.line 23
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
sput-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->mContext:Landroid/content/Context;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private constructor <init>(Ljava/lang/String;IIILjava/lang/String;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(II",
|
|
"Ljava/lang/String;",
|
|
")V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 25
|
|
invoke-direct {p0, p1, p2}, Ljava/lang/Enum;-><init>(Ljava/lang/String;I)V
|
|
|
|
.line 26
|
|
iput p3, p0, Lcom/moji/preferences/units/UNIT_SPEED;->mNameId:I
|
|
|
|
.line 27
|
|
iput p4, p0, Lcom/moji/preferences/units/UNIT_SPEED;->mUnitSymbolId:I
|
|
|
|
.line 28
|
|
iput-object p5, p0, Lcom/moji/preferences/units/UNIT_SPEED;->mHttpTag:Ljava/lang/String;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static containsName(Ljava/lang/String;)Z
|
|
.locals 5
|
|
|
|
.line 63
|
|
invoke-static {}, Lcom/moji/preferences/units/UNIT_SPEED;->values()[Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
move-result-object v0
|
|
|
|
array-length v1, v0
|
|
|
|
const/4 v2, 0x0
|
|
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
if-ge v3, v1, :cond_1
|
|
|
|
aget-object v4, v0, v3
|
|
|
|
.line 64
|
|
invoke-virtual {v4}, Lcom/moji/preferences/units/UNIT_SPEED;->name()Ljava/lang/String;
|
|
|
|
move-result-object v4
|
|
|
|
invoke-virtual {v4, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v4
|
|
|
|
if-eqz v4, :cond_0
|
|
|
|
const/4 p0, 0x1
|
|
|
|
return p0
|
|
|
|
:cond_0
|
|
add-int/lit8 v3, v3, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return v2
|
|
.end method
|
|
|
|
.method public static getCurSpeedStrFromMeterPerSecond(DZ)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 186
|
|
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;->g()Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 188
|
|
invoke-static {p0, p1}, Ljava/lang/String;->valueOf(D)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
const-string v1, ""
|
|
|
|
if-eqz p2, :cond_1
|
|
|
|
.line 193
|
|
invoke-virtual {v0}, Lcom/moji/preferences/units/UNIT_SPEED;->getSymbol()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
.line 196
|
|
:cond_1
|
|
invoke-static {p0, p1}, Lcom/moji/preferences/units/UNIT_SPEED;->getCurSpeedValFromMeterPerSecond(D)D
|
|
|
|
move-result-wide p0
|
|
|
|
.line 197
|
|
sget-object p2, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
if-ne v0, p2, :cond_2
|
|
|
|
.line 198
|
|
new-instance p2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-static {p0, p1}, Ljava/lang/Math;->round(D)J
|
|
|
|
move-result-wide p0
|
|
|
|
invoke-virtual {p2, p0, p1}, Ljava/lang/StringBuilder;->append(J)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p2}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
.line 199
|
|
:cond_2
|
|
sget-object p2, Lcom/moji/preferences/units/UNIT_SPEED;->DESCRIP_HK:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
if-ne v0, p2, :cond_3
|
|
|
|
.line 200
|
|
sget-object p2, Lcom/moji/preferences/units/UNIT_SPEED;->mContext:Landroid/content/Context;
|
|
|
|
invoke-virtual {p2}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p2
|
|
|
|
sget v0, Lcom/moji/mjcore/R$array;->units_hk_description:I
|
|
|
|
invoke-virtual {p2, v0}, Landroid/content/res/Resources;->getStringArray(I)[Ljava/lang/String;
|
|
|
|
move-result-object p2
|
|
|
|
.line 201
|
|
invoke-static {p0, p1}, Ljava/lang/Math;->round(D)J
|
|
|
|
move-result-wide p0
|
|
|
|
long-to-int p0, p0
|
|
|
|
aget-object p0, p2, p0
|
|
|
|
return-object p0
|
|
|
|
.line 203
|
|
:cond_3
|
|
new-instance p2, Ljava/text/DecimalFormat;
|
|
|
|
const-string v0, "###0.0"
|
|
|
|
invoke-direct {p2, v0}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 204
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p2, p0, p1}, Ljava/text/DecimalFormat;->format(D)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static getCurSpeedValFromMeterPerSecond(D)D
|
|
.locals 11
|
|
|
|
.line 89
|
|
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;->g()Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
move-result-object v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
return-wide p0
|
|
|
|
.line 94
|
|
:cond_0
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED$1;->b:[I
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/units/UNIT_SPEED;->ordinal()I
|
|
|
|
move-result v0
|
|
|
|
aget v0, v1, v0
|
|
|
|
const/4 v1, 0x2
|
|
|
|
const/4 v2, 0x1
|
|
|
|
const-wide v3, 0x40ac200000000000L # 3600.0
|
|
|
|
const-wide v5, 0x400cccccc0000000L # 3.5999999046325684
|
|
|
|
const/high16 v7, 0x41200000 # 10.0f
|
|
|
|
const-wide/high16 v8, 0x4024000000000000L # 10.0
|
|
|
|
const/4 v10, 0x0
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:pswitch_0
|
|
mul-double p0, p0, v5
|
|
|
|
.line 157
|
|
invoke-static {p0, p1}, Ljava/lang/Math;->round(D)J
|
|
|
|
move-result-wide p0
|
|
|
|
const-wide/16 v3, 0x2
|
|
|
|
cmp-long v0, p0, v3
|
|
|
|
if-gez v0, :cond_2
|
|
|
|
:cond_1
|
|
const/4 v1, 0x0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
const-wide/16 v5, 0xd
|
|
|
|
cmp-long v0, p0, v3
|
|
|
|
if-ltz v0, :cond_3
|
|
|
|
cmp-long v0, p0, v5
|
|
|
|
if-gez v0, :cond_3
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_3
|
|
const-wide/16 v2, 0x1f
|
|
|
|
cmp-long v0, p0, v5
|
|
|
|
if-ltz v0, :cond_4
|
|
|
|
cmp-long v0, p0, v2
|
|
|
|
if-gez v0, :cond_4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_4
|
|
const-wide/16 v0, 0x29
|
|
|
|
cmp-long v4, p0, v2
|
|
|
|
if-ltz v4, :cond_5
|
|
|
|
cmp-long v2, p0, v0
|
|
|
|
if-gez v2, :cond_5
|
|
|
|
const/4 v1, 0x3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_5
|
|
cmp-long v2, p0, v0
|
|
|
|
if-ltz v2, :cond_6
|
|
|
|
const-wide/16 v0, 0x3f
|
|
|
|
cmp-long v2, p0, v0
|
|
|
|
if-gez v2, :cond_6
|
|
|
|
const/4 v1, 0x4
|
|
|
|
goto :goto_0
|
|
|
|
:cond_6
|
|
const-wide/16 v0, 0x3f
|
|
|
|
cmp-long v2, p0, v0
|
|
|
|
if-ltz v2, :cond_7
|
|
|
|
const-wide/16 v0, 0x58
|
|
|
|
cmp-long v2, p0, v0
|
|
|
|
if-gez v2, :cond_7
|
|
|
|
const/4 v1, 0x5
|
|
|
|
goto :goto_0
|
|
|
|
:cond_7
|
|
const-wide/16 v0, 0x58
|
|
|
|
cmp-long v2, p0, v0
|
|
|
|
if-ltz v2, :cond_8
|
|
|
|
const-wide/16 v0, 0x76
|
|
|
|
cmp-long v2, p0, v0
|
|
|
|
if-gez v2, :cond_8
|
|
|
|
const/4 v1, 0x6
|
|
|
|
goto :goto_0
|
|
|
|
:cond_8
|
|
const-wide/16 v0, 0x76
|
|
|
|
cmp-long v2, p0, v0
|
|
|
|
if-ltz v2, :cond_1
|
|
|
|
const/4 v1, 0x7
|
|
|
|
:goto_0
|
|
int-to-double p0, v1
|
|
|
|
goto/16 :goto_2
|
|
|
|
:pswitch_1
|
|
mul-double p0, p0, v3
|
|
|
|
const-wide v0, 0x409cf00000000000L # 1852.0
|
|
|
|
div-double/2addr p0, v0
|
|
|
|
mul-double p0, p0, v8
|
|
|
|
.line 152
|
|
invoke-static {p0, p1}, Ljava/lang/Math;->round(D)J
|
|
|
|
move-result-wide p0
|
|
|
|
long-to-float p0, p0
|
|
|
|
div-float/2addr p0, v7
|
|
|
|
float-to-double p0, p0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:pswitch_2
|
|
mul-double p0, p0, v8
|
|
|
|
.line 147
|
|
invoke-static {p0, p1}, Ljava/lang/Math;->round(D)J
|
|
|
|
move-result-wide p0
|
|
|
|
long-to-float p0, p0
|
|
|
|
div-float/2addr p0, v7
|
|
|
|
float-to-double p0, p0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:pswitch_3
|
|
mul-double p0, p0, v3
|
|
|
|
const-wide v0, 0x4099256040000000L # 1609.343994140625
|
|
|
|
div-double/2addr p0, v0
|
|
|
|
mul-double p0, p0, v8
|
|
|
|
.line 143
|
|
invoke-static {p0, p1}, Ljava/lang/Math;->round(D)J
|
|
|
|
move-result-wide p0
|
|
|
|
long-to-float p0, p0
|
|
|
|
div-float/2addr p0, v7
|
|
|
|
float-to-double p0, p0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:pswitch_4
|
|
mul-double p0, p0, v5
|
|
|
|
mul-double p0, p0, v8
|
|
|
|
.line 138
|
|
invoke-static {p0, p1}, Ljava/lang/Math;->round(D)J
|
|
|
|
move-result-wide p0
|
|
|
|
long-to-float p0, p0
|
|
|
|
div-float/2addr p0, v7
|
|
|
|
float-to-double p0, p0
|
|
|
|
goto/16 :goto_2
|
|
|
|
:pswitch_5
|
|
const-wide v3, 0x3fd3333340000000L # 0.30000001192092896
|
|
|
|
cmpg-double v0, p0, v3
|
|
|
|
if-gez v0, :cond_a
|
|
|
|
:cond_9
|
|
const/4 v1, 0x0
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_a
|
|
const-wide v5, 0x3ff99999a0000000L # 1.600000023841858
|
|
|
|
cmpl-double v0, p0, v3
|
|
|
|
if-ltz v0, :cond_b
|
|
|
|
cmpg-double v0, p0, v5
|
|
|
|
if-gez v0, :cond_b
|
|
|
|
const/4 v1, 0x1
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_b
|
|
const-wide v2, 0x400b333340000000L # 3.4000000953674316
|
|
|
|
cmpl-double v0, p0, v5
|
|
|
|
if-ltz v0, :cond_c
|
|
|
|
cmpg-double v0, p0, v2
|
|
|
|
if-gez v0, :cond_c
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_c
|
|
const-wide/high16 v0, 0x4016000000000000L # 5.5
|
|
|
|
cmpl-double v4, p0, v2
|
|
|
|
if-ltz v4, :cond_d
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_d
|
|
|
|
const/4 v1, 0x3
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_d
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_e
|
|
|
|
const-wide/high16 v0, 0x4020000000000000L # 8.0
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_e
|
|
|
|
const/4 v1, 0x4
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_e
|
|
const-wide/high16 v0, 0x4020000000000000L # 8.0
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_f
|
|
|
|
const-wide v0, 0x40259999a0000000L # 10.800000190734863
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_f
|
|
|
|
const/4 v1, 0x5
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_f
|
|
const-wide v0, 0x40259999a0000000L # 10.800000190734863
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_10
|
|
|
|
const-wide v0, 0x402bccccc0000000L # 13.899999618530273
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_10
|
|
|
|
const/4 v1, 0x6
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_10
|
|
const-wide v0, 0x402bccccc0000000L # 13.899999618530273
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_11
|
|
|
|
const-wide v0, 0x4031333340000000L # 17.200000762939453
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_11
|
|
|
|
const/4 v1, 0x7
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_11
|
|
const-wide v0, 0x4031333340000000L # 17.200000762939453
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_12
|
|
|
|
const-wide v0, 0x4034ccccc0000000L # 20.799999237060547
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_12
|
|
|
|
const/16 v1, 0x8
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_12
|
|
const-wide v0, 0x4034ccccc0000000L # 20.799999237060547
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_13
|
|
|
|
const-wide v0, 0x4038800000000000L # 24.5
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_13
|
|
|
|
const/16 v1, 0x9
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_13
|
|
const-wide v0, 0x4038800000000000L # 24.5
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_14
|
|
|
|
const-wide v0, 0x403c800000000000L # 28.5
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_14
|
|
|
|
const/16 v1, 0xa
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_14
|
|
const-wide v0, 0x403c800000000000L # 28.5
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_15
|
|
|
|
const-wide v0, 0x40405999a0000000L # 32.70000076293945
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_15
|
|
|
|
const/16 v1, 0xb
|
|
|
|
goto/16 :goto_1
|
|
|
|
:cond_15
|
|
const-wide v0, 0x40405999a0000000L # 32.70000076293945
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_16
|
|
|
|
const-wide v0, 0x4042800000000000L # 37.0
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_16
|
|
|
|
const/16 v1, 0xc
|
|
|
|
goto :goto_1
|
|
|
|
:cond_16
|
|
const-wide v0, 0x4042800000000000L # 37.0
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_17
|
|
|
|
const-wide v0, 0x4044c00000000000L # 41.5
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_17
|
|
|
|
const/16 v1, 0xd
|
|
|
|
goto :goto_1
|
|
|
|
:cond_17
|
|
const-wide v0, 0x4044c00000000000L # 41.5
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_18
|
|
|
|
const-wide v0, 0x40471999a0000000L # 46.20000076293945
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_18
|
|
|
|
const/16 v1, 0xe
|
|
|
|
goto :goto_1
|
|
|
|
:cond_18
|
|
const-wide v0, 0x40471999a0000000L # 46.20000076293945
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_19
|
|
|
|
const-wide v0, 0x4049800000000000L # 51.0
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_19
|
|
|
|
const/16 v1, 0xf
|
|
|
|
goto :goto_1
|
|
|
|
:cond_19
|
|
const-wide v0, 0x4049800000000000L # 51.0
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_1a
|
|
|
|
const-wide v0, 0x404c0cccc0000000L # 56.099998474121094
|
|
|
|
cmpg-double v2, p0, v0
|
|
|
|
if-gez v2, :cond_1a
|
|
|
|
const/16 v1, 0x10
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1a
|
|
const-wide v0, 0x404c0cccc0000000L # 56.099998474121094
|
|
|
|
cmpl-double v2, p0, v0
|
|
|
|
if-ltz v2, :cond_9
|
|
|
|
const/16 v1, 0x11
|
|
|
|
:goto_1
|
|
int-to-double p0, v1
|
|
|
|
:goto_2
|
|
return-wide p0
|
|
|
|
nop
|
|
|
|
: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 getCurrentUnitSpeedSymbol()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 85
|
|
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;->g()Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/units/UNIT_SPEED;->getSymbol()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static getUnitSpeedByCurrentLanguage()Lcom/moji/preferences/units/UNIT_SPEED;
|
|
.locals 2
|
|
|
|
.line 72
|
|
sget-object v0, Lcom/moji/preferences/units/UNIT_SPEED$1;->a:[I
|
|
|
|
invoke-static {}, Lcom/moji/preferences/units/SettingCenter;->a()Lcom/moji/preferences/units/SettingCenter;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/moji/preferences/units/SettingCenter;->b()Lcom/moji/preferences/units/ELanguage;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v1}, Lcom/moji/preferences/units/ELanguage;->ordinal()I
|
|
|
|
move-result v1
|
|
|
|
aget v0, v0, v1
|
|
|
|
packed-switch v0, :pswitch_data_0
|
|
|
|
.line 80
|
|
sget-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
return-object v0
|
|
|
|
.line 78
|
|
:pswitch_0
|
|
sget-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->METERS_PER_SECOND:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
return-object v0
|
|
|
|
.line 76
|
|
:pswitch_1
|
|
sget-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->DESCRIP_HK:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
return-object v0
|
|
|
|
.line 74
|
|
:pswitch_2
|
|
sget-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
return-object v0
|
|
|
|
nop
|
|
|
|
:pswitch_data_0
|
|
.packed-switch 0x1
|
|
:pswitch_2
|
|
:pswitch_1
|
|
:pswitch_0
|
|
.end packed-switch
|
|
.end method
|
|
|
|
.method public static getWindDescription(Ljava/lang/String;D)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 54
|
|
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;->g()Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
move-result-object v0
|
|
|
|
sget-object v1, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
.line 55
|
|
invoke-static {p0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
const-string v0, "null"
|
|
|
|
invoke-virtual {v0, p0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_0
|
|
|
|
.line 56
|
|
new-instance p1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {p1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
sget-object p0, Lcom/moji/preferences/units/UNIT_SPEED;->BEAUFORT_SCALE:Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
invoke-virtual {p0}, Lcom/moji/preferences/units/UNIT_SPEED;->getSymbol()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p1, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {p1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
const/4 p0, 0x1
|
|
|
|
.line 59
|
|
invoke-static {p1, p2, p0}, Lcom/moji/preferences/units/UNIT_SPEED;->getCurSpeedStrFromMeterPerSecond(DZ)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method private isNull(Ljava/lang/String;)Z
|
|
.locals 1
|
|
|
|
.line 209
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v0
|
|
|
|
if-nez v0, :cond_1
|
|
|
|
const-string v0, "null"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
const/4 p1, 0x0
|
|
|
|
goto :goto_1
|
|
|
|
:cond_1
|
|
:goto_0
|
|
const/4 p1, 0x1
|
|
|
|
:goto_1
|
|
return p1
|
|
.end method
|
|
|
|
.method public static valueOf(Ljava/lang/String;)Lcom/moji/preferences/units/UNIT_SPEED;
|
|
.locals 1
|
|
|
|
.line 11
|
|
const-class v0, Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
invoke-static {v0, p0}, Ljava/lang/Enum;->valueOf(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
|
|
|
|
move-result-object p0
|
|
|
|
check-cast p0, Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static values()[Lcom/moji/preferences/units/UNIT_SPEED;
|
|
.locals 1
|
|
|
|
.line 11
|
|
sget-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->$VALUES:[Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
invoke-virtual {v0}, [Lcom/moji/preferences/units/UNIT_SPEED;->clone()Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, [Lcom/moji/preferences/units/UNIT_SPEED;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public getHttpTag()Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 50
|
|
iget-object v0, p0, Lcom/moji/preferences/units/UNIT_SPEED;->mHttpTag:Ljava/lang/String;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public getName(Landroid/content/Context;)Ljava/lang/String;
|
|
.locals 1
|
|
|
|
.line 41
|
|
invoke-virtual {p1}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object p1
|
|
|
|
iget v0, p0, Lcom/moji/preferences/units/UNIT_SPEED;->mNameId:I
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 42
|
|
invoke-direct {p0, p1}, Lcom/moji/preferences/units/UNIT_SPEED;->isNull(Ljava/lang/String;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
const-string p1, ""
|
|
|
|
return-object p1
|
|
|
|
:cond_0
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public getSymbol()Ljava/lang/String;
|
|
.locals 2
|
|
|
|
.line 32
|
|
sget-object v0, Lcom/moji/preferences/units/UNIT_SPEED;->mContext:Landroid/content/Context;
|
|
|
|
invoke-virtual {v0}, Landroid/content/Context;->getResources()Landroid/content/res/Resources;
|
|
|
|
move-result-object v0
|
|
|
|
iget v1, p0, Lcom/moji/preferences/units/UNIT_SPEED;->mUnitSymbolId:I
|
|
|
|
invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getString(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 33
|
|
invoke-direct {p0, v0}, Lcom/moji/preferences/units/UNIT_SPEED;->isNull(Ljava/lang/String;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
const-string v0, ""
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|