.class public Lcom/moji/appwidget/image/TimeInfo;
.super Ljava/lang/Object;
.source "TimeInfo.java"

# interfaces
.implements Ljava/io/Serializable;


# instance fields
.field public hourTens:I

.field public hourUnits:I

.field public is24HourFormat:Z

.field public isPM:Z

.field private mPreTime:Ljava/util/Calendar;

.field public minuteTens:I

.field public minuteUnits:I


# direct methods
.method public constructor <init>()V
    .locals 6

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

    .line 24
    invoke-static {}, Lcom/moji/tool/AppDelegate;->a()Landroid/content/Context;

    move-result-object v0

    invoke-static {v0}, Landroid/text/format/DateFormat;->is24HourFormat(Landroid/content/Context;)Z

    move-result v0

    iput-boolean v0, p0, Lcom/moji/appwidget/image/TimeInfo;->is24HourFormat:Z

    .line 25
    invoke-static {}, Ljava/util/Calendar;->getInstance()Ljava/util/Calendar;

    move-result-object v0

    .line 27
    iget-boolean v1, p0, Lcom/moji/appwidget/image/TimeInfo;->is24HourFormat:Z

    const/16 v2, 0xc

    const/16 v3, 0xa

    if-nez v1, :cond_2

    .line 28
    invoke-virtual {v0, v3}, Ljava/util/Calendar;->get(I)I

    move-result v1

    if-nez v1, :cond_0

    const/16 v1, 0xc

    :cond_0
    const/16 v4, 0x9

    .line 32
    invoke-virtual {v0, v4}, Ljava/util/Calendar;->get(I)I

    move-result v4

    const/4 v5, 0x1

    if-ne v5, v4, :cond_1

    goto :goto_0

    :cond_1
    const/4 v5, 0x0

    :goto_0
    iput-boolean v5, p0, Lcom/moji/appwidget/image/TimeInfo;->isPM:Z

    goto :goto_1

    :cond_2
    const/16 v1, 0xb

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

    move-result v1

    .line 36
    :goto_1
    invoke-virtual {v0, v2}, Ljava/util/Calendar;->get(I)I

    move-result v2

    .line 38
    div-int/lit8 v4, v1, 0xa

    iput v4, p0, Lcom/moji/appwidget/image/TimeInfo;->hourTens:I

    .line 39
    rem-int/2addr v1, v3

    iput v1, p0, Lcom/moji/appwidget/image/TimeInfo;->hourUnits:I

    .line 40
    div-int/lit8 v1, v2, 0xa

    iput v1, p0, Lcom/moji/appwidget/image/TimeInfo;->minuteTens:I

    .line 41
    rem-int/2addr v2, v3

    iput v2, p0, Lcom/moji/appwidget/image/TimeInfo;->minuteUnits:I

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

    move-result-wide v1

    const-wide/32 v3, 0x5265c00

    sub-long/2addr v1, v3

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

    .line 44
    iput-object v0, p0, Lcom/moji/appwidget/image/TimeInfo;->mPreTime:Ljava/util/Calendar;

    return-void
.end method

.method public constructor <init>(Ljava/util/Calendar;Z)V
    .locals 4

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

    const/16 v0, 0xa

    if-nez p2, :cond_1

    const/16 p2, 0xb

    .line 51
    invoke-virtual {p1, p2}, Ljava/util/Calendar;->get(I)I

    move-result p2

    const/16 v1, 0x9

    .line 52
    invoke-virtual {p1, v1}, Ljava/util/Calendar;->get(I)I

    move-result v1

    const/4 v2, 0x1

    if-ne v2, v1, :cond_0

    goto :goto_0

    :cond_0
    const/4 v2, 0x0

    :goto_0
    iput-boolean v2, p0, Lcom/moji/appwidget/image/TimeInfo;->isPM:Z

    goto :goto_1

    .line 54
    :cond_1
    invoke-virtual {p1, v0}, Ljava/util/Calendar;->get(I)I

    move-result p2

    :goto_1
    const/16 v1, 0xc

    .line 56
    invoke-virtual {p1, v1}, Ljava/util/Calendar;->get(I)I

    move-result v1

    .line 58
    div-int/lit8 v2, p2, 0xa

    iput v2, p0, Lcom/moji/appwidget/image/TimeInfo;->hourTens:I

    .line 59
    rem-int/2addr p2, v0

    iput p2, p0, Lcom/moji/appwidget/image/TimeInfo;->hourUnits:I

    .line 60
    div-int/lit8 p2, v1, 0xa

    iput p2, p0, Lcom/moji/appwidget/image/TimeInfo;->minuteTens:I

    .line 61
    rem-int/2addr v1, v0

    iput v1, p0, Lcom/moji/appwidget/image/TimeInfo;->minuteUnits:I

    .line 63
    invoke-virtual {p1}, Ljava/util/Calendar;->getTimeInMillis()J

    move-result-wide v0

    const-wide/32 v2, 0x5265c00

    sub-long/2addr v0, v2

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

    .line 64
    iput-object p1, p0, Lcom/moji/appwidget/image/TimeInfo;->mPreTime:Ljava/util/Calendar;

    return-void
.end method


# virtual methods
.method public getAMPMStr()Ljava/lang/String;
    .locals 1

    .line 88
    iget-boolean v0, p0, Lcom/moji/appwidget/image/TimeInfo;->is24HourFormat:Z

    if-eqz v0, :cond_1

    .line 89
    iget-boolean v0, p0, Lcom/moji/appwidget/image/TimeInfo;->isPM:Z

    if-eqz v0, :cond_0

    const-string v0, "PM"

    return-object v0

    :cond_0
    const-string v0, "AM"

    return-object v0

    :cond_1
    const-string v0, ""

    return-object v0
.end method

.method public getPreTime()Lcom/moji/appwidget/image/TimeInfo;
    .locals 3

    .line 99
    new-instance v0, Lcom/moji/appwidget/image/TimeInfo;

    iget-object v1, p0, Lcom/moji/appwidget/image/TimeInfo;->mPreTime:Ljava/util/Calendar;

    iget-boolean v2, p0, Lcom/moji/appwidget/image/TimeInfo;->is24HourFormat:Z

    invoke-direct {v0, v1, v2}, Lcom/moji/appwidget/image/TimeInfo;-><init>(Ljava/util/Calendar;Z)V

    return-object v0
.end method

.method public getTimeNum(I)I
    .locals 0

    packed-switch p1, :pswitch_data_0

    const/4 p1, -0x1

    return p1

    .line 82
    :pswitch_0
    iget p1, p0, Lcom/moji/appwidget/image/TimeInfo;->minuteUnits:I

    return p1

    .line 80
    :pswitch_1
    iget p1, p0, Lcom/moji/appwidget/image/TimeInfo;->minuteTens:I

    return p1

    .line 78
    :pswitch_2
    iget p1, p0, Lcom/moji/appwidget/image/TimeInfo;->hourUnits:I

    return p1

    .line 76
    :pswitch_3
    iget p1, p0, Lcom/moji/appwidget/image/TimeInfo;->hourTens:I

    return p1

    nop

    :pswitch_data_0
    .packed-switch 0x0
        :pswitch_3
        :pswitch_2
        :pswitch_1
        :pswitch_0
    .end packed-switch
.end method
