[Galaxy S II Android Development] Goldie:
Sure you can. All the change code can go there before the call. You're only filling registers for the call to use :)

This for example works perfectly to cycle through 3 different icons....

.method public constructor (Landroid/content/Context;)V
.locals 10
.parameter "context"

.prologue

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

move-result-object v1

const-string v2, "toggle_icon_type"

const v3, 0x0

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

move-result v1

const v2, 0x0

if-eq v2, v1, :cond_new

const v2, 0x1

if-eq v2, v1, :cond_new2

const v3, 0x7f0c00d1

const v4, 0x7f020200

const v5, 0x7f0201ff

const v6, 0x7f0201fe

goto :goto_new

:cond_new

const v3, 0x7f0c00d1

const v4, 0x7f0201fd

const v5, 0x7f0201ff

const v6, 0x7f0201fe

goto :goto_new

:cond_new2

const v3, 0x7f0c00d1

const v4, 0x7f0201ea

const v5, 0x7f0201ff

const v6, 0x7f0201fe

:goto_new

const/4 v7, 0x0

.line 134
const/4 v2, 0x0

move-object v0, p0

move-object v1, p1

move v8, v7

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

.line 90
const/4 v0, 0x2

iput v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->INFO_TYPE_DPM_WIFI:I

.line 91
const/4 v0, 0x5

iput v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->INFO_TYPE_UNABLE_TO_TURNON_WIFI:I

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

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

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

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

.line 142
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;

.line 146
:try_start_0
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->mContext:Landroid/content/Context;

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

move-result-object v0

const v1, 0x7f0b000b

invoke-virtual {v0, v1}, Landroid/content/res/Resources;->getBoolean(I)Z

move-result v0

iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->mBlockWifiInFlightMode:Z
:try_end_0
.catch Landroid/content/res/Resources$NotFoundException; {:try_start_0 .. :try_end_0} :catch_0

.line 152
:goto_0
iget-boolean v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->mBlockWifiInFlightMode:Z

if-eqz v0, :cond_0

.line 153
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingButton;->mContext:Landroid/content/Context;

const v1, 0x7f0c0021

invoke-static {v0, v1, v7}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

move-result-object v0

iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->toastAlert:Landroid/widget/Toast;

.line 157
:cond_0
return-void

.line 148
:catch_0
move-exception v9

.line 149
.local v9, ex:Landroid/content/res/Resources$NotFoundException;
iput-boolean v7, p0, Lcom/android/systemui/statusbar/policy/quicksetting/WifiQuickSettingButton;->mBlockWifiInFlightMode:Z

goto :goto_0
.end method