FlashScreenActivity.smali

.class public Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;
.super Ldxoptimizer/afc;
.source "FlashScreenActivity.java"


# static fields
.field private static a:Ljava/lang/String;

.field private static d:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference",
            "<",
            "Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;",
            ">;"
        }
    .end annotation
.end field


# instance fields
.field private b:F

.field private c:F

.field private e:Landroid/widget/ImageView;

.field private f:Landroid/widget/TextView;

.field private g:Landroid/widget/TextView;

.field private h:Landroid/widget/TextView;


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

    .prologue
    .line 33
    const-string v0, "FlashScreenActivity"

    sput-object v0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->a:Ljava/lang/String;

    return-void
.end method

.method public constructor <init>()V
    .registers 1

    .prologue
    .line 31
    invoke-direct {p0}, Ldxoptimizer/afc;-><init>()V

    return-void
.end method

.method static synthetic a(Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;)F
    .registers 2

    .prologue
    .line 31
    iget v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->c:F

    return v0
.end method

.method public static a(Landroid/app/Activity;)I
    .registers 4

    .prologue
    .line 120
    const/4 v0, 0x0

    .line 121
    invoke-virtual {p0}, Landroid/app/Activity;->getContentResolver()Landroid/content/ContentResolver;

    move-result-object v1

    .line 123
    :try_start_5
    const-string v2, "screen_brightness"

    invoke-static {v1, v2}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;)I
    :try_end_a
    .catch Ljava/lang/Exception; {:try_start_5 .. :try_end_a} :catch_c

    move-result v0

    .line 130
    :goto_b
    return v0

    .line 125
    :catch_c
    move-exception v1

    goto :goto_b
.end method

.method public static b()V
    .registers 2

    .prologue
    .line 82
    sget-object v0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->d:Ljava/lang/ref/WeakReference;

    if-eqz v0, :cond_15

    .line 83
    sget-object v0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->d:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;

    .line 84
    if-eqz v0, :cond_15

    .line 85
    const/4 v1, 0x1

    invoke-static {v0, v1}, Ldxoptimizer/cdn;->a(Landroid/content/Context;I)V

    .line 86
    invoke-virtual {v0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->finish()V

    .line 89
    :cond_15
    const/4 v0, 0x0

    sput-object v0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->d:Ljava/lang/ref/WeakReference;

    .line 90
    return-void
.end method

.method static synthetic b(Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;)V
    .registers 1

    .prologue
    .line 31
    invoke-direct {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->c()V

    return-void
.end method

.method private c()V
    .registers 5

    .prologue
    .line 134
    invoke-virtual {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

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

    move-result-object v0

    .line 135
    new-instance v1, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity$1;

    invoke-direct {v1, p0, v0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity$1;-><init>(Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;Landroid/view/WindowManager$LayoutParams;)V

    const-wide/16 v2, 0xc8

    invoke-static {v1, v2, v3}, Ldxoptimizer/cct;->a(Ljava/lang/Runnable;J)V

    .line 152
    return-void
.end method

.method private d()F
    .registers 2

    .prologue
    .line 155
    invoke-virtual {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

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

    move-result-object v0

    .line 156
    iget v0, v0, Landroid/view/WindowManager$LayoutParams;->screenBrightness:F

    return v0
.end method

.method private e()V
    .registers 3

    .prologue
    .line 160
    invoke-virtual {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->getWindow()Landroid/view/Window;

    move-result-object v0

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

    move-result-object v0

    .line 161
    iget v1, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->b:F

    iput v1, v0, Landroid/view/WindowManager$LayoutParams;->screenBrightness:F

    .line 162
    invoke-virtual {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->getWindow()Landroid/view/Window;

    move-result-object v1

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

    .line 163
    return-void
.end method


# virtual methods
.method public onCreate(Landroid/os/Bundle;)V
    .registers 6

    .prologue
    const/4 v3, 0x3

    const/4 v2, 0x1

    .line 45
    invoke-super {p0, p1}, Ldxoptimizer/afc;->onCreate(Landroid/os/Bundle;)V

    .line 46
    const v0, 0x7f030175

    invoke-virtual {p0, v0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->setContentView(I)V

    .line 47
    invoke-direct {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->d()F

    move-result v0

    iput v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->b:F

    .line 48
    invoke-static {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->a(Landroid/app/Activity;)I

    move-result v0

    int-to-float v0, v0

    iput v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->c:F

    .line 49
    new-instance v0, Ljava/lang/ref/WeakReference;

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

    sput-object v0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->d:Ljava/lang/ref/WeakReference;

    .line 50
    const v0, 0x7f0e059d

    invoke-virtual {p0, v0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    iput-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->e:Landroid/widget/ImageView;

    .line 51
    const v0, 0x7f0e059e

    invoke-virtual {p0, v0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->g:Landroid/widget/TextView;

    .line 52
    const v0, 0x7f0e05a1

    invoke-virtual {p0, v0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->f:Landroid/widget/TextView;

    .line 53
    const v0, 0x7f0e059f

    invoke-virtual {p0, v0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/TextView;

    iput-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->h:Landroid/widget/TextView;

    .line 54
    invoke-static {p0, v2}, Ldxoptimizer/cdn;->a(Landroid/content/Context;I)V

    .line 55
    const-string v0, "new_notify"

    const-string v1, "nnfs"

    .line 56
    invoke-static {v2}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

    move-result-object v2

    .line 55
    invoke-static {v0, v1, v2}, Ldxoptimizer/cgh;->a(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Number;)V

    .line 57
    invoke-virtual {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    const-string v1, "type"

    invoke-static {v0, v1, v3}, Ldxoptimizer/cgc;->a(Landroid/content/Intent;Ljava/lang/String;I)I

    move-result v0

    .line 59
    if-ne v0, v3, :cond_8c

    .line 60
    iget-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->e:Landroid/widget/ImageView;

    const v1, 0x7f02021c

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

    .line 61
    iget-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->g:Landroid/widget/TextView;

    const v1, 0x7f080626

    invoke-virtual {p0, v1}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->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 62
    iget-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->f:Landroid/widget/TextView;

    const v1, 0x7f08062a

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

    .line 63
    iget-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->h:Landroid/widget/TextView;

    const/4 v1, 0x0

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

    .line 70
    :cond_8b
    :goto_8b
    return-void

    .line 64
    :cond_8c
    const/4 v1, 0x4

    if-ne v0, v1, :cond_8b

    .line 65
    iget-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->e:Landroid/widget/ImageView;

    const v1, 0x7f02021e

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

    .line 66
    iget-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->g:Landroid/widget/TextView;

    const v1, 0x7f080625

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

    .line 67
    iget-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->f:Landroid/widget/TextView;

    const v1, 0x7f080629

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

    .line 68
    iget-object v0, p0, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->h:Landroid/widget/TextView;

    const/16 v1, 0x8

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

    goto :goto_8b
.end method

.method protected onNewIntent(Landroid/content/Intent;)V
    .registers 2

    .prologue
    .line 74
    invoke-super {p0, p1}, Ldxoptimizer/afc;->onNewIntent(Landroid/content/Intent;)V

    .line 78
    invoke-static {}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->b()V

    .line 79
    return-void
.end method

.method public onPause()V
    .registers 1

    .prologue
    .line 100
    invoke-super {p0}, Ldxoptimizer/afc;->onPause()V

    .line 101
    invoke-direct {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->e()V

    .line 102
    return-void
.end method

.method public onResume()V
    .registers 1

    .prologue
    .line 94
    invoke-super {p0}, Ldxoptimizer/afc;->onResume()V

    .line 95
    invoke-direct {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->c()V

    .line 96
    return-void
.end method

.method protected onStop()V
    .registers 2

    .prologue
    .line 106
    invoke-super {p0}, Ldxoptimizer/afc;->onStop()V

    .line 107
    invoke-virtual {p0}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->isFinishing()Z

    move-result v0

    if-nez v0, :cond_c

    .line 108
    invoke-static {}, Lcom/dianxinos/optimizer/module/flashlight/FlashScreenActivity;->b()V

    .line 111
    :cond_c
    return-void
.end method