GameBoostStopDialog.smali

.class public Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;
.super Landroid/app/Dialog;
.source "GameBoostStopDialog.java"

# interfaces
.implements Landroid/view/View$OnClickListener;


# instance fields
.field public a:Landroid/view/View$OnClickListener;


# direct methods
.method public constructor <init>(Landroid/content/Context;)V
    .registers 3
    .param p1    # Landroid/content/Context;
        .annotation build Landroid/support/annotation/NonNull;
        .end annotation
    .end param

    .prologue
    .line 23
    sget v0, Lcom/cleanmaster/gameboost/R$style;->game_boost_dialog:I

    invoke-direct {p0, p1, v0}, Landroid/app/Dialog;-><init>(Landroid/content/Context;I)V

    .line 24
    return-void
.end method

.method private a()V
    .registers 4

    .prologue
    .line 39
    invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->getWindow()Landroid/view/Window;

    move-result-object v0

    .line 40
    if-eqz v0, :cond_11

    .line 41
    invoke-virtual {v0}, Landroid/view/Window;->getAttributes()Landroid/view/WindowManager$LayoutParams;

    move-result-object v1

    .line 42
    const/16 v2, 0x11

    iput v2, v1, Landroid/view/WindowManager$LayoutParams;->gravity:I

    .line 43
    invoke-virtual {v0, v1}, Landroid/view/Window;->setAttributes(Landroid/view/WindowManager$LayoutParams;)V

    .line 45
    :cond_11
    return-void
.end method


# virtual methods
.method public a(Landroid/view/View$OnClickListener;)V
    .registers 2

    .prologue
    .line 63
    iput-object p1, p0, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->a:Landroid/view/View$OnClickListener;

    .line 64
    return-void
.end method

.method public onClick(Landroid/view/View;)V
    .registers 4

    .prologue
    .line 49
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    sget v1, Lcom/cleanmaster/gameboost/R$id;->tv_stop:I

    if-ne v0, v1, :cond_15

    .line 50
    iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->a:Landroid/view/View$OnClickListener;

    if-eqz v0, :cond_11

    .line 51
    iget-object v0, p0, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->a:Landroid/view/View$OnClickListener;

    invoke-interface {v0, p1}, Landroid/view/View$OnClickListener;->onClick(Landroid/view/View;)V

    .line 53
    :cond_11
    invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->dismiss()V

    .line 57
    :cond_14
    :goto_14
    return-void

    .line 54
    :cond_15
    invoke-virtual {p1}, Landroid/view/View;->getId()I

    move-result v0

    sget v1, Lcom/cleanmaster/gameboost/R$id;->tv_continue:I

    if-ne v0, v1, :cond_14

    .line 55
    invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->dismiss()V

    goto :goto_14
.end method

.method protected onCreate(Landroid/os/Bundle;)V
    .registers 5

    .prologue
    .line 29
    invoke-super {p0, p1}, Landroid/app/Dialog;->onCreate(Landroid/os/Bundle;)V

    .line 30
    invoke-direct {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->a()V

    .line 31
    sget v0, Lcom/cleanmaster/gameboost/R$layout;->dialog_game_boost_stop:I

    invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->setContentView(I)V

    .line 32
    sget v0, Lcom/cleanmaster/gameboost/R$id;->tv_stop:I

    invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 33
    sget v0, Lcom/cleanmaster/gameboost/R$id;->tv_continue:I

    invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->findViewById(I)Landroid/view/View;

    move-result-object v0

    invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 34
    sget v0, Lcom/cleanmaster/gameboost/R$id;->tv_stop_boost_tip:I

    invoke-virtual {p0, v0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    invoke-virtual {p0}, Lcom/cleanmaster/gameboost/ui/GameBoostStopDialog;->getContext()Landroid/content/Context;

    move-result-object v1

    sget v2, Lcom/cleanmaster/gameboost/R$string;->game_boost_stop_boost_txt:I

    invoke-virtual {v1, v2}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-static {v1}, Landroid/text/Html;->fromHtml(Ljava/lang/String;)Landroid/text/Spanned;

    move-result-object v1

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

    .line 36
    return-void
.end method