258 lines
7.2 KiB
Smali
258 lines
7.2 KiB
Smali
.class public Lcom/lytefast/flexinput/utils/SelectionCoordinator;
|
|
.super Ljava/lang/Object;
|
|
.source "SelectionCoordinator.kt"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lcom/lytefast/flexinput/utils/SelectionCoordinator$RestorationException;,
|
|
Lcom/lytefast/flexinput/utils/SelectionCoordinator$a;,
|
|
Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;
|
|
}
|
|
.end annotation
|
|
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"<I:",
|
|
"Ljava/lang/Object;",
|
|
"T::TI;>",
|
|
"Ljava/lang/Object;"
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# instance fields
|
|
.field public a:Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/recyclerview/widget/RecyclerView$Adapter<",
|
|
"*>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public final b:Landroidx/collection/ArrayMap;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Landroidx/collection/ArrayMap<",
|
|
"TT;",
|
|
"Ljava/lang/Integer;",
|
|
">;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
.field public c:Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener<",
|
|
"-TI;>;"
|
|
}
|
|
.end annotation
|
|
.end field
|
|
|
|
|
|
# direct methods
|
|
.method public constructor <init>()V
|
|
.locals 2
|
|
|
|
const/4 v0, 0x0
|
|
|
|
const/4 v1, 0x3
|
|
|
|
invoke-direct {p0, v0, v0, v1}, Lcom/lytefast/flexinput/utils/SelectionCoordinator;-><init>(Landroidx/collection/ArrayMap;Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;I)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public constructor <init>(Landroidx/collection/ArrayMap;Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;I)V
|
|
.locals 1
|
|
|
|
and-int/lit8 p1, p3, 0x1
|
|
|
|
const/4 p2, 0x0
|
|
|
|
if-eqz p1, :cond_0
|
|
|
|
new-instance p1, Landroidx/collection/ArrayMap;
|
|
|
|
const/4 v0, 0x4
|
|
|
|
invoke-direct {p1, v0}, Landroidx/collection/ArrayMap;-><init>(I)V
|
|
|
|
goto :goto_0
|
|
|
|
:cond_0
|
|
move-object p1, p2
|
|
|
|
:goto_0
|
|
and-int/lit8 p3, p3, 0x2
|
|
|
|
if-eqz p3, :cond_1
|
|
|
|
new-instance p2, Lf/b/a/e/c;
|
|
|
|
invoke-direct {p2}, Lf/b/a/e/c;-><init>()V
|
|
|
|
:cond_1
|
|
const-string p3, "selectedItemPositionMap"
|
|
|
|
invoke-static {p1, p3}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
const-string p3, "itemSelectionListener"
|
|
|
|
invoke-static {p2, p3}, Lc0/n/c/j;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
iput-object p1, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->b:Landroidx/collection/ArrayMap;
|
|
|
|
iput-object p2, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->c:Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
|
|
# virtual methods
|
|
.method public final a(Ljava/lang/Object;I)Z
|
|
.locals 1
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;I)Z"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->b:Landroidx/collection/ArrayMap;
|
|
|
|
invoke-virtual {v0, p1}, Landroidx/collection/SimpleArrayMap;->get(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Integer;
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
if-eq p2, v0, :cond_0
|
|
|
|
iget-object v0, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->b:Landroidx/collection/ArrayMap;
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object p2
|
|
|
|
invoke-interface {v0, p1, p2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
:cond_0
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
const/4 p1, 0x0
|
|
|
|
return p1
|
|
.end method
|
|
|
|
.method public final b(Ljava/lang/Object;I)V
|
|
.locals 3
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TT;I)V"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->b:Landroidx/collection/ArrayMap;
|
|
|
|
invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, p1, v1}, Landroidx/collection/SimpleArrayMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
iget-object v0, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
|
|
|
if-eqz v0, :cond_0
|
|
|
|
new-instance v1, Lcom/lytefast/flexinput/utils/SelectionCoordinator$a;
|
|
|
|
const/4 v2, 0x1
|
|
|
|
invoke-direct {v1, p1, v2}, Lcom/lytefast/flexinput/utils/SelectionCoordinator$a;-><init>(Ljava/lang/Object;Z)V
|
|
|
|
invoke-virtual {v0, p2, v1}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyItemChanged(ILjava/lang/Object;)V
|
|
|
|
:cond_0
|
|
iget-object p2, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->c:Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;
|
|
|
|
invoke-interface {p2, p1}, Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;->onItemSelected(Ljava/lang/Object;)V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public final c(Ljava/lang/Object;)Z
|
|
.locals 4
|
|
.annotation system Ldalvik/annotation/Signature;
|
|
value = {
|
|
"(TI;)Z"
|
|
}
|
|
.end annotation
|
|
|
|
iget-object v0, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->b:Landroidx/collection/ArrayMap;
|
|
|
|
if-eqz v0, :cond_2
|
|
|
|
invoke-static {v0}, Lc0/n/c/w;->asMutableMap(Ljava/lang/Object;)Ljava/util/Map;
|
|
|
|
move-result-object v0
|
|
|
|
invoke-interface {v0, p1}, Ljava/util/Map;->remove(Ljava/lang/Object;)Ljava/lang/Object;
|
|
|
|
move-result-object v0
|
|
|
|
check-cast v0, Ljava/lang/Integer;
|
|
|
|
const/4 v1, 0x0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I
|
|
|
|
move-result v0
|
|
|
|
iget-object v2, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->a:Landroidx/recyclerview/widget/RecyclerView$Adapter;
|
|
|
|
if-eqz v2, :cond_0
|
|
|
|
new-instance v3, Lcom/lytefast/flexinput/utils/SelectionCoordinator$a;
|
|
|
|
invoke-direct {v3, p1, v1}, Lcom/lytefast/flexinput/utils/SelectionCoordinator$a;-><init>(Ljava/lang/Object;Z)V
|
|
|
|
invoke-virtual {v2, v0, v3}, Landroidx/recyclerview/widget/RecyclerView$Adapter;->notifyItemChanged(ILjava/lang/Object;)V
|
|
|
|
:cond_0
|
|
iget-object v0, p0, Lcom/lytefast/flexinput/utils/SelectionCoordinator;->c:Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;
|
|
|
|
invoke-interface {v0, p1}, Lcom/lytefast/flexinput/utils/SelectionCoordinator$ItemSelectionListener;->onItemUnselected(Ljava/lang/Object;)V
|
|
|
|
const/4 p1, 0x1
|
|
|
|
return p1
|
|
|
|
:cond_1
|
|
return v1
|
|
|
|
:cond_2
|
|
new-instance p1, Ljava/lang/NullPointerException;
|
|
|
|
const-string v0, "null cannot be cast to non-null type kotlin.collections.MutableMap<K, V>"
|
|
|
|
invoke-direct {p1, v0}, Ljava/lang/NullPointerException;-><init>(Ljava/lang/String;)V
|
|
|
|
throw p1
|
|
.end method
|