.class Lcom/scaleasw/powercalc/MainActivity$10;
.super Ljava/lang/Object;
.source "MainActivity.java"

# interfaces
.implements Landroid/content/DialogInterface$OnClickListener;


# annotations
.annotation system Ldalvik/annotation/EnclosingMethod;
    value = Lcom/scaleasw/powercalc/MainActivity;->openBitModeDialog()V
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = null
.end annotation


# instance fields
.field final synthetic this$0:Lcom/scaleasw/powercalc/MainActivity;


# direct methods
.method constructor <init>(Lcom/scaleasw/powercalc/MainActivity;)V
    .locals 0
    .param p1, "this$0"    # Lcom/scaleasw/powercalc/MainActivity;

    .prologue
    .line 1580
    iput-object p1, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

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

    return-void
.end method


# virtual methods
.method public onClick(Landroid/content/DialogInterface;I)V
    .locals 4
    .param p1, "dialog"    # Landroid/content/DialogInterface;
    .param p2, "which"    # I

    .prologue
    .line 1583
    if-nez p2, :cond_0

    iget-object v1, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

    invoke-static {v1}, Lcom/scaleasw/powercalc/MainActivity;->access$000(Lcom/scaleasw/powercalc/MainActivity;)Lcom/scaleasw/powercalc/Editor;

    move-result-object v1

    iget-object v1, v1, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    const/16 v2, 0x8

    iput v2, v1, Lcom/scaleasw/powercalc/Solver;->calcBits:I

    .line 1587
    :goto_0
    iget-object v1, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

    invoke-virtual {v1}, Lcom/scaleasw/powercalc/MainActivity;->getApplicationContext()Landroid/content/Context;

    move-result-object v1

    invoke-static {v1}, Landroid/preference/PreferenceManager;->getDefaultSharedPreferences(Landroid/content/Context;)Landroid/content/SharedPreferences;

    move-result-object v0

    .line 1588
    .local v0, "prefs":Landroid/content/SharedPreferences;
    invoke-interface {v0}, Landroid/content/SharedPreferences;->edit()Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    const-string v2, "prefBitsCount"

    iget-object v3, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

    invoke-static {v3}, Lcom/scaleasw/powercalc/MainActivity;->access$000(Lcom/scaleasw/powercalc/MainActivity;)Lcom/scaleasw/powercalc/Editor;

    move-result-object v3

    iget-object v3, v3, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    iget v3, v3, Lcom/scaleasw/powercalc/Solver;->calcBits:I

    invoke-interface {v1, v2, v3}, Landroid/content/SharedPreferences$Editor;->putInt(Ljava/lang/String;I)Landroid/content/SharedPreferences$Editor;

    move-result-object v1

    invoke-interface {v1}, Landroid/content/SharedPreferences$Editor;->commit()Z

    .line 1589
    iget-object v1, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

    invoke-static {v1}, Lcom/scaleasw/powercalc/MainActivity;->access$100(Lcom/scaleasw/powercalc/MainActivity;)V

    .line 1590
    iget-object v1, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

    invoke-static {v1}, Lcom/scaleasw/powercalc/MainActivity;->access$000(Lcom/scaleasw/powercalc/MainActivity;)Lcom/scaleasw/powercalc/Editor;

    move-result-object v1

    invoke-virtual {v1}, Lcom/scaleasw/powercalc/Editor;->updateEditorView()V

    .line 1591
    return-void

    .line 1584
    .end local v0    # "prefs":Landroid/content/SharedPreferences;
    :cond_0
    const/4 v1, 0x1

    if-ne p2, v1, :cond_1

    iget-object v1, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

    invoke-static {v1}, Lcom/scaleasw/powercalc/MainActivity;->access$000(Lcom/scaleasw/powercalc/MainActivity;)Lcom/scaleasw/powercalc/Editor;

    move-result-object v1

    iget-object v1, v1, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    const/16 v2, 0x10

    iput v2, v1, Lcom/scaleasw/powercalc/Solver;->calcBits:I

    goto :goto_0

    .line 1585
    :cond_1
    const/4 v1, 0x2

    if-ne p2, v1, :cond_2

    iget-object v1, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

    invoke-static {v1}, Lcom/scaleasw/powercalc/MainActivity;->access$000(Lcom/scaleasw/powercalc/MainActivity;)Lcom/scaleasw/powercalc/Editor;

    move-result-object v1

    iget-object v1, v1, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    const/16 v2, 0x20

    iput v2, v1, Lcom/scaleasw/powercalc/Solver;->calcBits:I

    goto :goto_0

    .line 1586
    :cond_2
    iget-object v1, p0, Lcom/scaleasw/powercalc/MainActivity$10;->this$0:Lcom/scaleasw/powercalc/MainActivity;

    invoke-static {v1}, Lcom/scaleasw/powercalc/MainActivity;->access$000(Lcom/scaleasw/powercalc/MainActivity;)Lcom/scaleasw/powercalc/Editor;

    move-result-object v1

    iget-object v1, v1, Lcom/scaleasw/powercalc/Editor;->solver:Lcom/scaleasw/powercalc/Solver;

    const/16 v2, 0x40

    iput v2, v1, Lcom/scaleasw/powercalc/Solver;->calcBits:I

    goto :goto_0
.end method
