[Galaxy S II Android Development] remuntada78:
i noticed that in Alliance roms to achieve this is called header's id so i wrote this code in PhoneStatusBar.smali

.method setStatusbarExpandedColor()V
.locals 6

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const v1, 0x7f0d000a [COLOR="Red"]this is header's id[/COLOR]

invoke-virtual {v0, v1}, Lcom/android/systemui/statusbar/phone/StatusBarWindowView;->findViewById(I)Landroid/view/View;

move-result-object v0

iget-object v2, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mContext:Landroid/content/Context;

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

move-result-object v2

const-string v3, "statusbar_expanded_color"

const v4, -0x100

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

move-result v2

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

return-void
.end method

and this in .method makeStatusbar

move-result v9

if-nez v9, :cond_0

.line 571
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mStatusBarWindow:Lcom/android/systemui/statusbar/phone/StatusBarWindowView;

const/4 v10, 0x0

invoke-virtual {v9, v10}, Landroid/view/View;->setBackground(Landroid/graphics/drawable/Drawable;)V

[COLOR="Red"] invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setStatusbarExpandedColor()V[/COLOR]

.line 572
iget-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mNotificationPanel:Landroid/view/View;

new-instance v10, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$FastColorDrawable;

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

then in PhoneStatusBar$SettingsObserver.smali i added these code

const-string v1, "statusbar_expanded_color"

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

move-result-object v1

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

and

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar$SettingsObserver;->this$0:Lcom/android/systemui/statusbar/phone/PhoneStatusBar;

invoke-virtual {v0}, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->setStatusbarExpandedColor()V

but i got this error, with no vfy

E/AndroidRuntime( 2348): FATAL EXCEPTION: main

E/AndroidRuntime( 2348): java.lang.NullPointerException

E/AndroidRuntime( 2348):	at com.android.systemui.statusbar.phone.PhoneStatusBar.setStatusbarExpandedColor(PhoneStatusBar.java)

E/AndroidRuntime( 2348):	at com.android.systemui.statusbar.phone.PhoneStatusBar$SettingsObserver.onChange(PhoneStatusBar.java)

E/AndroidRuntime( 2348):	at android.database.ContentObserver.onChange(ContentObserver.java:129)

E/AndroidRuntime( 2348):	at android.database.ContentObserver$NotificationRunnable.run(ContentObserver.java:180)

E/AndroidRuntime( 2348):	at android.os.Handler.handleCallback(Handler.java:615)

E/AndroidRuntime( 2348):	at android.os.Handler.dispatchMessage(Handler.java:92)

E/AndroidRuntime( 2348):	at android.os.Looper.loop(Looper.java:137)

E/AndroidRuntime( 2348):	at android.app.ActivityThread.main(ActivityThread.java:4921)

E/AndroidRuntime( 2348):	at java.lang.reflect.Method.invokeNative(Native Method)

E/AndroidRuntime( 2348):	at java.lang.reflect.Method.invoke(Method.java:511)

E/AndroidRuntime( 2348):	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1027)

E/AndroidRuntime( 2348):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

E/AndroidRuntime( 2348):	at dalvik.system.NativeStart.main(Native Method)

E/android.os.Debug( 2206): !@Dumpstate > dumpstate -k -t -z -d -o /data/log/dumpstate_app_error

what i do wrong?