.class public Lj/e$a;
.super Ljava/lang/Object;
.source ""

# interfaces
.implements Lj/a$a;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lj/e;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "a"
.end annotation


# instance fields
.field public final a:Landroid/view/ActionMode$Callback;

.field public final b:Landroid/content/Context;

.field public final c:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList<",
            "Lj/e;",
            ">;"
        }
    .end annotation
.end field

.field public final d:Lr/h;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lr/h<",
            "Landroid/view/Menu;",
            "Landroid/view/Menu;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/view/ActionMode$Callback;)V
    .registers 3

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    iput-object p1, p0, Lj/e$a;->b:Landroid/content/Context;

    iput-object p2, p0, Lj/e$a;->a:Landroid/view/ActionMode$Callback;

    new-instance p1, Ljava/util/ArrayList;

    invoke-direct {p1}, Ljava/util/ArrayList;-><init>()V

    iput-object p1, p0, Lj/e$a;->c:Ljava/util/ArrayList;

    new-instance p1, Lr/h;

    invoke-direct {p1}, Lr/h;-><init>()V

    iput-object p1, p0, Lj/e$a;->d:Lr/h;

    return-void
.end method


# virtual methods
.method public a(Lj/a;Landroid/view/MenuItem;)Z
    .registers 6

    iget-object v0, p0, Lj/e$a;->a:Landroid/view/ActionMode$Callback;

    invoke-virtual {p0, p1}, Lj/e$a;->e(Lj/a;)Landroid/view/ActionMode;

    move-result-object p1

    new-instance v1, Lk/c;

    iget-object v2, p0, Lj/e$a;->b:Landroid/content/Context;

    check-cast p2, Lg0/b;

    invoke-direct {v1, v2, p2}, Lk/c;-><init>(Landroid/content/Context;Lg0/b;)V

    invoke-interface {v0, p1, v1}, Landroid/view/ActionMode$Callback;->onActionItemClicked(Landroid/view/ActionMode;Landroid/view/MenuItem;)Z

    move-result p1

    return p1
.end method

.method public b(Lj/a;Landroid/view/Menu;)Z
    .registers 4

    iget-object v0, p0, Lj/e$a;->a:Landroid/view/ActionMode$Callback;

    invoke-virtual {p0, p1}, Lj/e$a;->e(Lj/a;)Landroid/view/ActionMode;

    move-result-object p1

    invoke-virtual {p0, p2}, Lj/e$a;->f(Landroid/view/Menu;)Landroid/view/Menu;

    move-result-object p2

    invoke-interface {v0, p1, p2}, Landroid/view/ActionMode$Callback;->onCreateActionMode(Landroid/view/ActionMode;Landroid/view/Menu;)Z

    move-result p1

    return p1
.end method

.method public c(Lj/a;)V
    .registers 3

    iget-object v0, p0, Lj/e$a;->a:Landroid/view/ActionMode$Callback;

    invoke-virtual {p0, p1}, Lj/e$a;->e(Lj/a;)Landroid/view/ActionMode;

    move-result-object p1

    invoke-interface {v0, p1}, Landroid/view/ActionMode$Callback;->onDestroyActionMode(Landroid/view/ActionMode;)V

    return-void
.end method

.method public d(Lj/a;Landroid/view/Menu;)Z
    .registers 4

    iget-object v0, p0, Lj/e$a;->a:Landroid/view/ActionMode$Callback;

    invoke-virtual {p0, p1}, Lj/e$a;->e(Lj/a;)Landroid/view/ActionMode;

    move-result-object p1

    invoke-virtual {p0, p2}, Lj/e$a;->f(Landroid/view/Menu;)Landroid/view/Menu;

    move-result-object p2

    invoke-interface {v0, p1, p2}, Landroid/view/ActionMode$Callback;->onPrepareActionMode(Landroid/view/ActionMode;Landroid/view/Menu;)Z

    move-result p1

    return p1
.end method

.method public e(Lj/a;)Landroid/view/ActionMode;
    .registers 6

    iget-object v0, p0, Lj/e$a;->c:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    const/4 v1, 0x0

    :goto_7
    if-ge v1, v0, :cond_1b

    iget-object v2, p0, Lj/e$a;->c:Ljava/util/ArrayList;

    invoke-virtual {v2, v1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v2

    check-cast v2, Lj/e;

    if-eqz v2, :cond_18

    iget-object v3, v2, Lj/e;->b:Lj/a;

    if-ne v3, p1, :cond_18

    return-object v2

    :cond_18
    add-int/lit8 v1, v1, 0x1

    goto :goto_7

    :cond_1b
    new-instance v0, Lj/e;

    iget-object v1, p0, Lj/e$a;->b:Landroid/content/Context;

    invoke-direct {v0, v1, p1}, Lj/e;-><init>(Landroid/content/Context;Lj/a;)V

    iget-object p1, p0, Lj/e$a;->c:Ljava/util/ArrayList;

    invoke-virtual {p1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z

    return-object v0
.end method

.method public final f(Landroid/view/Menu;)Landroid/view/Menu;
    .registers 5

    iget-object v0, p0, Lj/e$a;->d:Lr/h;

    const/4 v1, 0x0

    .line 1
    invoke-virtual {v0, p1, v1}, Lr/h;->getOrDefault(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    move-result-object v0

    .line 2
    check-cast v0, Landroid/view/Menu;

    if-nez v0, :cond_1a

    new-instance v0, Lk/e;

    iget-object v1, p0, Lj/e$a;->b:Landroid/content/Context;

    move-object v2, p1

    check-cast v2, Lg0/a;

    invoke-direct {v0, v1, v2}, Lk/e;-><init>(Landroid/content/Context;Lg0/a;)V

    iget-object v1, p0, Lj/e$a;->d:Lr/h;

    invoke-virtual {v1, p1, v0}, Lr/h;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;

    :cond_1a
    return-object v0
.end method
