e.smali
.class public final Lwf/e;
.super Ljava/lang/Object;
.source "PushMessageDatabaseFilter.kt"
# interfaces
.implements Lcom/shopee/foody/push/service/IPushMessageService$a;
# annotations
.annotation system Ldalvik/annotation/MemberClasses;
value = {
Lwf/e$a;
}
.end annotation
.annotation runtime Lkotlin/Metadata;
bv = {
0x1,
0x0,
0x3
}
d1 = {
"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0008\u0003\u0018\u0000 \u00072\u00020\u0001:\u0001\u0007B\u0005\u00a2\u0006\u0002\u0010\u0002J\u001c\u0010\u0003\u001a\u0008\u0012\u0004\u0012\u00020\u00050\u00042\u000c\u0010\u0006\u001a\u0008\u0012\u0004\u0012\u00020\u00050\u0004H\u0016\u00a8\u0006\u0008"
}
d2 = {
"Lcom/shopee/foody/driver/global/init/tasks/push/PushMessageDatabaseFilter;",
"Lcom/shopee/foody/push/service/IPushMessageService$IPushMessageFilter;",
"()V",
"filter",
"",
"Lcom/shopee/foody/push/core/message/PushMessage;",
"pushMessage",
"Companion",
"driver_indonesiaRelease"
}
k = 0x1
mv = {
0x1,
0x1,
0x10
}
.end annotation
# direct methods
.method public static constructor <clinit>()V
.registers 2
new-instance v0, Lwf/e$a;
const/4 v1, 0x0
invoke-direct {v0, v1}, Lwf/e$a;-><init>(Lkotlin/jvm/internal/DefaultConstructorMarker;)V
return-void
.end method
.method public constructor <init>()V
.registers 1
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public a(Ljava/util/List;)Ljava/util/List;
.registers 21
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/util/List<",
"+",
"Lcom/shopee/foody/push/core/message/PushMessage;",
">;)",
"Ljava/util/List<",
"Lcom/shopee/foody/push/core/message/PushMessage;",
">;"
}
.end annotation
invoke-interface/range {p1 .. p1}, Ljava/util/List;->isEmpty()Z
move-result v0
const-string v1, "PushMessageDatabaseFilter"
if-eqz v0, :cond_10
sget-object v0, Lqa/d;->e:Lqa/d$a;
sget-object v2, Lwf/e$b;->a:Lwf/e$b;
invoke-virtual {v0, v1, v2}, Lqa/d$a;->a(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
return-object p1
:cond_10
sget-object v0, Lqh/h;->f:Lqh/h;
invoke-virtual {v0}, Lqh/h;->g()Z
move-result v0
if-nez v0, :cond_25
sget-object v0, Lqa/d;->e:Lqa/d$a;
sget-object v2, Lwf/e$c;->a:Lwf/e$c;
invoke-virtual {v0, v1, v2}, Lqa/d$a;->a(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
return-object v0
:cond_25
new-instance v2, Ljava/util/ArrayList;
invoke-direct {v2}, Ljava/util/ArrayList;-><init>()V
invoke-interface/range {p1 .. p1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v0
:cond_2e
:goto_2e
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
move-result v3
const/4 v4, 0x0
const/4 v5, 0x1
const/4 v6, 0x0
if-eqz v3, :cond_66
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
move-object v7, v3
check-cast v7, Lcom/shopee/foody/push/core/message/PushMessage;
invoke-virtual {v7}, Lcom/shopee/foody/push/core/message/PushMessage;->getData()Lcom/shopee/foody/push/core/message/PushDataSection;
move-result-object v8
if-eqz v8, :cond_4f
invoke-virtual {v8}, Lcom/shopee/foody/push/core/message/PushDataSection;->getSeq_id()Ljava/lang/String;
move-result-object v8
if-eqz v8, :cond_4f
invoke-static {v8}, Lc9/i;->c(Ljava/lang/String;)Ljava/lang/Long;
move-result-object v8
goto :goto_50
:cond_4f
move-object v8, v4
:goto_50
if-eqz v8, :cond_5f
invoke-virtual {v7}, Lcom/shopee/foody/push/core/message/PushMessage;->getData()Lcom/shopee/foody/push/core/message/PushDataSection;
move-result-object v7
if-eqz v7, :cond_5c
invoke-virtual {v7}, Lcom/shopee/foody/push/core/message/PushDataSection;->getBody()Lp5/l;
move-result-object v4
:cond_5c
if-eqz v4, :cond_5f
goto :goto_60
:cond_5f
const/4 v5, 0x0
:goto_60
if-eqz v5, :cond_2e
invoke-interface {v2, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_2e
:cond_66
new-instance v0, Ljava/util/ArrayList;
const/16 v3, 0xa
invoke-static {v2, v3}, Lkotlin/collections/CollectionsKt__IterablesKt;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
move-result v7
invoke-direct {v0, v7}, Ljava/util/ArrayList;-><init>(I)V
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v7
:goto_75
invoke-interface {v7}, Ljava/util/Iterator;->hasNext()Z
move-result v8
const-string v9, ""
if-eqz v8, :cond_eb
invoke-interface {v7}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v8
check-cast v8, Lcom/shopee/foody/push/core/message/PushMessage;
new-instance v15, Lte/c;
invoke-virtual {v8}, Lcom/shopee/foody/push/core/message/PushMessage;->getData()Lcom/shopee/foody/push/core/message/PushDataSection;
move-result-object v10
const-wide/16 v11, 0x0
if-eqz v10, :cond_9e
invoke-virtual {v10}, Lcom/shopee/foody/push/core/message/PushDataSection;->getSeq_id()Ljava/lang/String;
move-result-object v10
if-eqz v10, :cond_9e
invoke-static {v10}, Lc9/i;->c(Ljava/lang/String;)Ljava/lang/Long;
move-result-object v10
if-eqz v10, :cond_9e
invoke-virtual {v10}, Ljava/lang/Long;->longValue()J
move-result-wide v13
goto :goto_9f
:cond_9e
move-wide v13, v11
:goto_9f
invoke-virtual {v8}, Lcom/shopee/foody/push/core/message/PushMessage;->getData()Lcom/shopee/foody/push/core/message/PushDataSection;
move-result-object v10
if-eqz v10, :cond_ac
invoke-virtual {v10}, Lcom/shopee/foody/push/core/message/PushDataSection;->getChannel()I
move-result v10
move/from16 v16, v10
goto :goto_ae
:cond_ac
const/16 v16, 0x0
:goto_ae
invoke-virtual {v8}, Lcom/shopee/foody/push/core/message/PushMessage;->getData()Lcom/shopee/foody/push/core/message/PushDataSection;
move-result-object v10
if-eqz v10, :cond_c1
invoke-virtual {v10}, Lcom/shopee/foody/push/core/message/PushDataSection;->getBody()Lp5/l;
move-result-object v10
if-eqz v10, :cond_c1
invoke-virtual {v10}, Lp5/i;->toString()Ljava/lang/String;
move-result-object v10
if-eqz v10, :cond_c1
move-object v9, v10
:cond_c1
invoke-virtual {v8}, Lcom/shopee/foody/push/core/message/PushMessage;->getData()Lcom/shopee/foody/push/core/message/PushDataSection;
move-result-object v8
if-eqz v8, :cond_da
invoke-virtual {v8}, Lcom/shopee/foody/push/core/message/PushDataSection;->getCreate_time()Ljava/lang/String;
move-result-object v8
if-eqz v8, :cond_da
invoke-static {v8}, Lc9/i;->c(Ljava/lang/String;)Ljava/lang/Long;
move-result-object v8
if-eqz v8, :cond_da
invoke-virtual {v8}, Ljava/lang/Long;->longValue()J
move-result-wide v10
move-wide/from16 v17, v10
goto :goto_dc
:cond_da
move-wide/from16 v17, v11
:goto_dc
move-object v10, v15
move-wide v11, v13
move/from16 v13, v16
move-object v14, v9
move-object v8, v15
move-wide/from16 v15, v17
invoke-direct/range {v10 .. v16}, Lte/c;-><init>(JILjava/lang/String;J)V
invoke-interface {v0, v8}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_75
:cond_eb
:try_start_eb
sget-object v7, Lke/a;->e:Lke/a;
invoke-virtual {v7}, Lke/a;->b()Lcom/shopee/foody/driver/db/user/UserDB;
move-result-object v7
if-eqz v7, :cond_109
invoke-virtual {v7}, Lcom/shopee/foody/driver/db/user/UserDB;->s()Lte/a;
move-result-object v7
if-eqz v7, :cond_109
invoke-interface {v7, v0}, Lte/a;->a(Ljava/util/List;)Ljava/util/List;
move-result-object v0
:try_end_fd
.catch Ljava/lang/Exception; {:try_start_eb .. :try_end_fd} :catch_fe
goto :goto_10a
:catch_fe
move-exception v0
sget-object v7, Lqa/d;->e:Lqa/d$a;
new-instance v8, Lwf/e$d;
invoke-direct {v8, v0}, Lwf/e$d;-><init>(Ljava/lang/Exception;)V
invoke-virtual {v7, v1, v8}, Lqa/d$a;->e(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
:cond_109
move-object v0, v4
:goto_10a
if-eqz v0, :cond_115
invoke-interface {v0}, Ljava/util/Collection;->isEmpty()Z
move-result v7
if-eqz v7, :cond_113
goto :goto_115
:cond_113
const/4 v7, 0x0
goto :goto_116
:cond_115
:goto_115
const/4 v7, 0x1
:goto_116
if-eqz v7, :cond_125
sget-object v0, Lqa/d;->e:Lqa/d$a;
sget-object v2, Lwf/e$e;->a:Lwf/e$e;
invoke-virtual {v0, v1, v2}, Lqa/d$a;->e(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
new-instance v0, Ljava/util/ArrayList;
invoke-direct {v0}, Ljava/util/ArrayList;-><init>()V
return-object v0
:cond_125
invoke-static {v0}, Lkotlin/collections/CollectionsKt___CollectionsKt;->toSet(Ljava/lang/Iterable;)Ljava/util/Set;
move-result-object v0
new-instance v7, Ljava/util/LinkedHashMap;
invoke-direct {v7}, Ljava/util/LinkedHashMap;-><init>()V
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_132
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v8
if-eqz v8, :cond_16d
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v8
move-object v10, v8
check-cast v10, Lcom/shopee/foody/push/core/message/PushMessage;
invoke-virtual {v10}, Lcom/shopee/foody/push/core/message/PushMessage;->getData()Lcom/shopee/foody/push/core/message/PushDataSection;
move-result-object v10
if-eqz v10, :cond_150
invoke-virtual {v10}, Lcom/shopee/foody/push/core/message/PushDataSection;->getSeq_id()Ljava/lang/String;
move-result-object v10
if-eqz v10, :cond_150
invoke-static {v10}, Lc9/i;->c(Ljava/lang/String;)Ljava/lang/Long;
move-result-object v10
goto :goto_151
:cond_150
move-object v10, v4
:goto_151
invoke-static {v0, v10}, Lkotlin/collections/CollectionsKt___CollectionsKt;->contains(Ljava/lang/Iterable;Ljava/lang/Object;)Z
move-result v10
invoke-static {v10}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v10
invoke-interface {v7, v10}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v11
if-nez v11, :cond_167
new-instance v11, Ljava/util/ArrayList;
invoke-direct {v11}, Ljava/util/ArrayList;-><init>()V
invoke-interface {v7, v10, v11}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
:cond_167
check-cast v11, Ljava/util/List;
invoke-interface {v11, v8}, Ljava/util/List;->add(Ljava/lang/Object;)Z
goto :goto_132
:cond_16d
invoke-static {v5}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v0
invoke-interface {v7, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v0
check-cast v0, Ljava/util/List;
invoke-static {v6}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
move-result-object v2
invoke-interface {v7, v2}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v2
check-cast v2, Ljava/util/List;
if-eqz v2, :cond_1ae
new-instance v5, Ljava/util/ArrayList;
invoke-static {v2, v3}, Lkotlin/collections/CollectionsKt__IterablesKt;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
move-result v6
invoke-direct {v5, v6}, Ljava/util/ArrayList;-><init>(I)V
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_190
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v6
if-eqz v6, :cond_1af
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v6
check-cast v6, Lcom/shopee/foody/push/core/message/PushMessage;
invoke-virtual {v6}, Lcom/shopee/foody/push/core/message/PushMessage;->getData()Lcom/shopee/foody/push/core/message/PushDataSection;
move-result-object v6
if-eqz v6, :cond_1a9
invoke-virtual {v6}, Lcom/shopee/foody/push/core/message/PushDataSection;->getSeq_id()Ljava/lang/String;
move-result-object v6
if-eqz v6, :cond_1a9
goto :goto_1aa
:cond_1a9
move-object v6, v9
:goto_1aa
invoke-interface {v5, v6}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_190
:cond_1ae
move-object v5, v4
:cond_1af
sget-object v2, Lqa/d;->e:Lqa/d$a;
new-instance v6, Lwf/e$f;
invoke-direct {v6, v0, v5}, Lwf/e$f;-><init>(Ljava/util/List;Ljava/util/List;)V
invoke-virtual {v2, v1, v6}, Lqa/d$a;->c(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
if-eqz v5, :cond_1e3
new-instance v4, Ljava/util/ArrayList;
invoke-static {v5, v3}, Lkotlin/collections/CollectionsKt__IterablesKt;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
move-result v2
invoke-direct {v4, v2}, Ljava/util/ArrayList;-><init>(I)V
invoke-interface {v5}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_1c8
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_1e3
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
move-object v9, v3
check-cast v9, Ljava/lang/String;
sget-object v8, Lej/e;->d:Lej/e;
const/4 v10, 0x1
const/4 v11, 0x0
const/4 v12, 0x2
const/4 v13, 0x0
invoke-static/range {v8 .. v13}, Lej/e;->a(Lej/e;Ljava/lang/String;ZLjava/lang/String;ILjava/lang/Object;)Lcom/shopee/foody/push/core/message/PushItem;
move-result-object v3
invoke-interface {v4, v3}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
goto :goto_1c8
:cond_1e3
sget-object v2, Lej/e;->d:Lej/e;
invoke-virtual {v2, v4}, Lej/e;->a(Ljava/util/List;)V
sget-object v2, Ljd/b;->c:Ljd/b$a;
invoke-virtual {v2}, Ljd/b$a;->b()Z
move-result v2
if-eqz v2, :cond_217
sget-object v2, Lqa/d;->e:Lqa/d$a;
new-instance v3, Lwf/e$g;
invoke-direct {v3, v7}, Lwf/e$g;-><init>(Ljava/util/Map;)V
invoke-virtual {v2, v1, v3}, Lqa/d$a;->a(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
if-eqz v0, :cond_217
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
move-result-object v2
:goto_200
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v3
if-eqz v3, :cond_217
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v3
check-cast v3, Lcom/shopee/foody/push/core/message/PushMessage;
sget-object v4, Lqa/d;->e:Lqa/d$a;
new-instance v5, Lwf/e$h;
invoke-direct {v5, v3}, Lwf/e$h;-><init>(Lcom/shopee/foody/push/core/message/PushMessage;)V
invoke-virtual {v4, v1, v5}, Lqa/d$a;->a(Ljava/lang/String;Lkotlin/jvm/functions/Function0;)V
goto :goto_200
:cond_217
if-eqz v0, :cond_21a
goto :goto_21e
:cond_21a
invoke-static {}, Lkotlin/collections/CollectionsKt__CollectionsKt;->emptyList()Ljava/util/List;
move-result-object v0
:goto_21e
return-object v0
.end method