2020-07-14 22:43:59 +00:00
|
|
|
.class public final Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;
|
2020-09-16 21:45:36 +00:00
|
|
|
.super Lk0/n/c/i;
|
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-16 21:45:36 +00:00
|
|
|
"Lk0/n/c/i;",
|
2020-07-14 22:43:59 +00:00
|
|
|
"Lkotlin/jvm/functions/Function1<",
|
|
|
|
"Lkotlin/Pair<",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"+",
|
|
|
|
"Lkotlin/Pair<",
|
|
|
|
"+",
|
|
|
|
"Lcom/discord/utilities/ChannelShortcutInfo;",
|
|
|
|
"+",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;>;+",
|
|
|
|
"Lcom/discord/utilities/images/MGImagesBitmap$CloseableBitmaps;",
|
|
|
|
">;",
|
|
|
|
"Lkotlin/Unit;",
|
|
|
|
">;"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
|
|
|
|
# instance fields
|
|
|
|
.field public final synthetic $context:Landroid/content/Context;
|
|
|
|
|
|
|
|
|
|
|
|
# direct methods
|
|
|
|
.method public constructor <init>(Landroid/content/Context;)V
|
|
|
|
.locals 0
|
|
|
|
|
|
|
|
iput-object p1, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
const/4 p1, 0x1
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-direct {p0, p1}, Lk0/n/c/i;-><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, Lkotlin/Pair;
|
|
|
|
|
|
|
|
invoke-virtual {p0, p1}, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->invoke(Lkotlin/Pair;)V
|
|
|
|
|
|
|
|
sget-object p1, Lkotlin/Unit;->a:Lkotlin/Unit;
|
|
|
|
|
|
|
|
return-object p1
|
|
|
|
.end method
|
|
|
|
|
|
|
|
.method public final invoke(Lkotlin/Pair;)V
|
|
|
|
.locals 9
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
|
|
value = {
|
|
|
|
"(",
|
|
|
|
"Lkotlin/Pair<",
|
|
|
|
"+",
|
|
|
|
"Ljava/util/List<",
|
|
|
|
"Lkotlin/Pair<",
|
|
|
|
"Lcom/discord/utilities/ChannelShortcutInfo;",
|
|
|
|
"Ljava/lang/String;",
|
|
|
|
">;>;",
|
|
|
|
"Lcom/discord/utilities/images/MGImagesBitmap$CloseableBitmaps;",
|
|
|
|
">;)V"
|
|
|
|
}
|
|
|
|
.end annotation
|
|
|
|
|
|
|
|
iget-object v0, p1, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
|
|
|
|
check-cast v0, Ljava/util/List;
|
|
|
|
|
|
|
|
iget-object p1, p1, Lkotlin/Pair;->second:Ljava/lang/Object;
|
|
|
|
|
|
|
|
check-cast p1, Lcom/discord/utilities/images/MGImagesBitmap$CloseableBitmaps;
|
|
|
|
|
|
|
|
const/4 v1, 0x0
|
|
|
|
|
|
|
|
:try_start_0
|
|
|
|
const-string v2, "channelAndIconUriPairs"
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v0, v2}, Lk0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
new-instance v2, Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_0
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
move-object v4, v3
|
|
|
|
|
|
|
|
check-cast v4, Lkotlin/Pair;
|
|
|
|
|
|
|
|
iget-object v4, v4, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/utilities/ChannelShortcutInfo;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/utilities/ChannelShortcutInfo;->isPinnedOnly()Z
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
invoke-static {v4}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
move-result-object v4
|
|
|
|
|
|
|
|
invoke-interface {v2, v4}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
if-nez v5, :cond_0
|
|
|
|
|
|
|
|
new-instance v5, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
invoke-direct {v5}, Ljava/util/ArrayList;-><init>()V
|
|
|
|
|
|
|
|
invoke-interface {v2, v4, v5}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
:cond_0
|
|
|
|
check-cast v5, Ljava/util/List;
|
|
|
|
|
|
|
|
check-cast v3, Lkotlin/Pair;
|
|
|
|
|
|
|
|
iget-object v4, v3, Lkotlin/Pair;->first:Ljava/lang/Object;
|
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/utilities/ChannelShortcutInfo;
|
|
|
|
|
|
|
|
iget-object v3, v3, Lkotlin/Pair;->second:Ljava/lang/Object;
|
|
|
|
|
|
|
|
check-cast v3, Ljava/lang/String;
|
|
|
|
|
|
|
|
sget-object v6, Lcom/discord/utilities/ShareUtils;->INSTANCE:Lcom/discord/utilities/ShareUtils;
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/utilities/ChannelShortcutInfo;->getChannel()Lcom/discord/models/domain/ModelChannel;
|
|
|
|
|
|
|
|
move-result-object v7
|
|
|
|
|
|
|
|
iget-object v8, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
invoke-virtual {p1, v3}, Lcom/discord/utilities/images/MGImagesBitmap$CloseableBitmaps;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Landroid/graphics/Bitmap;
|
|
|
|
|
|
|
|
invoke-static {v3}, Landroidx/core/graphics/drawable/IconCompat;->createWithAdaptiveBitmap(Landroid/graphics/Bitmap;)Landroidx/core/graphics/drawable/IconCompat;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-virtual {v4}, Lcom/discord/utilities/ChannelShortcutInfo;->getRank()I
|
|
|
|
|
|
|
|
move-result v4
|
|
|
|
|
|
|
|
invoke-static {v6, v7, v8, v3, v4}, Lcom/discord/utilities/ShareUtils;->access$toShortcutInfo(Lcom/discord/utilities/ShareUtils;Lcom/discord/models/domain/ModelChannel;Landroid/content/Context;Landroidx/core/graphics/drawable/IconCompat;I)Landroidx/core/content/pm/ShortcutInfoCompat;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
invoke-interface {v5, v3}, Ljava/util/List;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_0
|
|
|
|
|
|
|
|
:cond_1
|
|
|
|
sget-object v0, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
invoke-interface {v2, v0}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
2020-09-16 21:45:36 +00:00
|
|
|
sget-object v0, Lk0/i/n;->d:Lk0/i/n;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
:goto_1
|
|
|
|
check-cast v0, Ljava/util/List;
|
|
|
|
|
|
|
|
sget-object v3, Ljava/lang/Boolean;->TRUE:Ljava/lang/Boolean;
|
|
|
|
|
|
|
|
invoke-interface {v2, v3}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v2
|
|
|
|
|
|
|
|
if-eqz v2, :cond_3
|
|
|
|
|
|
|
|
goto :goto_2
|
|
|
|
|
|
|
|
:cond_3
|
2020-09-16 21:45:36 +00:00
|
|
|
sget-object v2, Lk0/i/n;->d:Lk0/i/n;
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
:goto_2
|
|
|
|
check-cast v2, Ljava/util/List;
|
|
|
|
|
|
|
|
sget v3, Landroid/os/Build$VERSION;->SDK_INT:I
|
|
|
|
|
|
|
|
const/16 v4, 0x19
|
|
|
|
|
|
|
|
if-lt v3, v4, :cond_5
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
const-class v4, Landroid/content/pm/ShortcutManager;
|
|
|
|
|
|
|
|
invoke-virtual {v3, v4}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
check-cast v3, Landroid/content/pm/ShortcutManager;
|
|
|
|
|
|
|
|
if-eqz v3, :cond_6
|
|
|
|
|
|
|
|
new-instance v4, Ljava/util/ArrayList;
|
|
|
|
|
|
|
|
const/16 v5, 0xa
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {v0, v5}, Lf/n/a/k/a;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
invoke-direct {v4, v5}, Ljava/util/ArrayList;-><init>(I)V
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
|
|
|
|
|
|
|
move-result-object v0
|
|
|
|
|
|
|
|
:goto_3
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
|
|
|
|
|
|
|
|
move-result v5
|
|
|
|
|
|
|
|
if-eqz v5, :cond_4
|
|
|
|
|
|
|
|
invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
check-cast v5, Landroidx/core/content/pm/ShortcutInfoCompat;
|
|
|
|
|
|
|
|
invoke-virtual {v5}, Landroidx/core/content/pm/ShortcutInfoCompat;->toShortcutInfo()Landroid/content/pm/ShortcutInfo;
|
|
|
|
|
|
|
|
move-result-object v5
|
|
|
|
|
|
|
|
invoke-interface {v4, v5}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
|
|
|
|
|
|
|
goto :goto_3
|
|
|
|
|
|
|
|
:cond_4
|
|
|
|
invoke-virtual {v3, v4}, Landroid/content/pm/ShortcutManager;->setDynamicShortcuts(Ljava/util/List;)Z
|
|
|
|
|
|
|
|
goto :goto_4
|
|
|
|
|
|
|
|
:cond_5
|
|
|
|
iget-object v3, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
invoke-static {v3}, Landroidx/core/content/pm/ShortcutManagerCompat;->removeAllDynamicShortcuts(Landroid/content/Context;)V
|
|
|
|
|
|
|
|
iget-object v3, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
invoke-static {v3, v0}, Landroidx/core/content/pm/ShortcutManagerCompat;->addDynamicShortcuts(Landroid/content/Context;Ljava/util/List;)Z
|
|
|
|
|
|
|
|
:cond_6
|
|
|
|
:goto_4
|
|
|
|
iget-object v0, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
|
|
|
|
|
|
|
invoke-static {v0, v2}, Landroidx/core/content/pm/ShortcutManagerCompat;->updateShortcuts(Landroid/content/Context;Ljava/util/List;)Z
|
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {p1, v1}, Lf/n/a/k/a;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
return-void
|
|
|
|
|
|
|
|
:catchall_0
|
|
|
|
move-exception v0
|
|
|
|
|
|
|
|
:try_start_1
|
|
|
|
throw v0
|
|
|
|
:try_end_1
|
|
|
|
.catchall {:try_start_1 .. :try_end_1} :catchall_1
|
|
|
|
|
|
|
|
:catchall_1
|
|
|
|
move-exception v1
|
|
|
|
|
2020-09-16 21:45:36 +00:00
|
|
|
invoke-static {p1, v0}, Lf/n/a/k/a;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
2020-07-14 22:43:59 +00:00
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|