[Galaxy S II Android Development] CNexus:
[MENTION=5292754]remuntada78[/MENTION]

Add this to the end of the main constructor in SystemUI/com/android/systemui/policy/quicksetting/QuickSettingPanel.smali:

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
...normal code here...

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

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

move-result-object v0

{p0, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->regObserver(Landroid/content/ContentResolver;)V

return-void

.end method

Then add this somewhere around the other access$XXX methods in QuickSettingPanel.smali (they should be toward the top):

.method static synthetic access$500(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;)V
.locals 0
.parameter

.prologue
.line 83
invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->refreshView()V

return-void
.end method

Then add this method to QuickSettingPanel.smali (replicate the code labeled "copy for new toggles" as necessary if you want the quick settings to be updated when other mods/values are activated)

.method private regObserver(Landroid/content/ContentResolver;)V
.locals 3
.parameter "cs"

.prologue
const/4 v2, 0x0

new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;

new-instance v1, Landroid/os/Handler;

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

invoke-direct {v0, p0, p0, v1}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;Landroid/os/Handler;)V

.local v0, ob:Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;
const-string v1, "your_toggle_name_here" # copy for new toggles

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

move-result-object v1 #copy for new toggles

invoke-virtual {p1, v1, v2, v0}, Landroid/content/ContentResolver;->registerContentObserver(Landroid/net/Uri;ZLandroid/database/ContentObserver;)V #copy for new toggles

return-void
.end method

Then add the following into a file called QuickSettingPanel$SettingsObserver.smali

.class Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;
.super Landroid/database/ContentObserver;
.source "QuickSettingPanel.java"

# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;
.end annotation

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

# instance fields
.field qs:Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;

.field final synthetic this$0:Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;

# direct methods
.method public constructor <init>(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;Landroid/os/Handler;)V
.locals 0
.parameter
.parameter "qs"
.parameter "handler"

.prologue
.line 148
iput-object p1, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;->this$0:Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;

.line 149
invoke-direct {p0, p3}, Landroid/database/ContentObserver;-><init>(Landroid/os/Handler;)V

.line 150
iput-object p2, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;->qs:Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;

.line 151
return-void
.end method

# virtual methods
.method public onChange(Z)V
.locals 1
.parameter "selfChange"

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

invoke-virtual {p0, p1, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;->onChange(ZLandroid/net/Uri;)V

.line 155
return-void
.end method

.method public onChange(ZLandroid/net/Uri;)V
.locals 1
.parameter "selfChange"
.parameter "uri"

.prologue
.line 158

.line 159
iget-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel$SettingsObserver;->qs:Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;

#calls: Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->refreshView()V
invoke-static {v0}, Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->access$500(Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;)V

.line 160
return-void
.end method

Let me know if you have any questions