2267 lines
53 KiB
Smali
2267 lines
53 KiB
Smali
.class public abstract Lcom/moji/weatherprovider/update/BaseUpdater;
|
|
.super Ljava/lang/Object;
|
|
.source "BaseUpdater.java"
|
|
|
|
|
|
# static fields
|
|
.field protected static final c:[Ljava/lang/String;
|
|
|
|
.field protected static final d:I
|
|
|
|
|
|
# instance fields
|
|
.field protected a:Lcom/moji/weatherprovider/update/WeatherUpdateListener;
|
|
|
|
.field protected b:Lcom/moji/common/area/AreaInfo;
|
|
|
|
.field protected e:I
|
|
|
|
|
|
# direct methods
|
|
.method static constructor <clinit>()V
|
|
.locals 3
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 55
|
|
new-array v0, v0, [Ljava/lang/String;
|
|
|
|
const-string v1, "http://weather.api.moji.com/data/detail"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object v1, v0, v2
|
|
|
|
sput-object v0, Lcom/moji/weatherprovider/update/BaseUpdater;->c:[Ljava/lang/String;
|
|
|
|
.line 59
|
|
sget-object v0, Lcom/moji/weatherprovider/update/BaseUpdater;->c:[Ljava/lang/String;
|
|
|
|
array-length v0, v0
|
|
|
|
sput v0, Lcom/moji/weatherprovider/update/BaseUpdater;->d:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method constructor <init>(Lcom/moji/weatherprovider/update/WeatherUpdateListener;I)V
|
|
.locals 0
|
|
|
|
.line 62
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 63
|
|
iput-object p1, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->a:Lcom/moji/weatherprovider/update/WeatherUpdateListener;
|
|
|
|
.line 64
|
|
iput p2, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Lcom/moji/weatherprovider/data/Weather;I)V
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Throws;
|
|
value = {
|
|
Ljava/io/IOException;
|
|
}
|
|
.end annotation
|
|
|
|
.line 499
|
|
new-instance p1, Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
invoke-direct {p1}, Lcom/moji/preferences/DefaultPrefer;-><init>()V
|
|
|
|
.line 500
|
|
sget-object v0, Lcom/moji/preferences/DefaultPrefer$KeyConstant;->AVATAR_TYPE:Lcom/moji/preferences/DefaultPrefer$KeyConstant;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
invoke-virtual {p1, v0, v1}, Lcom/moji/preferences/DefaultPrefer;->a(Lcom/moji/tool/preferences/core/IPreferKey;I)I
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 501
|
|
invoke-virtual {p0, p2}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(I)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method private a(Ljava/lang/String;J)V
|
|
.locals 4
|
|
|
|
.line 265
|
|
new-instance v0, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {v0}, Lcom/moji/preferences/ProcessPrefer;-><init>()V
|
|
|
|
.line 266
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/ProcessPrefer;->o(Ljava/lang/String;)V
|
|
|
|
const-wide/16 v1, 0x3e8
|
|
|
|
.line 267
|
|
div-long/2addr p2, v1
|
|
|
|
invoke-virtual {v0, p2, p3}, Lcom/moji/preferences/ProcessPrefer;->c(J)V
|
|
|
|
.line 268
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object p2, Lcom/moji/statistics/EVENT_TAG;->COMMON_VALUE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
const-string p3, ""
|
|
|
|
const/4 v1, 0x5
|
|
|
|
new-array v1, v1, [Ljava/lang/Object;
|
|
|
|
.line 269
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->b()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
.line 270
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->c()I
|
|
|
|
move-result v2
|
|
|
|
invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v2
|
|
|
|
const/4 v3, 0x1
|
|
|
|
aput-object v2, v1, v3
|
|
|
|
.line 271
|
|
invoke-virtual {v0}, Lcom/moji/preferences/ProcessPrefer;->n()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v2, 0x2
|
|
|
|
aput-object v0, v1, v2
|
|
|
|
sget-object v0, Landroid/os/Build;->MODEL:Ljava/lang/String;
|
|
|
|
const/4 v2, 0x3
|
|
|
|
aput-object v0, v1, v2
|
|
|
|
sget v0, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
.line 273
|
|
invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
const/4 v2, 0x4
|
|
|
|
aput-object v0, v1, v2
|
|
|
|
.line 268
|
|
invoke-static {v1}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {p1, p2, p3, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lorg/json/JSONObject;)Lcom/moji/statistics/EventManager;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private b()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
.line 250
|
|
new-instance v0, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {v0}, Lcom/moji/preferences/ProcessPrefer;-><init>()V
|
|
|
|
.line 251
|
|
invoke-virtual {v0}, Lcom/moji/preferences/ProcessPrefer;->r()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 252
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
.line 253
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a()Landroid/content/Context;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "mojiWeatherInfo"
|
|
|
|
const/4 v2, 0x0
|
|
|
|
invoke-virtual {v0, v1, v2}, Landroid/content/Context;->getSharedPreferences(Ljava/lang/String;I)Landroid/content/SharedPreferences;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, "UserRegisterdCode"
|
|
|
|
const-string v2, ""
|
|
|
|
.line 254
|
|
invoke-interface {v0, v1, v2}, Landroid/content/SharedPreferences;->getString(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 255
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 256
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v1
|
|
|
|
invoke-direct {p0, v0, v1, v2}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Ljava/lang/String;J)V
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method private b(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;)V
|
|
.locals 3
|
|
|
|
.line 285
|
|
:try_start_0
|
|
invoke-virtual {p0, p1, p2}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;)V
|
|
|
|
.line 286
|
|
invoke-virtual {p2}, Lcom/moji/weatherprovider/update/Result;->a()Z
|
|
|
|
move-result v0
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
return-void
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
const-string v1, "BaseUpdater"
|
|
|
|
.line 290
|
|
invoke-static {v1, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
const/4 v0, 0x1
|
|
|
|
.line 291
|
|
iput v0, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
.line 293
|
|
:cond_0
|
|
iget v0, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
const/16 v1, 0x11
|
|
|
|
if-eq v0, v1, :cond_1
|
|
|
|
const-string v0, "BaseUpdater"
|
|
|
|
const-string v1, "updateWeather: try cdn"
|
|
|
|
.line 294
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 296
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object v0
|
|
|
|
new-instance v1, Lcom/moji/weatherprovider/event/UpdateCityStateEvent;
|
|
|
|
sget-object v2, Lcom/moji/weatherprovider/event/CITY_STATE;->RETRY:Lcom/moji/weatherprovider/event/CITY_STATE;
|
|
|
|
invoke-direct {v1, p1, v2}, Lcom/moji/weatherprovider/event/UpdateCityStateEvent;-><init>(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/event/CITY_STATE;)V
|
|
|
|
invoke-virtual {v0, v1}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 297
|
|
invoke-direct {p0, p1, p2}, Lcom/moji/weatherprovider/update/BaseUpdater;->c(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;)V
|
|
|
|
const-string p1, "BaseUpdater"
|
|
|
|
const-string p2, "updateWeather: cdn finish"
|
|
|
|
.line 298
|
|
invoke-static {p1, p2}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method private b(Ljava/lang/String;J)V
|
|
.locals 3
|
|
|
|
.line 278
|
|
new-instance v0, Lcom/moji/preferences/ProcessPrefer;
|
|
|
|
invoke-direct {v0}, Lcom/moji/preferences/ProcessPrefer;-><init>()V
|
|
|
|
.line 279
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/ProcessPrefer;->p(Ljava/lang/String;)V
|
|
|
|
const-wide/16 v1, 0x3e8
|
|
|
|
.line 280
|
|
div-long/2addr p2, v1
|
|
|
|
invoke-virtual {v0, p2, p3}, Lcom/moji/preferences/ProcessPrefer;->b(J)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private c(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;)V
|
|
.locals 2
|
|
|
|
.line 304
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v1, "http://cdn.moji.com/pb/"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {}, Lcom/moji/common/MJProperty;->g()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
const-string v1, "/"
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
iget p1, p1, Lcom/moji/common/area/AreaInfo;->cityId:I
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, "_"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-static {}, Lcom/moji/common/MJProperty;->n()I
|
|
|
|
move-result p1
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
const-string p1, ".xml"
|
|
|
|
invoke-virtual {v0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 305
|
|
new-instance v0, Lcom/moji/http/pb/CdnRequestV2;
|
|
|
|
invoke-direct {v0, p1}, Lcom/moji/http/pb/CdnRequestV2;-><init>(Ljava/lang/String;)V
|
|
|
|
.line 306
|
|
new-instance p1, Lcom/moji/weatherprovider/update/BaseUpdater$2;
|
|
|
|
invoke-direct {p1, p0, p2}, Lcom/moji/weatherprovider/update/BaseUpdater$2;-><init>(Lcom/moji/weatherprovider/update/BaseUpdater;Lcom/moji/weatherprovider/update/Result;)V
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/http/pb/CdnRequestV2;->b(Lcom/moji/requestcore/MJBaseHttpCallback;)Ljava/lang/Object;
|
|
|
|
move-result-object p1
|
|
|
|
check-cast p1, Ljava/io/InputStream;
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 330
|
|
iget p1, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
const/16 v0, 0x10
|
|
|
|
if-eq p1, v0, :cond_0
|
|
|
|
iget p1, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
const/16 v0, 0xc
|
|
|
|
if-eq p1, v0, :cond_0
|
|
|
|
const/16 p1, 0xf
|
|
|
|
.line 331
|
|
iput p1, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
:cond_0
|
|
return-void
|
|
|
|
.line 335
|
|
:cond_1
|
|
invoke-virtual {p0, p1, p2}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Ljava/io/InputStream;Lcom/moji/weatherprovider/update/Result;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method protected a(Lcom/moji/common/area/AreaInfo;I)Lcom/moji/http/pb/Weather2Request;
|
|
.locals 3
|
|
|
|
.line 529
|
|
new-instance v0, Lcom/moji/http/pb/Weather2Request;
|
|
|
|
sget-object v1, Lcom/moji/weatherprovider/update/BaseUpdater;->c:[Ljava/lang/String;
|
|
|
|
aget-object p2, v1, p2
|
|
|
|
const/4 v1, 0x1
|
|
|
|
new-array v1, v1, [Lcom/moji/common/area/AreaInfo;
|
|
|
|
const/4 v2, 0x0
|
|
|
|
aput-object p1, v1, v2
|
|
|
|
invoke-direct {v0, p2, v1}, Lcom/moji/http/pb/Weather2Request;-><init>(Ljava/lang/String;[Lcom/moji/common/area/AreaInfo;)V
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/update/Result;
|
|
.locals 3
|
|
|
|
const-string v0, "tonglei"
|
|
|
|
.line 73
|
|
new-instance v1, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "update: "
|
|
|
|
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-static {v0, v1}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 74
|
|
new-instance v0, Lcom/moji/weatherprovider/update/Result;
|
|
|
|
invoke-direct {v0}, Lcom/moji/weatherprovider/update/Result;-><init>()V
|
|
|
|
.line 76
|
|
:try_start_0
|
|
invoke-direct {p0, p1, v0}, Lcom/moji/weatherprovider/update/BaseUpdater;->b(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v1
|
|
|
|
const-string v2, "BaseUpdater"
|
|
|
|
.line 78
|
|
invoke-static {v2, v1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
const/4 v1, 0x1
|
|
|
|
.line 79
|
|
iput v1, v0, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
.line 81
|
|
:goto_0
|
|
iget-boolean p1, p1, Lcom/moji/common/area/AreaInfo;->isLocation:Z
|
|
|
|
if-nez p1, :cond_1
|
|
|
|
.line 82
|
|
invoke-virtual {v0}, Lcom/moji/weatherprovider/update/Result;->a()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
.line 83
|
|
invoke-virtual {p0}, Lcom/moji/weatherprovider/update/BaseUpdater;->a()V
|
|
|
|
goto :goto_1
|
|
|
|
.line 85
|
|
:cond_0
|
|
invoke-virtual {p0, v0}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Lcom/moji/weatherprovider/update/Result;)V
|
|
|
|
:cond_1
|
|
:goto_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method protected a()V
|
|
.locals 4
|
|
|
|
.line 97
|
|
iget-object v0, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->a:Lcom/moji/weatherprovider/update/WeatherUpdateListener;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 98
|
|
iget-object v0, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->a:Lcom/moji/weatherprovider/update/WeatherUpdateListener;
|
|
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->b:Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object v2
|
|
|
|
iget-object v3, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->b:Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-virtual {v2, v3}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-interface {v0, v1, v2}, Lcom/moji/weatherprovider/update/WeatherUpdateListener;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/data/Weather;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method protected a(I)V
|
|
.locals 2
|
|
.annotation build Landroid/support/annotation/NonNull;
|
|
.end annotation
|
|
|
|
.line 517
|
|
new-instance v0, Landroid/content/Intent;
|
|
|
|
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
|
|
|
|
const-string v1, "com.moji.mjad.AvatarStarResource"
|
|
|
|
.line 518
|
|
invoke-virtual {v0, v1}, Landroid/content/Intent;->setAction(Ljava/lang/String;)Landroid/content/Intent;
|
|
|
|
const-string v1, "cityId"
|
|
|
|
.line 519
|
|
invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;
|
|
|
|
const-string p1, "mInfo"
|
|
|
|
.line 520
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->b:Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent;
|
|
|
|
.line 521
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;)V
|
|
.locals 5
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x0
|
|
|
|
.line 342
|
|
:goto_0
|
|
sget v2, Lcom/moji/weatherprovider/update/BaseUpdater;->d:I
|
|
|
|
const/4 v3, 0x3
|
|
|
|
if-ge v0, v2, :cond_3
|
|
|
|
if-ge v1, v3, :cond_3
|
|
|
|
const-string v2, "BaseUpdater"
|
|
|
|
.line 343
|
|
new-instance v3, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v3}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v4, "doUpdateWeather time : "
|
|
|
|
invoke-virtual {v3, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v3}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-static {v2, v3}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
.line 344
|
|
invoke-virtual {p0, p1, p2, v0}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;I)V
|
|
|
|
.line 346
|
|
iget v2, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
const/4 v3, 0x1
|
|
|
|
if-ne v2, v3, :cond_0
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
.line 351
|
|
:cond_0
|
|
iget v2, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
const/4 v3, 0x6
|
|
|
|
if-ne v2, v3, :cond_1
|
|
|
|
const-string v2, "tonglei"
|
|
|
|
const-string v3, "need retry"
|
|
|
|
.line 352
|
|
invoke-static {v2, v3}, Lcom/moji/tool/log/MJLogger;->b(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
add-int/lit8 v1, v1, 0x1
|
|
|
|
const-wide/16 v2, 0x1388
|
|
|
|
.line 355
|
|
:try_start_0
|
|
invoke-static {v2, v3}, Ljava/lang/Thread;->sleep(J)V
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
nop
|
|
|
|
goto :goto_0
|
|
|
|
.line 363
|
|
:cond_1
|
|
invoke-virtual {p2}, Lcom/moji/weatherprovider/update/Result;->a()Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_2
|
|
|
|
add-int/lit8 v0, v0, 0x1
|
|
|
|
goto :goto_0
|
|
|
|
:cond_2
|
|
return-void
|
|
|
|
:cond_3
|
|
if-lt v1, v3, :cond_4
|
|
|
|
const/16 p1, 0x11
|
|
|
|
.line 372
|
|
iput p1, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
:cond_4
|
|
return-void
|
|
.end method
|
|
|
|
.method protected a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;I)V
|
|
.locals 26
|
|
|
|
move-object/from16 v1, p0
|
|
|
|
move-object/from16 v0, p1
|
|
|
|
move-object/from16 v2, p2
|
|
|
|
move/from16 v3, p3
|
|
|
|
if-eqz v3, :cond_0
|
|
|
|
.line 378
|
|
invoke-static {}, Lorg/greenrobot/eventbus/EventBus;->a()Lorg/greenrobot/eventbus/EventBus;
|
|
|
|
move-result-object v4
|
|
|
|
new-instance v5, Lcom/moji/weatherprovider/event/UpdateCityStateEvent;
|
|
|
|
sget-object v6, Lcom/moji/weatherprovider/event/CITY_STATE;->RETRY:Lcom/moji/weatherprovider/event/CITY_STATE;
|
|
|
|
invoke-direct {v5, v0, v6}, Lcom/moji/weatherprovider/event/UpdateCityStateEvent;-><init>(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/event/CITY_STATE;)V
|
|
|
|
invoke-virtual {v4, v5}, Lorg/greenrobot/eventbus/EventBus;->d(Ljava/lang/Object;)V
|
|
|
|
.line 382
|
|
:cond_0
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v4
|
|
|
|
const/4 v8, -0x1
|
|
|
|
const/4 v9, 0x0
|
|
|
|
const/4 v10, 0x4
|
|
|
|
const/4 v11, 0x3
|
|
|
|
const/4 v12, 0x5
|
|
|
|
const/4 v13, 0x0
|
|
|
|
const/4 v14, 0x2
|
|
|
|
const/4 v15, 0x1
|
|
|
|
.line 386
|
|
:try_start_0
|
|
invoke-virtual {v1, v0, v3}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Lcom/moji/common/area/AreaInfo;I)Lcom/moji/http/pb/Weather2Request;
|
|
|
|
move-result-object v6
|
|
:try_end_0
|
|
.catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_5
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_2
|
|
|
|
.line 387
|
|
:try_start_1
|
|
new-instance v0, Lcom/moji/weatherprovider/update/BaseUpdater$3;
|
|
|
|
invoke-direct {v0, v1, v2}, Lcom/moji/weatherprovider/update/BaseUpdater$3;-><init>(Lcom/moji/weatherprovider/update/BaseUpdater;Lcom/moji/weatherprovider/update/Result;)V
|
|
|
|
invoke-virtual {v6, v0}, Lcom/moji/http/pb/Weather2Request;->b(Lcom/moji/requestcore/MJBaseHttpCallback;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
move-object v7, v0
|
|
|
|
check-cast v7, Ljava/io/InputStream;
|
|
:try_end_1
|
|
.catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_4
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
.line 410
|
|
:try_start_2
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v18
|
|
:try_end_2
|
|
.catch Ljava/lang/Exception; {:try_start_2 .. :try_end_2} :catch_3
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
const/4 v0, 0x0
|
|
|
|
sub-long v23, v18, v4
|
|
|
|
if-nez v7, :cond_c
|
|
|
|
.line 413
|
|
:try_start_3
|
|
iget v0, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
if-ne v0, v15, :cond_1
|
|
|
|
const/16 v0, 0xc
|
|
|
|
.line 414
|
|
iput v0, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
:try_end_3
|
|
.catch Ljava/lang/Exception; {:try_start_3 .. :try_end_3} :catch_1
|
|
.catchall {:try_start_3 .. :try_end_3} :catchall_3
|
|
|
|
:cond_1
|
|
if-eqz v7, :cond_2
|
|
|
|
.line 428
|
|
:try_start_4
|
|
invoke-virtual {v7}, Ljava/io/InputStream;->close()V
|
|
:try_end_4
|
|
.catch Ljava/lang/Exception; {:try_start_4 .. :try_end_4} :catch_0
|
|
|
|
goto :goto_0
|
|
|
|
:catch_0
|
|
move-exception v0
|
|
|
|
move-object v4, v0
|
|
|
|
const-string v0, "BaseUpdater"
|
|
|
|
.line 430
|
|
invoke-static {v0, v4}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:cond_2
|
|
:goto_0
|
|
if-eqz v2, :cond_4
|
|
|
|
.line 434
|
|
iget v0, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
if-eqz v0, :cond_3
|
|
|
|
goto :goto_1
|
|
|
|
:cond_3
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_2
|
|
|
|
:cond_4
|
|
:goto_1
|
|
const/4 v0, 0x1
|
|
|
|
:goto_2
|
|
if-nez v2, :cond_5
|
|
|
|
goto :goto_3
|
|
|
|
.line 435
|
|
:cond_5
|
|
iget v8, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
.line 436
|
|
:goto_3
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->m()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_b
|
|
|
|
if-eqz v6, :cond_8
|
|
|
|
.line 438
|
|
invoke-virtual {v6}, Lcom/moji/http/pb/Weather2Request;->i()Lcom/moji/requestcore/RequestParams;
|
|
|
|
move-result-object v2
|
|
|
|
.line 439
|
|
invoke-virtual {v2}, Lcom/moji/requestcore/RequestParams;->a()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 440
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v20
|
|
|
|
sget-object v21, Lcom/moji/statistics/EVENT_TAG;->WEATHER_UPDATE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
iget v4, v1, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v22
|
|
|
|
new-array v4, v12, [Ljava/lang/Object;
|
|
|
|
if-eqz v0, :cond_6
|
|
|
|
const/4 v0, 0x2
|
|
|
|
goto :goto_4
|
|
|
|
:cond_6
|
|
const/4 v0, 0x1
|
|
|
|
.line 441
|
|
:goto_4
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v4, v13
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v4, v15
|
|
|
|
aput-object v3, v4, v14
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->l()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_7
|
|
|
|
const-string v0, "1"
|
|
|
|
goto :goto_5
|
|
|
|
:cond_7
|
|
const-string v0, "2"
|
|
|
|
:goto_5
|
|
aput-object v0, v4, v11
|
|
|
|
aput-object v2, v4, v10
|
|
|
|
invoke-static {v4}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v25
|
|
|
|
.line 440
|
|
invoke-virtual/range {v20 .. v25}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;JLorg/json/JSONObject;)Lcom/moji/statistics/EventManager;
|
|
|
|
goto :goto_8
|
|
|
|
.line 443
|
|
:cond_8
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v20
|
|
|
|
sget-object v21, Lcom/moji/statistics/EVENT_TAG;->WEATHER_UPDATE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
iget v2, v1, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v22
|
|
|
|
new-array v2, v12, [Ljava/lang/Object;
|
|
|
|
if-eqz v0, :cond_9
|
|
|
|
const/4 v0, 0x2
|
|
|
|
goto :goto_6
|
|
|
|
:cond_9
|
|
const/4 v0, 0x1
|
|
|
|
.line 444
|
|
:goto_6
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v2, v13
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v2, v15
|
|
|
|
sget-object v0, Lcom/moji/weatherprovider/update/BaseUpdater;->c:[Ljava/lang/String;
|
|
|
|
aget-object v0, v0, v3
|
|
|
|
aput-object v0, v2, v14
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->l()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_a
|
|
|
|
const-string v0, "1"
|
|
|
|
goto :goto_7
|
|
|
|
:cond_a
|
|
const-string v0, "2"
|
|
|
|
:goto_7
|
|
aput-object v0, v2, v11
|
|
|
|
aput-object v9, v2, v10
|
|
|
|
invoke-static {v2}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v25
|
|
|
|
.line 443
|
|
invoke-virtual/range {v20 .. v25}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;JLorg/json/JSONObject;)Lcom/moji/statistics/EventManager;
|
|
|
|
:cond_b
|
|
:goto_8
|
|
return-void
|
|
|
|
:catch_1
|
|
move-exception v0
|
|
|
|
move-wide/from16 v16, v23
|
|
|
|
goto/16 :goto_15
|
|
|
|
.line 419
|
|
:cond_c
|
|
:try_start_5
|
|
invoke-virtual {v1, v7, v2}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Ljava/io/InputStream;Lcom/moji/weatherprovider/update/Result;)V
|
|
:try_end_5
|
|
.catch Ljava/lang/Exception; {:try_start_5 .. :try_end_5} :catch_1
|
|
.catchall {:try_start_5 .. :try_end_5} :catchall_3
|
|
|
|
if-eqz v7, :cond_d
|
|
|
|
.line 428
|
|
:try_start_6
|
|
invoke-virtual {v7}, Ljava/io/InputStream;->close()V
|
|
:try_end_6
|
|
.catch Ljava/lang/Exception; {:try_start_6 .. :try_end_6} :catch_2
|
|
|
|
goto :goto_9
|
|
|
|
:catch_2
|
|
move-exception v0
|
|
|
|
move-object v4, v0
|
|
|
|
const-string v0, "BaseUpdater"
|
|
|
|
.line 430
|
|
invoke-static {v0, v4}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:cond_d
|
|
:goto_9
|
|
if-eqz v2, :cond_f
|
|
|
|
.line 434
|
|
iget v0, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
if-eqz v0, :cond_e
|
|
|
|
goto :goto_a
|
|
|
|
:cond_e
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_b
|
|
|
|
:cond_f
|
|
:goto_a
|
|
const/4 v0, 0x1
|
|
|
|
:goto_b
|
|
if-nez v2, :cond_10
|
|
|
|
goto :goto_c
|
|
|
|
.line 435
|
|
:cond_10
|
|
iget v8, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
.line 436
|
|
:goto_c
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->m()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1f
|
|
|
|
if-eqz v6, :cond_13
|
|
|
|
.line 438
|
|
invoke-virtual {v6}, Lcom/moji/http/pb/Weather2Request;->i()Lcom/moji/requestcore/RequestParams;
|
|
|
|
move-result-object v2
|
|
|
|
.line 439
|
|
invoke-virtual {v2}, Lcom/moji/requestcore/RequestParams;->a()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 440
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v20
|
|
|
|
sget-object v21, Lcom/moji/statistics/EVENT_TAG;->WEATHER_UPDATE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
iget v4, v1, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v22
|
|
|
|
new-array v4, v12, [Ljava/lang/Object;
|
|
|
|
if-eqz v0, :cond_11
|
|
|
|
const/4 v0, 0x2
|
|
|
|
goto :goto_d
|
|
|
|
:cond_11
|
|
const/4 v0, 0x1
|
|
|
|
.line 441
|
|
:goto_d
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v4, v13
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v4, v15
|
|
|
|
aput-object v3, v4, v14
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->l()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_12
|
|
|
|
const-string v0, "1"
|
|
|
|
goto :goto_e
|
|
|
|
:cond_12
|
|
const-string v0, "2"
|
|
|
|
:goto_e
|
|
aput-object v0, v4, v11
|
|
|
|
aput-object v2, v4, v10
|
|
|
|
:goto_f
|
|
invoke-static {v4}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v25
|
|
|
|
.line 440
|
|
invoke-virtual/range {v20 .. v25}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;JLorg/json/JSONObject;)Lcom/moji/statistics/EventManager;
|
|
|
|
goto/16 :goto_1e
|
|
|
|
.line 443
|
|
:cond_13
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v20
|
|
|
|
sget-object v21, Lcom/moji/statistics/EVENT_TAG;->WEATHER_UPDATE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
iget v2, v1, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v22
|
|
|
|
new-array v2, v12, [Ljava/lang/Object;
|
|
|
|
if-eqz v0, :cond_14
|
|
|
|
const/4 v0, 0x2
|
|
|
|
goto :goto_10
|
|
|
|
:cond_14
|
|
const/4 v0, 0x1
|
|
|
|
.line 444
|
|
:goto_10
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v2, v13
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v2, v15
|
|
|
|
sget-object v0, Lcom/moji/weatherprovider/update/BaseUpdater;->c:[Ljava/lang/String;
|
|
|
|
aget-object v0, v0, v3
|
|
|
|
aput-object v0, v2, v14
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->l()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_15
|
|
|
|
const-string v0, "1"
|
|
|
|
goto :goto_11
|
|
|
|
:cond_15
|
|
const-string v0, "2"
|
|
|
|
:goto_11
|
|
aput-object v0, v2, v11
|
|
|
|
aput-object v9, v2, v10
|
|
|
|
:goto_12
|
|
invoke-static {v2}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v25
|
|
|
|
.line 443
|
|
invoke-virtual/range {v20 .. v25}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;JLorg/json/JSONObject;)Lcom/moji/statistics/EventManager;
|
|
|
|
goto/16 :goto_1e
|
|
|
|
:catchall_0
|
|
move-exception v0
|
|
|
|
move-object v4, v0
|
|
|
|
goto :goto_13
|
|
|
|
:catch_3
|
|
move-exception v0
|
|
|
|
goto :goto_14
|
|
|
|
:catchall_1
|
|
move-exception v0
|
|
|
|
move-object v4, v0
|
|
|
|
move-object v7, v9
|
|
|
|
goto :goto_13
|
|
|
|
:catch_4
|
|
move-exception v0
|
|
|
|
move-object v7, v9
|
|
|
|
goto :goto_14
|
|
|
|
:catchall_2
|
|
move-exception v0
|
|
|
|
move-object v4, v0
|
|
|
|
move-object v6, v9
|
|
|
|
move-object v7, v6
|
|
|
|
:goto_13
|
|
const-wide/16 v19, 0x0
|
|
|
|
goto/16 :goto_1f
|
|
|
|
:catch_5
|
|
move-exception v0
|
|
|
|
move-object v6, v9
|
|
|
|
move-object v7, v6
|
|
|
|
:goto_14
|
|
const-wide/16 v16, 0x0
|
|
|
|
.line 421
|
|
:goto_15
|
|
:try_start_7
|
|
invoke-static {}, Ljava/lang/System;->currentTimeMillis()J
|
|
|
|
move-result-wide v18
|
|
:try_end_7
|
|
.catchall {:try_start_7 .. :try_end_7} :catchall_4
|
|
|
|
const/16 v16, 0x0
|
|
|
|
sub-long v23, v18, v4
|
|
|
|
:try_start_8
|
|
const-string v4, "BaseUpdater"
|
|
|
|
.line 423
|
|
invoke-static {v4, v0}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
:try_end_8
|
|
.catchall {:try_start_8 .. :try_end_8} :catchall_3
|
|
|
|
if-eqz v7, :cond_16
|
|
|
|
.line 428
|
|
:try_start_9
|
|
invoke-virtual {v7}, Ljava/io/InputStream;->close()V
|
|
:try_end_9
|
|
.catch Ljava/lang/Exception; {:try_start_9 .. :try_end_9} :catch_6
|
|
|
|
goto :goto_16
|
|
|
|
:catch_6
|
|
move-exception v0
|
|
|
|
move-object v4, v0
|
|
|
|
const-string v0, "BaseUpdater"
|
|
|
|
.line 430
|
|
invoke-static {v0, v4}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:cond_16
|
|
:goto_16
|
|
if-eqz v2, :cond_18
|
|
|
|
.line 434
|
|
iget v0, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
if-eqz v0, :cond_17
|
|
|
|
goto :goto_17
|
|
|
|
:cond_17
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_18
|
|
|
|
:cond_18
|
|
:goto_17
|
|
const/4 v0, 0x1
|
|
|
|
:goto_18
|
|
if-nez v2, :cond_19
|
|
|
|
goto :goto_19
|
|
|
|
.line 435
|
|
:cond_19
|
|
iget v8, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
.line 436
|
|
:goto_19
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->m()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1f
|
|
|
|
if-eqz v6, :cond_1c
|
|
|
|
.line 438
|
|
invoke-virtual {v6}, Lcom/moji/http/pb/Weather2Request;->i()Lcom/moji/requestcore/RequestParams;
|
|
|
|
move-result-object v2
|
|
|
|
.line 439
|
|
invoke-virtual {v2}, Lcom/moji/requestcore/RequestParams;->a()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 440
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v20
|
|
|
|
sget-object v21, Lcom/moji/statistics/EVENT_TAG;->WEATHER_UPDATE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
iget v4, v1, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
invoke-static {v4}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v22
|
|
|
|
new-array v4, v12, [Ljava/lang/Object;
|
|
|
|
if-eqz v0, :cond_1a
|
|
|
|
const/4 v0, 0x2
|
|
|
|
goto :goto_1a
|
|
|
|
:cond_1a
|
|
const/4 v0, 0x1
|
|
|
|
.line 441
|
|
:goto_1a
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v4, v13
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v4, v15
|
|
|
|
aput-object v3, v4, v14
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->l()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1b
|
|
|
|
const-string v0, "1"
|
|
|
|
goto :goto_1b
|
|
|
|
:cond_1b
|
|
const-string v0, "2"
|
|
|
|
:goto_1b
|
|
aput-object v0, v4, v11
|
|
|
|
aput-object v2, v4, v10
|
|
|
|
goto/16 :goto_f
|
|
|
|
.line 443
|
|
:cond_1c
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v20
|
|
|
|
sget-object v21, Lcom/moji/statistics/EVENT_TAG;->WEATHER_UPDATE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
iget v2, v1, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v22
|
|
|
|
new-array v2, v12, [Ljava/lang/Object;
|
|
|
|
if-eqz v0, :cond_1d
|
|
|
|
const/4 v0, 0x2
|
|
|
|
goto :goto_1c
|
|
|
|
:cond_1d
|
|
const/4 v0, 0x1
|
|
|
|
.line 444
|
|
:goto_1c
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v2, v13
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v2, v15
|
|
|
|
sget-object v0, Lcom/moji/weatherprovider/update/BaseUpdater;->c:[Ljava/lang/String;
|
|
|
|
aget-object v0, v0, v3
|
|
|
|
aput-object v0, v2, v14
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->l()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1e
|
|
|
|
const-string v0, "1"
|
|
|
|
goto :goto_1d
|
|
|
|
:cond_1e
|
|
const-string v0, "2"
|
|
|
|
:goto_1d
|
|
aput-object v0, v2, v11
|
|
|
|
aput-object v9, v2, v10
|
|
|
|
goto/16 :goto_12
|
|
|
|
:cond_1f
|
|
:goto_1e
|
|
return-void
|
|
|
|
:catchall_3
|
|
move-exception v0
|
|
|
|
move-object v4, v0
|
|
|
|
move-wide/from16 v19, v23
|
|
|
|
goto :goto_1f
|
|
|
|
:catchall_4
|
|
move-exception v0
|
|
|
|
move-object v4, v0
|
|
|
|
move-wide/from16 v19, v16
|
|
|
|
:goto_1f
|
|
if-eqz v7, :cond_20
|
|
|
|
.line 428
|
|
:try_start_a
|
|
invoke-virtual {v7}, Ljava/io/InputStream;->close()V
|
|
:try_end_a
|
|
.catch Ljava/lang/Exception; {:try_start_a .. :try_end_a} :catch_7
|
|
|
|
goto :goto_20
|
|
|
|
:catch_7
|
|
move-exception v0
|
|
|
|
move-object v5, v0
|
|
|
|
const-string v0, "BaseUpdater"
|
|
|
|
.line 430
|
|
invoke-static {v0, v5}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:cond_20
|
|
:goto_20
|
|
if-eqz v2, :cond_22
|
|
|
|
.line 434
|
|
iget v0, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
if-eqz v0, :cond_21
|
|
|
|
goto :goto_21
|
|
|
|
:cond_21
|
|
const/4 v0, 0x0
|
|
|
|
goto :goto_22
|
|
|
|
:cond_22
|
|
:goto_21
|
|
const/4 v0, 0x1
|
|
|
|
:goto_22
|
|
if-nez v2, :cond_23
|
|
|
|
goto :goto_23
|
|
|
|
.line 435
|
|
:cond_23
|
|
iget v8, v2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
.line 436
|
|
:goto_23
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->m()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_29
|
|
|
|
if-eqz v6, :cond_26
|
|
|
|
.line 438
|
|
invoke-virtual {v6}, Lcom/moji/http/pb/Weather2Request;->i()Lcom/moji/requestcore/RequestParams;
|
|
|
|
move-result-object v2
|
|
|
|
.line 439
|
|
invoke-virtual {v2}, Lcom/moji/requestcore/RequestParams;->a()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
.line 440
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v16
|
|
|
|
sget-object v17, Lcom/moji/statistics/EVENT_TAG;->WEATHER_UPDATE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
iget v5, v1, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v18
|
|
|
|
new-array v5, v12, [Ljava/lang/Object;
|
|
|
|
if-eqz v0, :cond_24
|
|
|
|
const/4 v0, 0x2
|
|
|
|
goto :goto_24
|
|
|
|
:cond_24
|
|
const/4 v0, 0x1
|
|
|
|
.line 441
|
|
:goto_24
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v5, v13
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v5, v15
|
|
|
|
aput-object v3, v5, v14
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->l()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_25
|
|
|
|
const-string v0, "1"
|
|
|
|
goto :goto_25
|
|
|
|
:cond_25
|
|
const-string v0, "2"
|
|
|
|
:goto_25
|
|
aput-object v0, v5, v11
|
|
|
|
aput-object v2, v5, v10
|
|
|
|
invoke-static {v5}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v21
|
|
|
|
.line 440
|
|
invoke-virtual/range {v16 .. v21}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;JLorg/json/JSONObject;)Lcom/moji/statistics/EventManager;
|
|
|
|
goto :goto_28
|
|
|
|
.line 443
|
|
:cond_26
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object v16
|
|
|
|
sget-object v17, Lcom/moji/statistics/EVENT_TAG;->WEATHER_UPDATE:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
iget v2, v1, Lcom/moji/weatherprovider/update/BaseUpdater;->e:I
|
|
|
|
invoke-static {v2}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;
|
|
|
|
move-result-object v18
|
|
|
|
new-array v2, v12, [Ljava/lang/Object;
|
|
|
|
if-eqz v0, :cond_27
|
|
|
|
const/4 v0, 0x2
|
|
|
|
goto :goto_26
|
|
|
|
:cond_27
|
|
const/4 v0, 0x1
|
|
|
|
.line 444
|
|
:goto_26
|
|
invoke-static {v0}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v2, v13
|
|
|
|
invoke-static {v8}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v2, v15
|
|
|
|
sget-object v0, Lcom/moji/weatherprovider/update/BaseUpdater;->c:[Ljava/lang/String;
|
|
|
|
aget-object v0, v0, v3
|
|
|
|
aput-object v0, v2, v14
|
|
|
|
invoke-static {}, Lcom/moji/tool/DeviceTool;->l()Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_28
|
|
|
|
const-string v0, "1"
|
|
|
|
goto :goto_27
|
|
|
|
:cond_28
|
|
const-string v0, "2"
|
|
|
|
:goto_27
|
|
aput-object v0, v2, v11
|
|
|
|
aput-object v9, v2, v10
|
|
|
|
invoke-static {v2}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v21
|
|
|
|
.line 443
|
|
invoke-virtual/range {v16 .. v21}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;JLorg/json/JSONObject;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 447
|
|
:cond_29
|
|
:goto_28
|
|
throw v4
|
|
.end method
|
|
|
|
.method protected a(Lcom/moji/location/entity/MJLocation;)V
|
|
.locals 2
|
|
|
|
.line 103
|
|
iget-object v0, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->a:Lcom/moji/weatherprovider/update/WeatherUpdateListener;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 104
|
|
iget-object v0, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->a:Lcom/moji/weatherprovider/update/WeatherUpdateListener;
|
|
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->b:Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-interface {v0, v1, p1}, Lcom/moji/weatherprovider/update/WeatherUpdateListener;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/location/entity/MJLocation;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method protected a(Lcom/moji/weatherprovider/data/Weather;)V
|
|
.locals 2
|
|
|
|
.line 525
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object v0
|
|
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->b:Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-virtual {v0, v1, p1}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/data/Weather;)Z
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method protected a(Lcom/moji/weatherprovider/update/Result;)V
|
|
.locals 2
|
|
|
|
.line 193
|
|
iget-object v0, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->a:Lcom/moji/weatherprovider/update/WeatherUpdateListener;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
.line 194
|
|
iget-object v0, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->a:Lcom/moji/weatherprovider/update/WeatherUpdateListener;
|
|
|
|
iget-object v1, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->b:Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-interface {v0, v1, p1}, Lcom/moji/weatherprovider/update/WeatherUpdateListener;->a(Lcom/moji/common/area/AreaInfo;Lcom/moji/weatherprovider/update/Result;)V
|
|
|
|
:cond_0
|
|
return-void
|
|
.end method
|
|
|
|
.method protected a(Ljava/io/InputStream;Lcom/moji/weatherprovider/update/Result;)V
|
|
.locals 7
|
|
|
|
const/16 v0, 0xf
|
|
|
|
if-nez p1, :cond_0
|
|
|
|
.line 452
|
|
iput v0, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
return-void
|
|
|
|
.line 455
|
|
:cond_0
|
|
invoke-static {}, Lcom/moji/weatherprovider/provider/WeatherProvider;->b()Lcom/moji/weatherprovider/provider/WeatherProvider;
|
|
|
|
move-result-object v1
|
|
|
|
iget-object v2, p0, Lcom/moji/weatherprovider/update/BaseUpdater;->b:Lcom/moji/common/area/AreaInfo;
|
|
|
|
invoke-virtual {v1, v2}, Lcom/moji/weatherprovider/provider/WeatherProvider;->a(Lcom/moji/common/area/AreaInfo;)Lcom/moji/weatherprovider/data/Weather;
|
|
|
|
move-result-object v1
|
|
|
|
.line 457
|
|
:try_start_0
|
|
invoke-static {p1}, Lcom/moji/weather/bean/protobuf/MojiWeather$Weather;->parseFrom(Ljava/io/InputStream;)Lcom/moji/weather/bean/protobuf/MojiWeather$Weather;
|
|
|
|
move-result-object v2
|
|
|
|
.line 459
|
|
invoke-virtual {v2}, Lcom/moji/weather/bean/protobuf/MojiWeather$Weather;->getDetailCount()I
|
|
|
|
move-result v3
|
|
|
|
const/4 v4, 0x0
|
|
|
|
if-lez v3, :cond_1
|
|
|
|
.line 460
|
|
invoke-virtual {v2, v4}, Lcom/moji/weather/bean/protobuf/MojiWeather$Weather;->getDetail(I)Lcom/moji/weather/bean/protobuf/MojiWeather$Weather$Detail;
|
|
|
|
move-result-object v3
|
|
|
|
invoke-virtual {v3}, Lcom/moji/weather/bean/protobuf/MojiWeather$Weather$Detail;->getRetry()I
|
|
|
|
move-result v3
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
const/4 v3, 0x0
|
|
|
|
:goto_0
|
|
const/4 v5, 0x1
|
|
|
|
if-ne v3, v5, :cond_2
|
|
|
|
const/4 v0, 0x6
|
|
|
|
.line 463
|
|
iput v0, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
:try_end_0
|
|
.catch Ljava/io/IOException; {:try_start_0 .. :try_end_0} :catch_2
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
.line 490
|
|
:try_start_1
|
|
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
|
|
:try_end_1
|
|
.catch Ljava/io/IOException; {:try_start_1 .. :try_end_1} :catch_0
|
|
|
|
goto :goto_1
|
|
|
|
:catch_0
|
|
move-exception p1
|
|
|
|
const-string p2, "BaseUpdater"
|
|
|
|
.line 492
|
|
invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_1
|
|
return-void
|
|
|
|
.line 466
|
|
:cond_2
|
|
:try_start_2
|
|
invoke-virtual {v2}, Lcom/moji/weather/bean/protobuf/MojiWeather$Weather;->getCode()I
|
|
|
|
move-result v3
|
|
|
|
if-eqz v3, :cond_3
|
|
|
|
.line 467
|
|
iput v0, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
:try_end_2
|
|
.catch Ljava/io/IOException; {:try_start_2 .. :try_end_2} :catch_2
|
|
.catchall {:try_start_2 .. :try_end_2} :catchall_0
|
|
|
|
.line 490
|
|
:try_start_3
|
|
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
|
|
:try_end_3
|
|
.catch Ljava/io/IOException; {:try_start_3 .. :try_end_3} :catch_1
|
|
|
|
goto :goto_2
|
|
|
|
:catch_1
|
|
move-exception p1
|
|
|
|
const-string p2, "BaseUpdater"
|
|
|
|
.line 492
|
|
invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_2
|
|
return-void
|
|
|
|
.line 470
|
|
:cond_3
|
|
:try_start_4
|
|
new-instance v3, Lcom/moji/weatherprovider/data/Weather;
|
|
|
|
invoke-direct {v3}, Lcom/moji/weatherprovider/data/Weather;-><init>()V
|
|
|
|
.line 471
|
|
invoke-static {v2, v3}, Lcom/moji/weatherprovider/parser/WeatherParser;->a(Lcom/moji/weather/bean/protobuf/MojiWeather$Weather;Lcom/moji/weatherprovider/data/Weather;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
.line 473
|
|
iget-object v0, v3, Lcom/moji/weatherprovider/data/Weather;->mDetail:Lcom/moji/weatherprovider/data/Detail;
|
|
|
|
iget-wide v5, v0, Lcom/moji/weatherprovider/data/Detail;->mCityId:J
|
|
|
|
long-to-int v0, v5
|
|
|
|
.line 474
|
|
iput v4, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
if-nez v1, :cond_4
|
|
|
|
.line 476
|
|
invoke-direct {p0, v3, v0}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Lcom/moji/weatherprovider/data/Weather;I)V
|
|
|
|
.line 477
|
|
invoke-virtual {p0, v3}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Lcom/moji/weatherprovider/data/Weather;)V
|
|
|
|
goto :goto_3
|
|
|
|
.line 479
|
|
:cond_4
|
|
invoke-virtual {v1, v3}, Lcom/moji/weatherprovider/data/Weather;->merge(Lcom/moji/weatherprovider/data/Weather;)V
|
|
|
|
.line 480
|
|
invoke-direct {p0, v1, v0}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Lcom/moji/weatherprovider/data/Weather;I)V
|
|
|
|
.line 481
|
|
invoke-virtual {p0, v1}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Lcom/moji/weatherprovider/data/Weather;)V
|
|
|
|
goto :goto_3
|
|
|
|
.line 484
|
|
:cond_5
|
|
iput v0, p2, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
:try_end_4
|
|
.catch Ljava/io/IOException; {:try_start_4 .. :try_end_4} :catch_2
|
|
.catchall {:try_start_4 .. :try_end_4} :catchall_0
|
|
|
|
.line 490
|
|
:goto_3
|
|
:try_start_5
|
|
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
|
|
:try_end_5
|
|
.catch Ljava/io/IOException; {:try_start_5 .. :try_end_5} :catch_3
|
|
|
|
goto :goto_4
|
|
|
|
:catchall_0
|
|
move-exception p2
|
|
|
|
goto :goto_5
|
|
|
|
:catch_2
|
|
move-exception p2
|
|
|
|
:try_start_6
|
|
const-string v0, "BaseUpdater"
|
|
|
|
.line 487
|
|
invoke-static {v0, p2}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
:try_end_6
|
|
.catchall {:try_start_6 .. :try_end_6} :catchall_0
|
|
|
|
.line 490
|
|
:try_start_7
|
|
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
|
|
:try_end_7
|
|
.catch Ljava/io/IOException; {:try_start_7 .. :try_end_7} :catch_3
|
|
|
|
goto :goto_4
|
|
|
|
:catch_3
|
|
move-exception p1
|
|
|
|
const-string p2, "BaseUpdater"
|
|
|
|
.line 492
|
|
invoke-static {p2, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
:goto_4
|
|
return-void
|
|
|
|
.line 490
|
|
:goto_5
|
|
:try_start_8
|
|
invoke-virtual {p1}, Ljava/io/InputStream;->close()V
|
|
:try_end_8
|
|
.catch Ljava/io/IOException; {:try_start_8 .. :try_end_8} :catch_4
|
|
|
|
goto :goto_6
|
|
|
|
:catch_4
|
|
move-exception p1
|
|
|
|
const-string v0, "BaseUpdater"
|
|
|
|
.line 492
|
|
invoke-static {v0, p1}, Lcom/moji/tool/log/MJLogger;->a(Ljava/lang/String;Ljava/lang/Throwable;)V
|
|
|
|
.line 494
|
|
:goto_6
|
|
throw p2
|
|
.end method
|
|
|
|
.method protected abstract a(Lcom/moji/location/entity/MJLocation;I)Z
|
|
.end method
|
|
|
|
.method protected b(Lcom/moji/weatherprovider/update/Result;)V
|
|
.locals 7
|
|
|
|
.line 199
|
|
invoke-direct {p0}, Lcom/moji/weatherprovider/update/BaseUpdater;->b()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 200
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
const-string v1, "0"
|
|
|
|
invoke-virtual {v1, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_4
|
|
|
|
.line 201
|
|
:cond_0
|
|
new-instance v0, Lcom/moji/http/register/RegisterAndroidUserRequest;
|
|
|
|
invoke-direct {v0}, Lcom/moji/http/register/RegisterAndroidUserRequest;-><init>()V
|
|
|
|
.line 203
|
|
invoke-virtual {v0}, Lcom/moji/http/register/RegisterAndroidUserRequest;->f()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/moji/http/weather/entity/RegisterResp;
|
|
|
|
if-eqz v1, :cond_5
|
|
|
|
.line 204
|
|
invoke-virtual {v1}, Lcom/moji/http/weather/entity/RegisterResp;->OK()Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_5
|
|
|
|
iget-object v2, v1, Lcom/moji/http/weather/entity/RegisterResp;->udid:Ljava/lang/String;
|
|
|
|
invoke-static {v2}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
if-nez v2, :cond_5
|
|
|
|
iget-object v2, v1, Lcom/moji/http/weather/entity/RegisterResp;->udid:Ljava/lang/String;
|
|
|
|
const-string v3, "null"
|
|
|
|
invoke-virtual {v2, v3}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_1
|
|
|
|
goto/16 :goto_0
|
|
|
|
.line 211
|
|
:cond_1
|
|
iget-object p1, v1, Lcom/moji/http/weather/entity/RegisterResp;->udid:Ljava/lang/String;
|
|
|
|
iget-wide v2, v1, Lcom/moji/http/weather/entity/RegisterResp;->udidRegTime:J
|
|
|
|
invoke-direct {p0, p1, v2, v3}, Lcom/moji/weatherprovider/update/BaseUpdater;->a(Ljava/lang/String;J)V
|
|
|
|
.line 213
|
|
iget-object p1, v1, Lcom/moji/http/weather/entity/RegisterResp;->uaid:Ljava/lang/String;
|
|
|
|
invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
const-string p1, "null"
|
|
|
|
iget-object v2, v1, Lcom/moji/http/weather/entity/RegisterResp;->uaid:Ljava/lang/String;
|
|
|
|
invoke-virtual {p1, v2}, Ljava/lang/String;->equalsIgnoreCase(Ljava/lang/String;)Z
|
|
|
|
move-result p1
|
|
|
|
if-nez p1, :cond_2
|
|
|
|
.line 214
|
|
iget-object p1, v1, Lcom/moji/http/weather/entity/RegisterResp;->uaid:Ljava/lang/String;
|
|
|
|
iget-wide v2, v1, Lcom/moji/http/weather/entity/RegisterResp;->uaidRegTime:J
|
|
|
|
invoke-direct {p0, p1, v2, v3}, Lcom/moji/weatherprovider/update/BaseUpdater;->b(Ljava/lang/String;J)V
|
|
|
|
.line 218
|
|
:cond_2
|
|
invoke-static {}, Lcom/moji/statistics/EventManager;->a()Lcom/moji/statistics/EventManager;
|
|
|
|
move-result-object p1
|
|
|
|
sget-object v2, Lcom/moji/statistics/EVENT_TAG;->UID_REGISTER:Lcom/moji/statistics/EVENT_TAG;
|
|
|
|
new-instance v3, Lcom/moji/preferences/DefaultPrefer;
|
|
|
|
invoke-direct {v3}, Lcom/moji/preferences/DefaultPrefer;-><init>()V
|
|
|
|
invoke-virtual {v3}, Lcom/moji/preferences/DefaultPrefer;->t()Ljava/lang/String;
|
|
|
|
move-result-object v3
|
|
|
|
const/4 v4, 0x2
|
|
|
|
new-array v4, v4, [Ljava/lang/Object;
|
|
|
|
const/4 v5, 0x0
|
|
|
|
iget-object v6, v1, Lcom/moji/http/weather/entity/RegisterResp;->udid:Ljava/lang/String;
|
|
|
|
aput-object v6, v4, v5
|
|
|
|
const/4 v5, 0x1
|
|
|
|
.line 219
|
|
invoke-virtual {v0}, Lcom/moji/http/register/RegisterAndroidUserRequest;->i()Lcom/moji/requestcore/RequestParams;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/requestcore/RequestParams;->c()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
aput-object v0, v4, v5
|
|
|
|
invoke-static {v4}, Lcom/moji/statistics/EventParams;->getProperty([Ljava/lang/Object;)Lorg/json/JSONObject;
|
|
|
|
move-result-object v0
|
|
|
|
.line 218
|
|
invoke-virtual {p1, v2, v3, v0}, Lcom/moji/statistics/EventManager;->a(Lcom/moji/statistics/EVENT_TAG;Ljava/lang/String;Lorg/json/JSONObject;)Lcom/moji/statistics/EventManager;
|
|
|
|
.line 222
|
|
invoke-static {}, Lcom/moji/tool/preferences/CtaPrefer;->c()Lcom/moji/tool/preferences/CtaPrefer;
|
|
|
|
move-result-object p1
|
|
|
|
invoke-virtual {p1}, Lcom/moji/tool/preferences/CtaPrefer;->e()Z
|
|
|
|
move-result p1
|
|
|
|
if-eqz p1, :cond_3
|
|
|
|
.line 223
|
|
new-instance p1, Landroid/os/Handler;
|
|
|
|
invoke-static {}, Landroid/os/Looper;->getMainLooper()Landroid/os/Looper;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-direct {p1, v0}, Landroid/os/Handler;-><init>(Landroid/os/Looper;)V
|
|
|
|
new-instance v0, Lcom/moji/weatherprovider/update/BaseUpdater$1;
|
|
|
|
invoke-direct {v0, p0, v1}, Lcom/moji/weatherprovider/update/BaseUpdater$1;-><init>(Lcom/moji/weatherprovider/update/BaseUpdater;Lcom/moji/http/weather/entity/RegisterResp;)V
|
|
|
|
invoke-virtual {p1, v0}, Landroid/os/Handler;->post(Ljava/lang/Runnable;)Z
|
|
|
|
:cond_3
|
|
const-string p1, "BaseUpdater"
|
|
|
|
.line 245
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "register result: "
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, v0}, Lcom/moji/tool/log/MJLogger;->c(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
:cond_4
|
|
return-void
|
|
|
|
:cond_5
|
|
:goto_0
|
|
const/4 v0, 0x4
|
|
|
|
.line 205
|
|
iput v0, p1, Lcom/moji/weatherprovider/update/Result;->a:I
|
|
|
|
const-string p1, "BaseUpdater"
|
|
|
|
.line 206
|
|
new-instance v0, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
const-string v2, "register server response not valid register fail resp:"
|
|
|
|
invoke-virtual {v0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder;
|
|
|
|
invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-static {p1, v0}, Lcom/moji/tool/log/UserLog;->a(Ljava/lang/String;Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|