.class public Lcom/google/android/material/datepicker/s;
.super Landroid/widget/BaseAdapter;
.source ""


# static fields
.field public static final w:I


# instance fields
.field public final r:Lcom/google/android/material/datepicker/r;

.field public final s:Lcom/google/android/material/datepicker/c;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Lcom/google/android/material/datepicker/c<",
            "*>;"
        }
    .end annotation
.end field

.field public t:Ljava/util/Collection;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/Collection<",
            "Ljava/lang/Long;",
            ">;"
        }
    .end annotation
.end field

.field public u:Lz5/uk;

.field public final v:Lcom/google/android/material/datepicker/a;


# direct methods
.method public static constructor <clinit>()V
    .registers 2

    invoke-static {}, Lcom/google/android/material/datepicker/z;->e()Ljava/util/Calendar;

    move-result-object v0

    const/4 v1, 0x4

    invoke-virtual {v0, v1}, Ljava/util/Calendar;->getMaximum(I)I

    move-result v0

    sput v0, Lcom/google/android/material/datepicker/s;->w:I

    return-void
.end method

.method public constructor <init>(Lcom/google/android/material/datepicker/r;Lcom/google/android/material/datepicker/c;Lcom/google/android/material/datepicker/a;)V
    .registers 4
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Lcom/google/android/material/datepicker/r;",
            "Lcom/google/android/material/datepicker/c<",
            "*>;",
            "Lcom/google/android/material/datepicker/a;",
            ")V"
        }
    .end annotation

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    iput-object p1, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    iput-object p2, p0, Lcom/google/android/material/datepicker/s;->s:Lcom/google/android/material/datepicker/c;

    iput-object p3, p0, Lcom/google/android/material/datepicker/s;->v:Lcom/google/android/material/datepicker/a;

    invoke-interface {p2}, Lcom/google/android/material/datepicker/c;->q()Ljava/util/Collection;

    move-result-object p1

    iput-object p1, p0, Lcom/google/android/material/datepicker/s;->t:Ljava/util/Collection;

    return-void
.end method


# virtual methods
.method public a(I)I
    .registers 3

    add-int/lit8 p1, p1, -0x1

    invoke-virtual {p0}, Lcom/google/android/material/datepicker/s;->b()I

    move-result v0

    add-int/2addr v0, p1

    return v0
.end method

.method public b()I
    .registers 2

    iget-object v0, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    invoke-virtual {v0}, Lcom/google/android/material/datepicker/r;->d()I

    move-result v0

    return v0
.end method

.method public c(I)Ljava/lang/Long;
    .registers 4

    iget-object v0, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    invoke-virtual {v0}, Lcom/google/android/material/datepicker/r;->d()I

    move-result v0

    if-lt p1, v0, :cond_2b

    invoke-virtual {p0}, Lcom/google/android/material/datepicker/s;->d()I

    move-result v0

    if-le p1, v0, :cond_f

    goto :goto_2b

    :cond_f
    iget-object v0, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    .line 1
    invoke-virtual {v0}, Lcom/google/android/material/datepicker/r;->d()I

    move-result v1

    sub-int/2addr p1, v1

    add-int/lit8 p1, p1, 0x1

    .line 2
    iget-object v0, v0, Lcom/google/android/material/datepicker/r;->r:Ljava/util/Calendar;

    invoke-static {v0}, Lcom/google/android/material/datepicker/z;->b(Ljava/util/Calendar;)Ljava/util/Calendar;

    move-result-object v0

    const/4 v1, 0x5

    invoke-virtual {v0, v1, p1}, Ljava/util/Calendar;->set(II)V

    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v0

    .line 3
    invoke-static {v0, v1}, Ljava/lang/Long;->valueOf(J)Ljava/lang/Long;

    move-result-object p1

    return-object p1

    :cond_2b
    :goto_2b
    const/4 p1, 0x0

    return-object p1
.end method

.method public d()I
    .registers 3

    iget-object v0, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    invoke-virtual {v0}, Lcom/google/android/material/datepicker/r;->d()I

    move-result v0

    iget-object v1, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    iget v1, v1, Lcom/google/android/material/datepicker/r;->v:I

    add-int/2addr v0, v1

    add-int/lit8 v0, v0, -0x1

    return v0
.end method

.method public final e(Landroid/widget/TextView;J)V
    .registers 11

    if-nez p1, :cond_3

    return-void

    :cond_3
    iget-object v0, p0, Lcom/google/android/material/datepicker/s;->v:Lcom/google/android/material/datepicker/a;

    .line 1
    iget-object v0, v0, Lcom/google/android/material/datepicker/a;->t:Lcom/google/android/material/datepicker/a$c;

    .line 2
    invoke-interface {v0, p2, p3}, Lcom/google/android/material/datepicker/a$c;->m(J)Z

    move-result v0

    const/4 v1, 0x0

    if-eqz v0, :cond_56

    const/4 v0, 0x1

    invoke-virtual {p1, v0}, Landroid/widget/TextView;->setEnabled(Z)V

    .line 3
    iget-object v2, p0, Lcom/google/android/material/datepicker/s;->s:Lcom/google/android/material/datepicker/c;

    invoke-interface {v2}, Lcom/google/android/material/datepicker/c;->q()Ljava/util/Collection;

    move-result-object v2

    invoke-interface {v2}, Ljava/util/Collection;->iterator()Ljava/util/Iterator;

    move-result-object v2

    :cond_1c
    invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z

    move-result v3

    if-eqz v3, :cond_39

    invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v3

    check-cast v3, Ljava/lang/Long;

    invoke-virtual {v3}, Ljava/lang/Long;->longValue()J

    move-result-wide v3

    invoke-static {p2, p3}, Lcom/google/android/material/datepicker/z;->a(J)J

    move-result-wide v5

    invoke-static {v3, v4}, Lcom/google/android/material/datepicker/z;->a(J)J

    move-result-wide v3

    cmp-long v3, v5, v3

    if-nez v3, :cond_1c

    move v1, v0

    :cond_39
    if-eqz v1, :cond_40

    .line 4
    iget-object p2, p0, Lcom/google/android/material/datepicker/s;->u:Lz5/uk;

    iget-object p2, p2, Lz5/uk;->b:Ljava/lang/Object;

    goto :goto_5d

    :cond_40
    invoke-static {}, Lcom/google/android/material/datepicker/z;->d()Ljava/util/Calendar;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v0

    cmp-long p2, v0, p2

    if-nez p2, :cond_51

    iget-object p2, p0, Lcom/google/android/material/datepicker/s;->u:Lz5/uk;

    iget-object p2, p2, Lz5/uk;->c:Ljava/lang/Object;

    goto :goto_5d

    :cond_51
    iget-object p2, p0, Lcom/google/android/material/datepicker/s;->u:Lz5/uk;

    iget-object p2, p2, Lz5/uk;->a:Ljava/lang/Object;

    goto :goto_5d

    :cond_56
    invoke-virtual {p1, v1}, Landroid/widget/TextView;->setEnabled(Z)V

    iget-object p2, p0, Lcom/google/android/material/datepicker/s;->u:Lz5/uk;

    iget-object p2, p2, Lz5/uk;->g:Ljava/lang/Object;

    :goto_5d
    check-cast p2, Lcom/google/android/material/datepicker/b;

    invoke-virtual {p2, p1}, Lcom/google/android/material/datepicker/b;->b(Landroid/widget/TextView;)V

    return-void
.end method

.method public final f(Lcom/google/android/material/datepicker/MaterialCalendarGridView;J)V
    .registers 6

    invoke-static {p2, p3}, Lcom/google/android/material/datepicker/r;->c(J)Lcom/google/android/material/datepicker/r;

    move-result-object v0

    iget-object v1, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    invoke-virtual {v0, v1}, Lcom/google/android/material/datepicker/r;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_32

    iget-object v0, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    .line 1
    iget-object v0, v0, Lcom/google/android/material/datepicker/r;->r:Ljava/util/Calendar;

    invoke-static {v0}, Lcom/google/android/material/datepicker/z;->b(Ljava/util/Calendar;)Ljava/util/Calendar;

    move-result-object v0

    invoke-virtual {v0, p2, p3}, Ljava/util/Calendar;->setTimeInMillis(J)V

    const/4 v1, 0x5

    invoke-virtual {v0, v1}, Ljava/util/Calendar;->get(I)I

    move-result v0

    .line 2
    invoke-virtual {p1}, Lcom/google/android/material/datepicker/MaterialCalendarGridView;->a()Lcom/google/android/material/datepicker/s;

    move-result-object v1

    invoke-virtual {v1, v0}, Lcom/google/android/material/datepicker/s;->a(I)I

    move-result v0

    invoke-virtual {p1}, Landroid/widget/GridView;->getFirstVisiblePosition()I

    move-result v1

    sub-int/2addr v0, v1

    invoke-virtual {p1, v0}, Landroid/widget/GridView;->getChildAt(I)Landroid/view/View;

    move-result-object p1

    check-cast p1, Landroid/widget/TextView;

    invoke-virtual {p0, p1, p2, p3}, Lcom/google/android/material/datepicker/s;->e(Landroid/widget/TextView;J)V

    :cond_32
    return-void
.end method

.method public getCount()I
    .registers 3

    iget-object v0, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    iget v0, v0, Lcom/google/android/material/datepicker/r;->v:I

    invoke-virtual {p0}, Lcom/google/android/material/datepicker/s;->b()I

    move-result v1

    add-int/2addr v1, v0

    return v1
.end method

.method public bridge synthetic getItem(I)Ljava/lang/Object;
    .registers 2

    invoke-virtual {p0, p1}, Lcom/google/android/material/datepicker/s;->c(I)Ljava/lang/Long;

    move-result-object p1

    return-object p1
.end method

.method public getItemId(I)J
    .registers 4

    iget-object v0, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    iget v0, v0, Lcom/google/android/material/datepicker/r;->u:I

    div-int/2addr p1, v0

    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 12

    .line 1
    invoke-virtual {p3}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;

    move-result-object v0

    .line 2
    iget-object v1, p0, Lcom/google/android/material/datepicker/s;->u:Lz5/uk;

    if-nez v1, :cond_f

    new-instance v1, Lz5/uk;

    invoke-direct {v1, v0}, Lz5/uk;-><init>(Landroid/content/Context;)V

    iput-object v1, p0, Lcom/google/android/material/datepicker/s;->u:Lz5/uk;

    .line 3
    :cond_f
    move-object v0, p2

    check-cast v0, Landroid/widget/TextView;

    const/4 v1, 0x0

    if-nez p2, :cond_27

    invoke-virtual {p3}, Landroid/view/ViewGroup;->getContext()Landroid/content/Context;

    move-result-object p2

    invoke-static {p2}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object p2

    const v0, 0x7f0d004a

    invoke-virtual {p2, v0, p3, v1}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;Z)Landroid/view/View;

    move-result-object p2

    move-object v0, p2

    check-cast v0, Landroid/widget/TextView;

    :cond_27
    invoke-virtual {p0}, Lcom/google/android/material/datepicker/s;->b()I

    move-result p2

    sub-int p2, p1, p2

    if-ltz p2, :cond_cf

    iget-object p3, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    iget v2, p3, Lcom/google/android/material/datepicker/r;->v:I

    if-lt p2, v2, :cond_37

    goto/16 :goto_cf

    :cond_37
    const/4 v2, 0x1

    add-int/2addr p2, v2

    invoke-virtual {v0, p3}, Landroid/widget/TextView;->setTag(Ljava/lang/Object;)V

    invoke-virtual {v0}, Landroid/widget/TextView;->getResources()Landroid/content/res/Resources;

    move-result-object p3

    invoke-virtual {p3}, Landroid/content/res/Resources;->getConfiguration()Landroid/content/res/Configuration;

    move-result-object p3

    iget-object p3, p3, Landroid/content/res/Configuration;->locale:Ljava/util/Locale;

    new-array v3, v2, [Ljava/lang/Object;

    invoke-static {p2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v4

    aput-object v4, v3, v1

    const-string v4, "%d"

    invoke-static {p3, v4, v3}, Ljava/lang/String;->format(Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

    move-result-object p3

    invoke-virtual {v0, p3}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    iget-object p3, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    .line 4
    iget-object p3, p3, Lcom/google/android/material/datepicker/r;->r:Ljava/util/Calendar;

    invoke-static {p3}, Lcom/google/android/material/datepicker/z;->b(Ljava/util/Calendar;)Ljava/util/Calendar;

    move-result-object p3

    const/4 v3, 0x5

    invoke-virtual {p3, v3, p2}, Ljava/util/Calendar;->set(II)V

    invoke-virtual {p3}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide p2

    .line 5
    iget-object v4, p0, Lcom/google/android/material/datepicker/s;->r:Lcom/google/android/material/datepicker/r;

    iget v4, v4, Lcom/google/android/material/datepicker/r;->t:I

    .line 6
    invoke-static {}, Lcom/google/android/material/datepicker/z;->d()Ljava/util/Calendar;

    move-result-object v5

    .line 7
    invoke-virtual {v5, v3, v2}, Ljava/util/Calendar;->set(II)V

    invoke-static {v5}, Lcom/google/android/material/datepicker/z;->b(Ljava/util/Calendar;)Ljava/util/Calendar;

    move-result-object v5

    const/4 v6, 0x2

    invoke-virtual {v5, v6}, Ljava/util/Calendar;->get(I)I

    invoke-virtual {v5, v2}, Ljava/util/Calendar;->get(I)I

    move-result v6

    const/4 v7, 0x7

    invoke-virtual {v5, v7}, Ljava/util/Calendar;->getMaximum(I)I

    invoke-virtual {v5, v3}, Ljava/util/Calendar;->getActualMaximum(I)I

    invoke-virtual {v5}, Ljava/util/Calendar;->getTimeInMillis()J

    const-string v3, "UTC"

    if-ne v4, v6, :cond_a9

    .line 8
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v4

    .line 9
    sget-object v5, Lcom/google/android/material/datepicker/z;->a:Ljava/util/concurrent/atomic/AtomicReference;

    const-string v5, "MMMEd"

    .line 10
    invoke-static {v5, v4}, Landroid/icu/text/DateFormat;->getInstanceForSkeleton(Ljava/lang/String;Ljava/util/Locale;)Landroid/icu/text/DateFormat;

    move-result-object v4

    .line 11
    invoke-static {v3}, Landroid/icu/util/TimeZone;->getTimeZone(Ljava/lang/String;)Landroid/icu/util/TimeZone;

    move-result-object v3

    .line 12
    invoke-virtual {v4, v3}, Landroid/icu/text/DateFormat;->setTimeZone(Landroid/icu/util/TimeZone;)V

    .line 13
    new-instance v3, Ljava/util/Date;

    invoke-direct {v3, p2, p3}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v4, v3}, Landroid/icu/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object p2

    goto :goto_c5

    .line 14
    :cond_a9
    invoke-static {}, Ljava/util/Locale;->getDefault()Ljava/util/Locale;

    move-result-object v4

    .line 15
    sget-object v5, Lcom/google/android/material/datepicker/z;->a:Ljava/util/concurrent/atomic/AtomicReference;

    const-string v5, "yMMMEd"

    .line 16
    invoke-static {v5, v4}, Landroid/icu/text/DateFormat;->getInstanceForSkeleton(Ljava/lang/String;Ljava/util/Locale;)Landroid/icu/text/DateFormat;

    move-result-object v4

    .line 17
    invoke-static {v3}, Landroid/icu/util/TimeZone;->getTimeZone(Ljava/lang/String;)Landroid/icu/util/TimeZone;

    move-result-object v3

    .line 18
    invoke-virtual {v4, v3}, Landroid/icu/text/DateFormat;->setTimeZone(Landroid/icu/util/TimeZone;)V

    .line 19
    new-instance v3, Ljava/util/Date;

    invoke-direct {v3, p2, p3}, Ljava/util/Date;-><init>(J)V

    invoke-virtual {v4, v3}, Landroid/icu/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

    move-result-object p2

    .line 20
    :goto_c5
    invoke-virtual {v0, p2}, Landroid/widget/TextView;->setContentDescription(Ljava/lang/CharSequence;)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setVisibility(I)V

    invoke-virtual {v0, v2}, Landroid/widget/TextView;->setEnabled(Z)V

    goto :goto_d7

    :cond_cf
    :goto_cf
    const/16 p2, 0x8

    invoke-virtual {v0, p2}, Landroid/widget/TextView;->setVisibility(I)V

    invoke-virtual {v0, v1}, Landroid/widget/TextView;->setEnabled(Z)V

    :goto_d7
    invoke-virtual {p0, p1}, Lcom/google/android/material/datepicker/s;->c(I)Ljava/lang/Long;

    move-result-object p1

    if-nez p1, :cond_de

    goto :goto_e5

    :cond_de
    invoke-virtual {p1}, Ljava/lang/Long;->longValue()J

    move-result-wide p1

    invoke-virtual {p0, v0, p1, p2}, Lcom/google/android/material/datepicker/s;->e(Landroid/widget/TextView;J)V

    :goto_e5
    return-object v0
.end method

.method public hasStableIds()Z
    .registers 2

    const/4 v0, 0x1

    return v0
.end method
