[Galaxy S II Android Development] remuntada78:
if i've understand this is the code where the constructor is called,

invoke-direct/range {v0 .. v8}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIIIII)V

so i changed the code like this

.method public constructor <init>(Landroid/content/Context;)V
.locals[COLOR="Red"] 13[/COLOR]
.parameter "context"

.prologue
const/4 v7, 0x0

.line 82
const/4 v2, 0x0

const v3, 0x7f0a00ea

move-object v0, p0

move-object v1, p1

move v8, v7

invoke-direct/range {v0 .. v8}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;IIIIII)V

.line 69
new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton$1;

invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton$1;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;)V

iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->mIntentReceiver:Landroid/content/BroadcastReceiver;

.line 89
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->mContext:Landroid/content/Context;

.line 90
invoke-virtual {p0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->setListener(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton$Listener;)V

[COLOR="Red"][/COLOR]	iget-object v10, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->mContext:Landroid/content/Context;

invoke-virtual {v10}, Landroid/content/Context;->getContentResolver()Landroid/content/ContentResolver;

move-result-object v10

const-string v11, "toggles_chooser"

const v12, 0x0

invoke-static {v10, v11, v12}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v10

const v12, 0x1

if-eq v10, v12, :cond_themes5

const v12, 0x2

if-eq v10, v12, :cond_green

const v4, 0x7f0201f8

const v5, 0x7f0201f7

const v6, 0x7f0201f6

goto :goto_new

:cond_themes5

const v4, 0x7f021133

const v5, 0x7f021132

const v6, 0x7f021131

goto :goto_new

:cond_green

const v4, 0x7f021101

const v5, 0x7f021100

const v6, 0x7f0210ff

:goto_new[/COLOR]

.line 91
const-string v0, "wifi"

invoke-virtual {p1, v0}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v0

check-cast v0, Landroid/net/wifi/WifiManager;

iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->mWifiManager:Landroid/net/wifi/WifiManager;

after reboot i've again lost the wifi toggles and i got this error

W/dalvikvm( 2349): VFY: register1 v4 type 0, wanted 17

W/dalvikvm( 2349): VFY: register1 v5 type 0, wanted 17

W/dalvikvm( 2349): VFY: register1 v6 type 0, wanted 17

W/dalvikvm( 2349): VFY: rejecting opcode 0x76 at 0x0008

W/dalvikvm( 2349): VFY: rejected Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;.<init> (Landroid/content/Context;)V

W/dalvikvm( 2349): Verifier rejected class Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;

W/STATUSBAR-QuickSettingPanel( 2349): WifiClassNotFoundException

W/AlarmManager( 2207): FACTORY_ON= 0

E/Trace ( 2404): error opening trace file: No such file or directory (2)

D/STATUSBAR-QuickSettingButton( 2349): Button OFF

but i don't understand what code and where to add it about you said "and then call setIcon on those registers that hold the new id's"