2020-07-14 22:43:59 +00:00
|
|
|
.class public final Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$7;
|
2020-09-22 06:09:03 +00:00
|
|
|
.super Lk0/n/c/j;
|
2020-07-14 22:43:59 +00:00
|
|
|
.source "ShareUtils.kt"
|
|
|
|
|
|
|
|
# interfaces
|
|
|
|
.implements Lkotlin/jvm/functions/Function1;
|
|
|
|
|
|
|
|
|
|
|
|
# annotations
|
|
|
|
.annotation system Ldalvik/annotation/EnclosingMethod;
|
|
|
|
value = Lcom/discord/utilities/ShareUtils;->updateDirectShareTargets(Landroid/content/Context;)V
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/InnerClass;
|
|
|
|
accessFlags = 0x19
|
|
|
|
name = null
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
2020-09-22 06:09:03 +00:00
|
|
|
"Lk0/n/c/j;",
|
2020-07-14 22:43:59 +00:00
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
">;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final synthetic $context:Landroid/content/Context;
|
|
|
|
|
|
|
|
.field public final synthetic $shortcutManager:Landroid/content/pm/ShortcutManager;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroid/content/pm/ShortcutManager;Landroid/content/Context;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$7;->$shortcutManager:Landroid/content/pm/ShortcutManager;
|
|
|
|
|
|
|
|
iput-object p2, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$7;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-direct {p0, p1}, Lk0/n/c/j;-><init>(I)V
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
.end method
|
|
|
|
|
|
|
|
|
|
|
|
# virtual methods
|
|
|
|
.method public bridge synthetic invoke(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
check-cast p1, Ljava/util/Map;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$7;->invoke(Ljava/util/Map;)V
|
|
|
|
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final invoke(Ljava/util/Map;)V
|
|
|
|
.locals 5
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Ljava/util/Map<",
|
|
|
|
"Ljava/lang/Long;",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/models/domain/ModelChannel;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$7;->$shortcutManager:Landroid/content/pm/ShortcutManager;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
invoke-virtual {v0}, Landroid/content/pm/ShortcutManager;->getDynamicShortcuts()Ljava/util/List;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_0
|
2020-09-22 06:09:03 +00:00
|
|
|
sget-object v0, Lk0/i/l;->d:Lk0/i/l;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
:goto_0
|
|
|
|
new-instance v1, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v1}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
:goto_1
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v2
|
|
|
|
|
|
|
|
const-string v3, "it"
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
move-object v4, v2
|
|
|
|
|
|
|
|
check-cast v4, Landroid/content/pm/ShortcutInfo;
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {v4, v3}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
invoke-virtual {v4}, Landroid/content/pm/ShortcutInfo;->isPinned()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_2
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Landroid/content/pm/ShortcutInfo;->getId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
const-string v4, "it.id"
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {v3, v4}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
invoke-static {v3}, Ljava/lang/Long;->parseLong(Ljava/lang/String;)J
|
|
|
|
|
|
|
|
move-result-wide v3
|
|
|
|
|
|
|
|
invoke-static {v3, v4}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {p1, v3}, Ljava/util/Map;->containsKey(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-nez v3, :cond_2
|
|
|
|
|
|
|
|
const/4 v3, 0x1
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_2
|
|
|
|
const/4 v3, 0x0
|
|
|
|
|
|
|
|
:goto_2
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v1, v2}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_3
|
|
|
|
new-instance p1, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
const/16 v0, 0xa
|
|
|
|
|
2020-09-16 23:45:23 +00:00
|
|
|
invoke-static {v1, v0}, Lf/h/a/f/e/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result v0
|
|
|
|
|
|
|
|
invoke-direct {p1, v0}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v1
|
|
|
|
|
|
|
|
if-eqz v1, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
check-cast v1, Landroid/content/pm/ShortcutInfo;
|
|
|
|
|
2020-09-22 06:09:03 +00:00
|
|
|
invoke-static {v1, v3}, Lk0/n/c/i;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
invoke-virtual {v1}, Landroid/content/pm/ShortcutInfo;->getId()Ljava/lang/String;
|
|
|
|
|
|
|
|
move-result-object v1
|
|
|
|
|
|
|
|
invoke-interface {p1, v1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$7;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
invoke-static {v0, p1}, Landroidx/core/content/pm/ShortcutManagerCompat;->removeDynamicShortcuts(Landroid/content/Context;Ljava/util/List;)V
|
|
|
|
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$7;->$shortcutManager:Landroid/content/pm/ShortcutManager;
|
|
|
|
|
|
|
|
if-eqz v0, :cond_5
|
|
|
|
|
|
|
|
invoke-virtual {v0, p1}, Landroid/content/pm/ShortcutManager;->disableShortcuts(Ljava/util/List;)V
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
return-void
|
|
|
|
.end method
|