238 lines
6.0 KiB
Smali
238 lines
6.0 KiB
Smali
.class public Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
.super Ljava/lang/Object;
|
|
.source "ChannelController.java"
|
|
|
|
|
|
# static fields
|
|
.field private static a:Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
|
|
|
|
# instance fields
|
|
.field private b:Lcom/google/gson/Gson;
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 1
|
|
|
|
.line 22
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
.line 23
|
|
new-instance v0, Lcom/google/gson/Gson;
|
|
|
|
invoke-direct {v0}, Lcom/google/gson/Gson;-><init>()V
|
|
|
|
iput-object v0, p0, Lcom/moji/mjweather/feed/utils/ChannelController;->b:Lcom/google/gson/Gson;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static declared-synchronized a()Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
.locals 2
|
|
|
|
const-class v0, Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
|
|
monitor-enter v0
|
|
|
|
.line 27
|
|
:try_start_0
|
|
sget-object v1, Lcom/moji/mjweather/feed/utils/ChannelController;->a:Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 28
|
|
new-instance v1, Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
|
|
invoke-direct {v1}, Lcom/moji/mjweather/feed/utils/ChannelController;-><init>()V
|
|
|
|
sput-object v1, Lcom/moji/mjweather/feed/utils/ChannelController;->a:Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
|
|
.line 30
|
|
:cond_0
|
|
sget-object v1, Lcom/moji/mjweather/feed/utils/ChannelController;->a:Lcom/moji/mjweather/feed/utils/ChannelController;
|
|
:try_end_0
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
monitor-exit v0
|
|
|
|
return-object v1
|
|
|
|
:catchall_0
|
|
move-exception v1
|
|
|
|
.line 26
|
|
monitor-exit v0
|
|
|
|
throw v1
|
|
.end method
|
|
|
|
.method private b(Ljava/util/List;)V
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 68
|
|
iget-object v0, p0, Lcom/moji/mjweather/feed/utils/ChannelController;->b:Lcom/google/gson/Gson;
|
|
|
|
invoke-virtual {v0, p1}, Lcom/google/gson/Gson;->toJson(Ljava/lang/Object;)Ljava/lang/String;
|
|
|
|
move-result-object p1
|
|
|
|
.line 69
|
|
invoke-static {}, Lcom/moji/preferences/FeedPrefer;->c()Lcom/moji/preferences/FeedPrefer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0, p1}, Lcom/moji/preferences/FeedPrefer;->a(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method private d()Ljava/util/List;
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 44
|
|
invoke-static {}, Lcom/moji/preferences/FeedPrefer;->c()Lcom/moji/preferences/FeedPrefer;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-virtual {v0}, Lcom/moji/preferences/FeedPrefer;->d()Ljava/lang/String;
|
|
|
|
move-result-object v0
|
|
|
|
.line 45
|
|
invoke-static {v0}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z
|
|
|
|
move-result v1
|
|
|
|
if-nez v1, :cond_0
|
|
|
|
.line 46
|
|
iget-object v1, p0, Lcom/moji/mjweather/feed/utils/ChannelController;->b:Lcom/google/gson/Gson;
|
|
|
|
new-instance v2, Lcom/moji/mjweather/feed/utils/ChannelController$1;
|
|
|
|
invoke-direct {v2, p0}, Lcom/moji/mjweather/feed/utils/ChannelController$1;-><init>(Lcom/moji/mjweather/feed/utils/ChannelController;)V
|
|
|
|
.line 48
|
|
invoke-virtual {v2}, Lcom/moji/mjweather/feed/utils/ChannelController$1;->getType()Ljava/lang/reflect/Type;
|
|
|
|
move-result-object v2
|
|
|
|
.line 47
|
|
invoke-virtual {v1, v0, v2}, Lcom/google/gson/Gson;->fromJson(Ljava/lang/String;Ljava/lang/reflect/Type;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/util/List;
|
|
|
|
return-object v0
|
|
|
|
:cond_0
|
|
const/4 v0, 0x0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public a(Ljava/util/List;Ljava/util/List;)Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;)",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 55
|
|
new-instance v0, Ljava/util/ArrayList;
|
|
|
|
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
.line 56
|
|
invoke-interface {v0, p1}, Ljava/util/List;->addAll(Ljava/util/Collection;)Z
|
|
|
|
.line 57
|
|
invoke-interface {v0, p2}, Ljava/util/List;->removeAll(Ljava/util/Collection;)Z
|
|
|
|
.line 58
|
|
invoke-interface {p1, v0}, Ljava/util/List;->removeAll(Ljava/util/Collection;)Z
|
|
|
|
return-object p1
|
|
.end method
|
|
|
|
.method public a(Ljava/util/List;)V
|
|
.locals 0
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;)V"
|
|
}
|
|
.end annotation
|
|
|
|
.line 64
|
|
invoke-direct {p0, p1}, Lcom/moji/mjweather/feed/utils/ChannelController;->b(Ljava/util/List;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public b()Ljava/util/List;
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"()",
|
|
"Ljava/util/List<",
|
|
"Lcom/moji/http/fdsapi/entity/FeedManagerSubscribeItem;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
|
|
.line 40
|
|
invoke-direct {p0}, Lcom/moji/mjweather/feed/utils/ChannelController;->d()Ljava/util/List;
|
|
|
|
move-result-object v0
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public c()V
|
|
.locals 2
|
|
|
|
.line 74
|
|
invoke-static {}, Lcom/moji/preferences/FeedPrefer;->c()Lcom/moji/preferences/FeedPrefer;
|
|
|
|
move-result-object v0
|
|
|
|
const-string v1, ""
|
|
|
|
invoke-virtual {v0, v1}, Lcom/moji/preferences/FeedPrefer;->a(Ljava/lang/String;)V
|
|
|
|
return-void
|
|
.end method
|