2020-11-12 02:11:44 +00:00
|
|
|
.class public final Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;
|
2020-11-14 03:19:56 +00:00
|
|
|
.super Ly/m/c/k;
|
2020-11-12 02:11:44 +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-11-14 03:19:56 +00:00
|
|
|
"Ly/m/c/k;",
|
2020-11-12 02:11:44 +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-11-14 03:19:56 +00:00
|
|
|
invoke-direct {p0, p1}, Ly/m/c/k;-><init>(I)V
|
2020-11-12 02:11:44 +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
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
sget-object v0, Ly/h/l;->d:Ly/h/l;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-virtual {p1}, Lkotlin/Pair;->component1()Ljava/lang/Object;
|
2020-11-13 19:18:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result-object v1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
check-cast v1, Ljava/util/List;
|
|
|
|
|
|
|
|
invoke-virtual {p1}, Lkotlin/Pair;->component2()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object p1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
check-cast p1, Lcom/discord/utilities/images/MGImagesBitmap$CloseableBitmaps;
|
2020-11-14 02:19:59 +00:00
|
|
|
|
2020-11-12 02:11:44 +00:00
|
|
|
:try_start_0
|
|
|
|
const-string v2, "channelAndIconUriPairs"
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-static {v1, v2}, Ly/m/c/j;->checkNotNullExpressionValue(Ljava/lang/Object;Ljava/lang/String;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
new-instance v2, Ljava/util/LinkedHashMap;
|
|
|
|
|
|
|
|
invoke-direct {v2}, Ljava/util/LinkedHashMap;-><init>()V
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result-object v1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:goto_0
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result v3
|
|
|
|
|
|
|
|
if-eqz v3, :cond_1
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
move-result-object v3
|
|
|
|
|
|
|
|
move-object v4, v3
|
|
|
|
|
|
|
|
check-cast v4, Lkotlin/Pair;
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-virtual {v4}, Lkotlin/Pair;->component1()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-virtual {v3}, Lkotlin/Pair;->component1()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v4
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
check-cast v4, Lcom/discord/utilities/ChannelShortcutInfo;
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-virtual {v3}, Lkotlin/Pair;->component2()Ljava/lang/Object;
|
|
|
|
|
|
|
|
move-result-object v3
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
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
|
2020-11-14 03:19:56 +00:00
|
|
|
sget-object v1, Ljava/lang/Boolean;->FALSE:Ljava/lang/Boolean;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-interface {v2, v1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result-object v1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
if-eqz v1, :cond_2
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
goto :goto_1
|
|
|
|
|
|
|
|
:cond_2
|
2020-11-14 03:19:56 +00:00
|
|
|
move-object v1, v0
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:goto_1
|
2020-11-14 03:19:56 +00:00
|
|
|
check-cast v1, Ljava/util/List;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-object v0, v2
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:cond_3
|
2020-11-14 03:19:56 +00:00
|
|
|
check-cast v0, Ljava/util/List;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
sget v2, Landroid/os/Build$VERSION;->SDK_INT:I
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
const/16 v3, 0x19
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
if-lt v2, v3, :cond_5
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
const-class v3, Landroid/content/pm/ShortcutManager;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-virtual {v2, v3}, Landroid/content/Context;->getSystemService(Ljava/lang/Class;)Ljava/lang/Object;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result-object v2
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
check-cast v2, Landroid/content/pm/ShortcutManager;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
if-eqz v2, :cond_6
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
new-instance v3, Ljava/util/ArrayList;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
const/16 v4, 0xa
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-static {v1, v4}, Lf/h/a/f/f/n/f;->collectionSizeOrDefault(Ljava/lang/Iterable;I)I
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result v4
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-direct {v3, v4}, Ljava/util/ArrayList;-><init>(I)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result-object v1
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
:goto_2
|
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result v4
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
if-eqz v4, :cond_4
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result-object v4
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
check-cast v4, Landroidx/core/content/pm/ShortcutInfoCompat;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-virtual {v4}, Landroidx/core/content/pm/ShortcutInfoCompat;->toShortcutInfo()Landroid/content/pm/ShortcutInfo;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
move-result-object v4
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-interface {v3, v4}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
|
2020-11-14 02:19:59 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
goto :goto_2
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:cond_4
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-virtual {v2, v3}, Landroid/content/pm/ShortcutManager;->setDynamicShortcuts(Ljava/util/List;)Z
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
goto :goto_3
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:cond_5
|
2020-11-14 03:19:56 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-static {v2}, Landroidx/core/content/pm/ShortcutManagerCompat;->removeAllDynamicShortcuts(Landroid/content/Context;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
iget-object v2, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-static {v2, v1}, Landroidx/core/content/pm/ShortcutManagerCompat;->addDynamicShortcuts(Landroid/content/Context;Ljava/util/List;)Z
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
:cond_6
|
2020-11-14 03:19:56 +00:00
|
|
|
:goto_3
|
|
|
|
iget-object v1, p0, Lcom/discord/utilities/ShareUtils$updateDirectShareTargets$5;->$context:Landroid/content/Context;
|
2020-11-12 02:11:44 +00:00
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
invoke-static {v1, v0}, Landroidx/core/content/pm/ShortcutManagerCompat;->updateShortcuts(Landroid/content/Context;Ljava/util/List;)Z
|
2020-11-12 02:11:44 +00:00
|
|
|
:try_end_0
|
|
|
|
.catchall {:try_start_0 .. :try_end_0} :catchall_0
|
|
|
|
|
2020-11-14 03:19:56 +00:00
|
|
|
const/4 v0, 0x0
|
|
|
|
|
|
|
|
invoke-static {p1, v0}, Lf/h/a/f/f/n/f;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
2020-11-12 02:11:44 +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-11-14 03:19:56 +00:00
|
|
|
invoke-static {p1, v0}, Lf/h/a/f/f/n/f;->closeFinally(Ljava/io/Closeable;Ljava/lang/Throwable;)V
|
2020-11-12 02:11:44 +00:00
|
|
|
|
|
|
|
throw v1
|
|
|
|
.end method
|