147 lines
3.3 KiB
Smali
147 lines
3.3 KiB
Smali
.class public Lcom/moji/mjweather/feed/utils/FeedUtils;
|
|
.super Ljava/lang/Object;
|
|
.source "FeedUtils.java"
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 21
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static a(Lcom/moji/http/fdsapi/entity/ZakerBaseFeed;)Lcom/moji/mjweather/feed/data/ZakerFeed;
|
|
.locals 1
|
|
|
|
if-nez p0, :cond_0
|
|
|
|
const/4 p0, 0x0
|
|
|
|
return-object p0
|
|
|
|
.line 27
|
|
:cond_0
|
|
new-instance v0, Lcom/moji/mjweather/feed/data/ZakerFeed;
|
|
|
|
invoke-direct {v0}, Lcom/moji/mjweather/feed/data/ZakerFeed;-><init>()V
|
|
|
|
.line 28
|
|
invoke-virtual {v0, p0}, Lcom/moji/mjweather/feed/data/ZakerFeed;->buidler(Lcom/moji/http/fdsapi/entity/ZakerBaseFeed;)Lcom/moji/mjweather/feed/data/ZakerFeed;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
.end method
|
|
|
|
.method public static a()Ljava/lang/String;
|
|
.locals 3
|
|
|
|
const-string v0, ""
|
|
|
|
.line 48
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->b()Lcom/moji/common/area/AreaInfo;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 50
|
|
new-instance v0, Lcom/moji/areamanagement/db/LocalCityDBHelper;
|
|
|
|
invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;
|
|
|
|
move-result-object v2
|
|
|
|
invoke-direct {v0, v2}, Lcom/moji/areamanagement/db/LocalCityDBHelper;-><init>(Landroid/content/Context;)V
|
|
|
|
const/4 v2, 0x3
|
|
|
|
.line 51
|
|
invoke-virtual {v0, v1, v2}, Lcom/moji/areamanagement/db/LocalCityDBHelper;->a(Lcom/moji/common/area/AreaInfo;I)Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 52
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v2
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
.line 53
|
|
iget-object v0, v1, Lcom/moji/common/area/AreaInfo;->cityName:Ljava/lang/String;
|
|
|
|
:cond_0
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static a(Ljava/util/List;)Ljava/util/ArrayList;
|
|
.locals 2
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/ZakerBaseFeed;",
|
|
">;)",
|
|
"Ljava/util/ArrayList<",
|
|
"Lcom/moji/mjweather/feed/data/ZakerFeed;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 34
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
if-eqz p0, :cond_1
|
|
|
|
.line 36
|
|
invoke-interface {p0}, Ljava/util/List;->iterator()Ljava/util/Iterator;
|
|
|
|
move-result-object p0
|
|
|
|
:cond_0
|
|
:goto_0
|
|
invoke-interface {p0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
move-result v1
|
|
|
|
if-eqz v1, :cond_1
|
|
|
|
invoke-interface {p0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
move-result-object v1
|
|
|
|
check-cast v1, Lcom/moji/http/fdsapi/entity/ZakerBaseFeed;
|
|
|
|
.line 37
|
|
invoke-static {v1}, Lcom/moji/mjweather/feed/utils/FeedUtils;->a(Lcom/moji/http/fdsapi/entity/ZakerBaseFeed;)Lcom/moji/mjweather/feed/data/ZakerFeed;
|
|
|
|
move-result-object v1
|
|
|
|
if-eqz v1, :cond_0
|
|
|
|
.line 39
|
|
invoke-virtual {v0, v1}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
|
|
|
|
goto :goto_0
|
|
|
|
:cond_1
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static b()I
|
|
.locals 1
|
|
|
|
.line 60
|
|
invoke-static {}, Lcom/moji/areamanagement/MJAreaManager;->j()I
|
|
|
|
move-result v0
|
|
|
|
return v0
|
|
.end method
|