[Galaxy Note 3 Android Development] cyberain:
Ok here's my file, but I do not see

there :)

TorchlightSettings.smali

.class public Lcom/android/settings/torchlight/TorchlightSettings;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "TorchlightSettings.java"

# interfaces
.implements Landroid/preference/Preference$OnPreferenceChangeListener;

# static fields
.field private static FALLBACK_TORCHLIGHT_TIMEOUT_VALUE:I

# instance fields
.field private mActionBarLayout:Landroid/view/View;

.field private mActionBarSwitch:Landroid/widget/Switch;

.field private mContentResolver:Landroid/content/ContentResolver;

.field private mHelpPref:Landroid/preference/Preference;

.field private final mTorchLightObserver:Landroid/database/ContentObserver;

.field private mTorchlightEnabler:Lcom/android/settings/torchlight/TorchlightEnabler;

.field private torchTimePreference:Landroid/preference/ListPreference;

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

const/16 v0, 0x7530

sput v0, Lcom/android/settings/torchlight/TorchlightSettings;->FALLBACK_TORCHLIGHT_TIMEOUT_VALUE:I

return-void
.end method

.method public constructor <init>()V
.locals 2

invoke-direct {p0}, Lcom/android/settings/SettingsPreferenceFragment;-><init>()V

new-instance v0, Lcom/android/settings/torchlight/TorchlightSettings$1;

new-instance v1, Landroid/os/Handler;

invoke-direct {v1}, Landroid/os/Handler;-><init>()V

invoke-direct {v0, p0, v1}, Lcom/android/settings/torchlight/TorchlightSettings$1;-><init>(Lcom/android/settings/torchlight/TorchlightSettings;Landroid/os/Handler;)V

iput-object v0, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mTorchLightObserver:Landroid/database/ContentObserver;

return-void
.end method

.method private getTimeoutNewEntry(J)Ljava/lang/String;
.locals 10

const-wide/16 v5, 0x3e8

div-long v3, p1, v5

const-wide/16 v5, 0x3c

div-long v0, v3, v5

const-wide/16 v5, 0x3c

rem-long/2addr v3, v5

const-string v2, ""

const-wide/16 v5, 0x0

cmp-long v5, v0, v5

if-lez v5, :cond_0

invoke-virtual {p0}, Landroid/app/Fragment;->getResources()Landroid/content/res/Resources;

move-result-object v5

const v6, 0x7f11000e

long-to-int v7, v0

invoke-virtual {v5, v6, v7}, Landroid/content/res/Resources;->getQuantityString(II)Ljava/lang/String;

move-result-object v5

const/4 v6, 0x1

new-array v6, v6, [Ljava/lang/Object;

const/4 v7, 0x0

long-to-int v8, v0

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

move-result-object v8

aput-object v8, v6, v7

invoke-static {v5, v6}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v2

:cond_0
const-wide/16 v5, 0x0

cmp-long v5, v0, v5

if-lez v5, :cond_1

const-wide/16 v5, 0x0

cmp-long v5, v3, v5

if-lez v5, :cond_1

new-instance v5, Ljava/lang/StringBuilder;

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

invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

const-string v6, " "

invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v2

:cond_1
const-wide/16 v5, 0x0

cmp-long v5, v3, v5

if-lez v5, :cond_2

new-instance v5, Ljava/lang/StringBuilder;

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

invoke-virtual {v5, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

invoke-virtual {p0}, Landroid/app/Fragment;->getResources()Landroid/content/res/Resources;

move-result-object v6

const v7, 0x7f11000f

long-to-int v8, v3

invoke-virtual {v6, v7, v8}, Landroid/content/res/Resources;->getQuantityString(II)Ljava/lang/String;

move-result-object v6

const/4 v7, 0x1

new-array v7, v7, [Ljava/lang/Object;

const/4 v8, 0x0

long-to-int v9, v3

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

move-result-object v9

aput-object v9, v7, v8

invoke-static {v6, v7}, Ljava/lang/String;->format(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v6

invoke-virtual {v5, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v5

invoke-virtual {v5}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v2

:cond_2
const-string v5, "TorchlightSettings"

new-instance v6, Ljava/lang/StringBuilder;

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

const-string v7, "getTimeoutNewEntry : "

invoke-virtual {v6, v7}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v6

invoke-virtual {v6, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

move-result-object v6

invoke-virtual {v6}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

move-result-object v6

invoke-static {v5, v6}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I

return-object v2
.end method

.method private updateTimeoutPreferenceDescription(J)V
.locals 6

iget-object v0, p0, Lcom/android/settings/torchlight/TorchlightSettings;->torchTimePreference:Landroid/preference/ListPreference;

const-wide/16 v2, 0x0

cmp-long v2, p1, v2

if-gez v2, :cond_0

const-string v1, ""

:goto_0
return-void

:cond_0
const v2, 0x7f0a19d5

const/4 v3, 0x1

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

const/4 v4, 0x0

invoke-direct {p0, p1, p2}, Lcom/android/settings/torchlight/TorchlightSettings;->getTimeoutNewEntry(J)Ljava/lang/String;

move-result-object v5

aput-object v5, v3, v4

invoke-virtual {p0, v2, v3}, Landroid/app/Fragment;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/preference/ListPreference;->setSummary(Ljava/lang/CharSequence;)V

goto :goto_0
.end method

# virtual methods
.method initTorchlightswitchBtn()V
.locals 8

const/16 v6, 0x10

const/4 v7, -0x2

const/4 v5, 0x0

const-string v3, "TorchlightSettings"

const-string v4, "initTorchlightswitchBtn() "

invoke-static {v3, v4}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I

invoke-virtual {p0}, Landroid/app/Fragment;->getActivity()Landroid/app/Activity;

move-result-object v0

new-instance v3, Landroid/widget/Switch;

invoke-direct {v3, v0}, Landroid/widget/Switch;-><init>(Landroid/content/Context;)V

iput-object v3, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mActionBarSwitch:Landroid/widget/Switch;

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

move-result-object v3

const v4, 0x7f0f0052

invoke-virtual {v3, v4}, Landroid/content/res/Resources;->getDimensionPixelSize(I)I

move-result v1

iget-object v3, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mActionBarSwitch:Landroid/widget/Switch;

invoke-virtual {v3, v5, v5, v1, v5}, Landroid/widget/TextView;->setPadding(IIII)V

invoke-virtual {v0}, Landroid/app/Activity;->getActionBar()Landroid/app/ActionBar;

move-result-object v3

invoke-virtual {v3, v6, v6}, Landroid/app/ActionBar;->setDisplayOptions(II)V

invoke-virtual {v0}, Landroid/app/Activity;->getActionBar()Landroid/app/ActionBar;

move-result-object v3

iget-object v4, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mActionBarSwitch:Landroid/widget/Switch;

new-instance v5, Landroid/app/ActionBar$LayoutParams;

const/16 v6, 0x15

invoke-direct {v5, v7, v7, v6}, Landroid/app/ActionBar$LayoutParams;-><init>(III)V

invoke-virtual {v3, v4, v5}, Landroid/app/ActionBar;->setCustomView(Landroid/view/View;Landroid/app/ActionBar$LayoutParams;)V

invoke-virtual {v0}, Landroid/app/Activity;->getActionBar()Landroid/app/ActionBar;

move-result-object v3

invoke-virtual {v3}, Landroid/app/ActionBar;->getCustomView()Landroid/view/View;

move-result-object v3

iput-object v3, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mActionBarLayout:Landroid/view/View;

new-instance v3, Lcom/android/settings/torchlight/TorchlightEnabler;

iget-object v4, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mActionBarSwitch:Landroid/widget/Switch;

invoke-direct {v3, v0, v4}, Lcom/android/settings/torchlight/TorchlightEnabler;-><init>(Landroid/content/Context;Landroid/widget/Switch;)V

iput-object v3, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mTorchlightEnabler:Lcom/android/settings/torchlight/TorchlightEnabler;

return-void
.end method

.method public onCreate(Landroid/os/Bundle;)V
.locals 6

const-string v4, "TorchlightSettings"

const-string v5, "onCreate() "

invoke-static {v4, v5}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I

invoke-super {p0, p1}, Lcom/android/settings/SettingsPreferenceFragment;->onCreate(Landroid/os/Bundle;)V

invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v2

iput-object v2, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mContentResolver:Landroid/content/ContentResolver;

const v4, 0x7f070106

invoke-virtual {p0, v4}, Landroid/preference/PreferenceFragment;->addPreferencesFromResource(I)V

invoke-virtual {p0}, Landroid/preference/PreferenceFragment;->getPreferenceScreen()Landroid/preference/PreferenceScreen;

move-result-object v3

const-string v4, "torchlight_help"

invoke-virtual {p0, v4}, Landroid/preference/PreferenceFragment;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

move-result-object v4

iput-object v4, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mHelpPref:Landroid/preference/Preference;

iget-object v4, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mHelpPref:Landroid/preference/Preference;

const v5, 0x7f040294

invoke-virtual {v4, v5}, Landroid/preference/Preference;->setLayoutResource(I)V

iget-object v4, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mHelpPref:Landroid/preference/Preference;

const/4 v5, 0x0

invoke-virtual {v4, v5}, Landroid/preference/Preference;->setSelectable(Z)V

const-string v4, "torchlight_timeout"

invoke-virtual {v3, v4}, Landroid/preference/PreferenceGroup;->findPreference(Ljava/lang/CharSequence;)Landroid/preference/Preference;

move-result-object v4

check-cast v4, Landroid/preference/ListPreference;

iput-object v4, p0, Lcom/android/settings/torchlight/TorchlightSettings;->torchTimePreference:Landroid/preference/ListPreference;

const-string v4, "torchlight_timeout"

sget v5, Lcom/android/settings/torchlight/TorchlightSettings;->FALLBACK_TORCHLIGHT_TIMEOUT_VALUE:I

invoke-static {v2, v4, v5}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v4

int-to-long v0, v4

iget-object v4, p0, Lcom/android/settings/torchlight/TorchlightSettings;->torchTimePreference:Landroid/preference/ListPreference;

invoke-static {v0, v1}, Ljava/lang/String;->valueOf(J)Ljava/lang/String;

move-result-object v5

invoke-virtual {v4, v5}, Landroid/preference/ListPreference;->setValue(Ljava/lang/String;)V

iget-object v4, p0, Lcom/android/settings/torchlight/TorchlightSettings;->torchTimePreference:Landroid/preference/ListPreference;

invoke-virtual {v4, p0}, Landroid/preference/Preference;->setOnPreferenceChangeListener(Landroid/preference/Preference$OnPreferenceChangeListener;)V

invoke-virtual {p0}, Lcom/android/settings/torchlight/TorchlightSettings;->initTorchlightswitchBtn()V

invoke-virtual {p0}, Lcom/android/settings/torchlight/TorchlightSettings;->onUpdateChange()V

return-void
.end method

.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
.locals 5

invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;

move-result-object v1

const-string v3, "TorchlightSettings"

const-string v4, "onPreferenceChange() "

invoke-static {v3, v4}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I

check-cast p2, Ljava/lang/String;

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

move-result v2

const-string v3, "torchlight_timeout"

invoke-virtual {v3, v1}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v3

if-eqz v3, :cond_1

invoke-static {}, Lcom/android/settings/Utils;->isMonkeyRunning()Z

move-result v3

if-eqz v3, :cond_0

const/4 v3, 0x0

:goto_0
return v3

:cond_0
:try_start_0
invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v3

const-string v4, "torchlight_timeout"

invoke-static {v3, v4, v2}, Landroid/provider/Settings$System;->putInt(Landroid/content/ContentResolver;Ljava/lang/String;I)Z
:try_end_0
.catch Ljava/lang/NumberFormatException; {:try_start_0 .. :try_end_0} :catch_0

:goto_1
int-to-long v3, v2

invoke-direct {p0, v3, v4}, Lcom/android/settings/torchlight/TorchlightSettings;->updateTimeoutPreferenceDescription(J)V

:cond_1
const/4 v3, 0x1

goto :goto_0

:catch_0
move-exception v0

const-string v3, "TorchlightSettings"

const-string v4, "could not persist torch timeout setting"

invoke-static {v3, v4, v0}, Landroid/util/secutil/Log;->secE(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)I

goto :goto_1
.end method

.method public onResume()V
.locals 4

const/4 v3, 0x0

const-string v0, "TorchlightSettings"

const-string v1, "onResume() "

invoke-static {v0, v1}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I

invoke-super {p0}, Lcom/android/settings/SettingsPreferenceFragment;->onResume()V

iget-object v0, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mActionBarLayout:Landroid/view/View;

if-eqz v0, :cond_0

iget-object v0, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mActionBarLayout:Landroid/view/View;

invoke-virtual {v0, v3}, Landroid/view/View;->setVisibility(I)V

:cond_0
iget-object v0, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mTorchlightEnabler:Lcom/android/settings/torchlight/TorchlightEnabler;

invoke-virtual {v0}, Lcom/android/settings/torchlight/TorchlightEnabler;->resume()V

invoke-virtual {p0}, Lcom/android/settings/torchlight/TorchlightSettings;->onUpdateChange()V

iget-object v0, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mContentResolver:Landroid/content/ContentResolver;

const-string v1, "torchlight_enable"

invoke-static {v1}, Landroid/provider/Settings$System;->getUriFor(Ljava/lang/String;)Landroid/net/Uri;

move-result-object v1

iget-object v2, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mTorchLightObserver:Landroid/database/ContentObserver;

invoke-virtual {v0, v1, v3, v2}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V

return-void
.end method

.method public onStop()V
.locals 2

invoke-super {p0}, Landroid/preference/PreferenceFragment;->onStop()V

const-string v0, "TorchlightSettings"

const-string v1, "onStop() "

invoke-static {v0, v1}, Landroid/util/secutil/Log;->secD(Ljava/lang/String;Ljava/lang/String;)I

iget-object v0, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mContentResolver:Landroid/content/ContentResolver;

iget-object v1, p0, Lcom/android/settings/torchlight/TorchlightSettings;->mTorchLightObserver:Landroid/database/ContentObserver;

invoke-virtual {v0, v1}, Landroid/content/ContentResolver;->unregisterContentObserver(Landroid/database/ContentObserver;)V

return-void
.end method

.method onUpdateChange()V
.locals 5

const/4 v4, 0x1

const/4 v3, 0x0

invoke-virtual {p0}, Lcom/android/settings/SettingsPreferenceFragment;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v1

const-string v2, "torchlight_enable"

invoke-static {v1, v2, v3}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v0

if-ne v0, v4, :cond_0

iget-object v1, p0, Lcom/android/settings/torchlight/TorchlightSettings;->torchTimePreference:Landroid/preference/ListPreference;

invoke-virtual {v1, v4}, Landroid/preference/Preference;->setEnabled(Z)V

:goto_0
return-void

:cond_0
iget-object v1, p0, Lcom/android/settings/torchlight/TorchlightSettings;->torchTimePreference:Landroid/preference/ListPreference;

invoke-virtual {v1, v3}, Landroid/preference/Preference;->setEnabled(Z)V

goto :goto_0
.end method