104 lines
2.0 KiB
Smali
104 lines
2.0 KiB
Smali
.class public Lcom/moji/base/WeatherTemperature;
|
|
.super Ljava/lang/Object;
|
|
.source "WeatherTemperature.java"
|
|
|
|
|
|
# instance fields
|
|
.field private a:I
|
|
|
|
.field private b:I
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>(I)V
|
|
.locals 1
|
|
|
|
.line 15
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 16
|
|
iput p1, p0, Lcom/moji/base/WeatherTemperature;->a:I
|
|
|
|
.line 17
|
|
iget p1, p0, Lcom/moji/base/WeatherTemperature;->a:I
|
|
|
|
int-to-float p1, p1
|
|
|
|
const v0, 0x3fe66666 # 1.8f
|
|
|
|
mul-float p1, p1, v0
|
|
|
|
const/high16 v0, 0x42000000 # 32.0f
|
|
|
|
add-float/2addr p1, v0
|
|
|
|
invoke-static {p1}, Ljava/lang/Math;->round(F)I
|
|
|
|
move-result p1
|
|
|
|
iput p1, p0, Lcom/moji/base/WeatherTemperature;->b:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private b()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.line 45
|
|
new-instance v0, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {v0}, Lcom/moji/preferences/ProcessPrefer;-><init>()V
|
|
|
|
.line 46
|
|
sget-object v1, Lcom/moji/preferences/ProcessPrefer$KeyConstant;->KEY_UNIT_TEMPERATURE:Lcom/moji/preferences/ProcessPrefer$KeyConstant;
|
|
|
|
const-string v2, ""
|
|
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/preferences/ProcessPrefer;->a(Lcom/moji/tool/preferences/core/IPreferKey;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a()I
|
|
.locals 2
|
|
|
|
.line 21
|
|
invoke-direct {p0}, Lcom/moji/base/WeatherTemperature;->b()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 22
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_1
|
|
|
|
const-string v1, "CENTIGRADE"
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
goto :goto_0
|
|
|
|
.line 25
|
|
:cond_0
|
|
iget v0, p0, Lcom/moji/base/WeatherTemperature;->b:I
|
|
|
|
return v0
|
|
|
|
.line 23
|
|
:cond_1
|
|
:goto_0
|
|
iget v0, p0, Lcom/moji/base/WeatherTemperature;->a:I
|
|
|
|
return v0
|
|
.end method
|