yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] Goldie:
Yeah but its not an imageview its a drawable. So the invoke needs to be on Landroid/graphics/drawable/Drawable; not Landroid/widget/ImageView;

:)
[Galaxy S II Android Development] maskerwsk:
Awesome thank you! it has re-compiled and flashed fine, statusbar doesn't FC anymore, but....the icons are no longer there lol

ive set the colour with a colour picker and restarted systemUI/Phone but still nothing.

here is almost the entire smali, I removed some umodded methods so it would let me post it. can you see anything wrong? thanks for all the help btw
[Galaxy S II Android Development] Goldie:
Just looked at mine and I invoke after setimagedrawable on both v0 and v1 respectively. I guess it needs to be on the v1 only then. Sorry about that! :p
[Galaxy S II Android Development] maskerwsk:
No worries, so ive reverted the other part and added the setimagedrawable (see below) now icons are back but still white, is the below OK?
[Galaxy S II Android Development] Goldie:
Ok then....3rd time lucky....invoke after the last setimagedrawable on v0.....lol
[Galaxy S II Android Development] maskerwsk:
yep I tried that aswell, and icons aren't there.

I may have found out whats going on though.

I changed the porterduff mode from MULTIPLY to OVERLAY and the icons are there now (invoking on v0) but are still white (should be green)

so it could be down to that, just have to test each one out I guess lol.

do you think it would be better to try without the porterduff mode and use setColorFilter instead?
[Galaxy S II Android Development] Goldie:
Yeah. Or try SRC_ATOP. Although I use multiply fine
[Galaxy S II Android Development] maskerwsk:
yeah tried them but still no luck.

might try it another way, see what happens

---------- Post added at 02:56 PM ---------- Previous post was at 02:37 PM ----------

after all that pissing about its was this simple:

thanks for the help [MENTION=3065070]Goldie[/MENTION]
[Galaxy S II Android Development] remuntada78:
Hi Goldie , in your opinion is possible or exist a code or method to show color at random in the keypad when you press a button, i mean the color of the button pressed?

i've yet found id about it
[Galaxy S II Android Development] remuntada78:
[MENTION=3065070]Goldie[/MENTION] ,

hi goldie do you remember this?

you helped me whit SecSettings.apk but I left this

do you think it is possible to do?it's hard to do for me as noob , i thought that whit your find by ids tutorial I might try

sorry for many questions, i've many ideas in my head, some i can do it other not:p
[Galaxy S II Android Development] Goldie:
Well its possible but needs a picker and cond for every style on every toggle. Would take a good while
[Galaxy S II Android Development] remuntada78:
i found a java code to get a random color for a buttonhttp://stackoverflow.com/questions/11567212/how-to-set-background-to-a-random-color-at-button-press-in-android, i want it for button pressed in keypad sim unlock

but i'm not able to translate java code in smali code to implement it, so I decided to do only change background color whit colorpicker.

to do this i want use calling things by ids tutorial, and I thought to add this code in SimUnlockScreen.smali

.field mButtonPressed:Landroid/view/View;
.
.
.
const v0, 0x01080131 "this is id of btn_default_pressed_holo_dark"

invoke-virtual {p1, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

move-result-object v0

iput-object v0, p0, Lcom/android/internal/policy/impl/SimUnlockScreen;->mButtonPressed:Landroid/view/View;

iget-object v0, p0 Lcom/android/internal/policy/impl/SimUnlockScreen;->mButtonPressed:Landroid/view/View;

invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

check-cast v0, Landroid/widget/ImageView;

invoke-virtual {p1}, Landroid/view/View;->getContext()Landroid/content/Context;

move-result-object v2

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

move-result-object v2

const-string v3, "btn_pressed_color"

const v4, -0x1

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/widget/ImageView;->setColorFilter(I)V

might it work?
[Galaxy S II Android Development] Goldie:
Only a quick look but I guess so :)
[Galaxy S II Android Development] Goldie:
[MENTION=5292754]remuntada78[/MENTION] Your idea got me thinking.....I wrote a method in java and compiled into an app for a random color. Then decompiled and took the method in smali. My clock now changes color every minute! :p

Will post more when I have my plan working properly :)
[Galaxy S II Android Development] Vivek_Neel:
And someone said they have 0 knowledge about Java once in BBB thread.:D:D

Hope you remember that.:)

Sent using VIVEKROM_OMNI
[Galaxy S II Android Development] Many40:
I remember :D (Sorry for OT)
[Galaxy S II Android Development] Goldie:
Ahhh but I have google. And eclipse basically writes stuff for you! :P
[Galaxy S II Android Development] Vivek_Neel:
At least it requires a basics of Java.:D:D

Sent using VIVEKROM_OMNI
[Galaxy S II Android Development] remuntada78:
Im happy for this i can't see the moment to try it thank you

Inviato dal mio GT-I9100 utilizzando Tapatalk
[Galaxy S II Android Development] remuntada78:
hi Goldie with your code you can also set trasparency?
[Galaxy S II Android Development] remuntada78:
i tried to implement the code as above but i get this

W/dalvikvm( 2207): VFY: 'this' arg 'Landroid/content/Context;' not instance of 'Landroid/view/View;'

W/dalvikvm( 2207): VFY: rejecting opcode 0x6e at 0x0054

W/dalvikvm( 2207): VFY: rejected Lcom/android/internal/policy/impl/SimUnlockScreen;.<init> (Landroid/content/Context;Landroid/content/res/Configuration;Lcom/android/internal/policy/impl/KeyguardUpdateMonitor;Lcom/android/internal/policy/impl/KeyguardScreenCallback;Lcom/android/internal/widget/LockPatternUtils;)V

W/dalvikvm( 2207): Verifier rejected class Lcom/android/internal/policy/impl/SimUnlockScreen;

W/dalvikvm( 2207): threadid=26: thread exiting with uncaught exception (group=0x413bf2a0)

E/AndroidRuntime( 3555): *** FATAL EXCEPTION IN SYSTEM PROCESS: WindowManagerPolicy

E/AndroidRuntime( 3555): java.lang.VerifyError: com/android/internal/policy/impl/SimUnlockScreen

E/AndroidRuntime( 3555):	at com.android.internal.policy.impl.LockPatternKeyguardView.createUnlockScreenFor(LockPatternKeyguardView.java:1362)

E/AndroidRuntime( 3555):	at com.android.internal.policy.impl.LockPatternKeyguardView.recreateUnlockScreen(LockPatternKeyguardView.java:985)

E/AndroidRuntime( 3555):	at com.android.internal.policy.impl.LockPatternKeyguardView.updateScreen(LockPatternKeyguardView.java:1228)

E/AndroidRuntime( 3555):	at com.android.internal.policy.impl.LockPatternKeyguardView.access$400(LockPatternKeyguardView.java:112)

E/AndroidRuntime( 3555):	at com.android.internal.policy.impl.LockPatternKeyguardView$1.run(LockPatternKeyguardView.java:310)

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

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

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

E/AndroidRuntime( 3555):	at com.android.server.wm.WindowManagerService$PolicyThread.run(WindowManagerService.java:967)
[Galaxy S II Android Development] Goldie:
Need to see the full file :)
[Galaxy S II Android Development] Goldie:
Try to change the first p1 you added to p0
[Galaxy S II Android Development] Goldie:
I worked more on random. Now my whole theme changes when the day changes. So on 13th its like this...

Then when I wake up its like this...

Who knows what tomorrow brings.... :D
[Galaxy S II Android Development] sbreen94:
That's ridiculously cool. Me wants to know how:D :D :thumbup::thumbup:
[Galaxy S II Android Development] remuntada78:
Fantastic:thumbup:

Inviato dal mio GT-I9100 utilizzando Tapatalk
[Galaxy S II Android Development] remuntada78:
with this change i get same error ,also changing all p1 to p0:crying:
[Galaxy S II Android Development] maskerwsk:
Hey Goldie.

Does this Look OK to you?
[Galaxy S II Android Development] Goldie:
No....last invoke should be on v0 not v1
[Galaxy S II Android Development] maskerwsk:
Of course :)

compiled fine and no FC but icon still white.

could it be to-do with how its displayed in the layout?
[Galaxy S II Android Development] Goldie:
Not sure. Personally I would write a new method and call the image by the public id of the id it has in the layout xml. Then invoke the method near the end of makestatusbarview
[Galaxy S II Android Development] maskerwsk:
cool, ill give that a go then, thanks bud
[Galaxy S II Android Development] remuntada78:
i implemented code with PorterDuff$Mode for my statusbar icon

iget-object v10, p0, Landroid/view/View;->mContext:Landroid/content/Context;

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

move-result-object v11

const-string v10, "statusbar_icon_color"

const v12, -0x1

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

move-result v13

sget-object v10, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

invoke-virtual {v0, v13, v10}, Landroid/graphics/drawable/Drawable;->setColorFilter(ILandroid/graphics/PorterDuff$Mode;)V

compare with your code,

as Goldie said change last v1 with v0 ,i think also you need to change like this

iget-object v0, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mSettingsButton:Landroid/widget/ImageView;

const v1, 0x7f020096

invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setImageResource(I)V

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

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

move-result-object v5

const-string v4, "settings_icon_colour"

const v6, -0x6a6a6a

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

move-result v7

sget-object v4, Landroid/graphics/PorterDuff$Mode;->MULTIPLY:Landroid/graphics/PorterDuff$Mode;

invoke-virtual {v0, v7, v4}, Landroid/widget/ImageView;->setColorFilter(ILandroid/graphics/PorterDuff$Mode)V

try it and let me know
[Galaxy S II Android Development] maskerwsk:
thanks buddy but still same outcome, compiles fine, doesn't force close but icon still white.

FYI im modding for note 3 with android 4.4.2
[Galaxy S II Android Development] remuntada78:
could be you trying to call an image by id then maybe you need to add a couple of string in your code before the code to change color
[Galaxy S II Android Development] remuntada78:
I'm fighting with this but he winning:mad:

Inviato dal mio GT-I9100 utilizzando Tapatalk
[Galaxy S II Android Development] maskerwsk:
what does the below error mean?

'the register must be less than v16'

I havnt increased the .locals to higher than 16. not sure what it means :)
[Galaxy S II Android Development] remuntada78:
I had the same problem some time ago http://xdaforums.com/showpost.php?p=47793567&postcount=174
[Galaxy S II Android Development] maskerwsk:
thanks buddy :)

I ended up going the way goldie suggested with making a new method and calling by ID then invoking at end of makestatusbarview and all working great :)
[Galaxy S II Android Development] phenomarc:
Hi Goldie:

I'm trying to make a toggle to hide the statusbar toggles, but I'm not sure if I have to use the calling by id tutorial or showing/hiding tutorial.

I've modded the tw_statusbar_expanded.xml to hide the toggles and renamed it to another_name.xml, then I want to make a toggle to change between tw_statusbar_expanded.xml or another_name.xml.

BTW, I've created the method in PhoneStatusbar.smali, but I'm not sure if I have to call the method at the end of MakeStatusBar method or where.

Also, when you said that we can change LinearLayout to other type, which View I have to use with a layout xml?

Thanks in advance.
[Galaxy S II Android Development] Goldie:
That's not a good way of doing it in my opinion . Using two layout Xmls is not needed.

In your new method in phonestatusbar call the Id for toggles and then use the hiding stuff guide to set visibility programmatically to 0x8 (gone) or visible depending on your hide toggle key. Then invoke this method near the end of makestatusbarview.

That way any further changes you make to layout only have to be made in the usual place rather than in two xmls
[Galaxy S II Android Development] phenomarc:
I will try ASAP. Thanks.

Enviado desde mi GT-I9100 mediante Tapatalk
[Galaxy S II Android Development] phenomarc:
That's my method:

.method notoggles()V
.locals 6

iget-object v3, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

invoke-virtual {v3}, Landroid/view/View;->getContext()Landroid/content/Context;

move-result-object v3

const-string v4, "no_toggles"

const v1, 0x1

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

move-result v3

if-nez v3, :cond_1

const v3, 0x8

:cond_1

const v4, 0x7f0d00df

invoke-virtual {v1, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

return-void

.end method

It looks ok? The id match with quicksetting_container.
[Galaxy S II Android Development] Goldie:
Quite a lot wrong there. Will reply properly later if someone doesn't beat me to it :)
[Galaxy S II Android Development] remuntada78:
I think that your v register are messy ,then you need to call id with findViewById ,so maybe it could work

.method notoggles()V
.locals 6

iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

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

move-result-object v1

const-string v2, "no_toggles"

const v3, 0x1

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

move-result v3

if-nez v3, :cond_1

const v3, 0x8

:cond_1

iget-object v5, p0, [COLOR="Red"]"Here you need to use the parent that contains the container, i think it is in QuickSettings.smali"[/COLOR]

const v6, 0x7f0d00df

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

move-result-object v4

invoke-virtual {v4, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

return-void

.end method

we wait for [MENTION=3065070]Goldie[/MENTION] what says
[Galaxy S II Android Development] gerryS2:
To me it works, here's how I did it:

For tw_statubar_expanded:

<HorizontalScrollView android:id="@id/quicksetting_scroller" android:scrollbars="none" android:layout_width="wrap_content" android:layout_height="wrap_content">
<com.android.systemui.statusbar.policy.quicksetting.QuickSettingPanel android:orientation="horizontal" android:id="@id/quicksetting_container" android:layout_width="wrap_content" android:layout_height="wrap_content" android:divider="@drawable/tw_black_bg" android:showDividers="middle" />
</HorizontalScrollView>

For PhoneStatusbar.smali:

.method quickpanelsettings_view()V
.locals 6

iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

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

move-result-object v1

const-string v2, "quickpanelsettings_view"

const/4 v3, 0x1

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

move-result v3

if-nez v3, :cond_0

const v3, 0x8

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

const p0, 0x7f0d00de

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

move-result-object v4

invoke-virtual {v4, v3}, Landroid/widget/HorizontalScrollView;->setVisibility(I)V

return-void
.end method

0x7f0d00de is the public id of "quicksetting_scroller", try this method

To add android:visibility in tw_statusbar_expanded is optional, I don't use it for the toggles ;)
[Galaxy S II Android Development] phenomarc:
That's the method now:

.method notoggles()V

.locals 6

iget-object v1, p0, Lcom/android/systemui/SystemUI;->mContext:Landroid/content/Context;

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

move-result-object v1

const-string v2, "no_toggles"

const v3, 0x1

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

move-result v3

if-nez v3, :cond_1

const v3, 0x8

:cond_1

iget-object v5, p0, [COLOR="Red"]Lcom/android/systemui/statusbar/policy/quicksetting/QuickSettingPanel;->mView:Landroid/view/View;[/COLOR]

const v6, 0x7f0d00df

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

move-result-object v4

invoke-virtual {v4, v3}, Landroid/widget/LinearLayout;->setVisibility(I)V

return-void

.end method

---------- Post added at 06:15 PM ---------- Previous post was at 06:13 PM ----------

I will try now. Thanks!

In PhoneStatusbar.smali, where you invoke your method? I saw near the end of Makestatusbarview method.
[Galaxy S II Android Development] gerryS2:
I have insert the invoke at this part of the method makestatusbarview:

invoke-virtual {v9, v10}, Landroid/widget/LinearLayout;->setFocusable(Z)V

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

iget-object v9, p0, Lcom/android/systemui/statusbar/BaseStatusBar;->mLatestNotificationTitle:Landroid/widget/LinearLayout;

iget-object v10, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mClearButtonFocusChangeListener:Landroid/view/View$OnFocusChangeListener;

invoke-virtual {v9, v10}, Landroid/widget/LinearLayout;->setOnFocusChangeListener(Landroid/view/View$OnFocusChangeListener;)V

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

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

const v10, 0x7f0d004a

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

move-result-object v9

check-cast v9, Landroid/widget/TextView;

iput-object v9, p0, Lcom/android/systemui/statusbar/phone/PhoneStatusBar;->mPLMNLabel:Landroid/widget/TextView;

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

const v10, 0x7f0d0052
[Galaxy S II Android Development] phenomarc:
Working now. Thanks to all for the help and thanks to Goldie for opened this awesome thread.
[Galaxy S II Android Development] Goldie:
Thanks guys. So nice to see the thread used as intended and people helping each other as they learn more :thumbup:
[Galaxy S II Android Development] phenomarc:
Thank you.

If I want to hide the wanam toggles, I only have to change the id for the exp_power_id? Or I have to change something else?
[Galaxy S II Android Development] Goldie:
Yeah just that I would think :)
[Galaxy S II Android Development] phenomarc:
It give FC. I think that I have to include the com.android... in a HoritzontalScreenView in tw_statusbar_expanded.xml to work, because the method says so.

Enviado desde mi GT-I9100 mediante Tapatalk
[Galaxy S II Android Development] remuntada78:
I am always stop with this

http://xdaforums.com/showpost.php?p=49464436&postcount=314

i can't understand i need an help
[Galaxy S II Android Development] Goldie:
p0 is this. p1 is the first parameter of the method. You added all the code for buttonpressed and the listener etc?
[Galaxy S II Android Development] remuntada78:
I guess not ,which other code i need to add? i think i don't I've ever done :eek: any suggestion?

for listener you mean invoke-virtual {v0, p0}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V ?
[Galaxy S II Android Development] MyLifeRocks10:
Hey [MENTION=3065070]Goldie[/MENTION], I implemented a mod to show notification count with toggle but since StatusBarIconView.smali doesn't have observer it requires reboot for toggle to take effect so is there a way to add observer for StatusBarIconView.smali file so that changes take place immediately? I looked at CM's code and it uses StatusBarIconView$GlobalSettingsObserver.smali file for it but it uses different method to show count.
[Galaxy S II Android Development] remuntada78:
i'm not sure but maybe this is the way http://xdaforums.com/showpost.php?p=48197601&postcount=240
[Galaxy S II Android Development] Goldie:
Lol....16th Jan....just gotta say....some people are always one step behind.... ;)
[Galaxy S II Android Development] Goldie:
I mean you added it already. Im not sure you can do what you want to do like that. You added another listener etc rather than using existing view didnt you?
[Galaxy S II Android Development] remuntada78:
no, I just added what I posted, but I'm thinking that maybe I should proceed in another way:

add the field .field mButtonPressed:I;

then add this code:

const v0, 0x01080131

invoke-virtual {p0, v0}, Landroid/view/View;->findViewById(I)Landroid/view/View;

move-result-object v0

iput-object v0, p0, Lcom/android/internal/policy/impl/SimUnlockScreen;->mButtonPressed:I;

iget-object v0, p0, Lcom/android/internal/policy/impl/SimUnlockScreen;->mButtonPressed:I;

invoke-virtual {v1, v0}, Landroid/content/res/Resources;->getDrawable(I)Landroid/graphics/drawable/Drawable;

move-result-object v2

invoke-virtual {v1, v2}, Landroid/widget/ImageView;->setImageDrawable(Landroid/graphics/drawable/Drawable;)V

invoke-virtual {v2}, Landroid/graphics/drawable/Drawable;->getContext()Landroid/content/Context;

move-result-object v3

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

move-result-object v3

const-string v4, "text_color"

const v5, -0x1

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

move-result v3

invoke-virtual {v1, v4}, Landroid/widget/ImageView;->setColorFilter(I)V

what do you think?
[Galaxy S II Android Development] Goldie:
Yeah maybe. That looks better anyway. Ive not looked at pressed. I guess its from a drawable xml. Not sure if it will work the same :)
[Galaxy S II Android Development] remuntada78:
ohh noo!!!:crying::crying:

imagine your random color code in the dialer keypad and when you press on number the buttons show different color:laugh::laugh::laugh:
[Galaxy S II Android Development] Goldie:
Just duplicate another observer and replace its name and all instances with StatusBarIconView. Then replace the key in it and get it to run the right method in onchange. Then just initialise the observer in statusbariconview like this one for clock...

new-instance v1, Lcom/android/systemui/statusbar/policy/Clock$SettingsObserver;

new-instance v2, Landroid/os/Handler;

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

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

invoke-virtual {v1}, Lcom/android/systemui/statusbar/policy/Clock$SettingsObserver;->observe()V
[Galaxy S II Android Development] MyLifeRocks10:
Thanks for that. The method I'm using for count has argument in it so don't know how to use register for it in settingsobserver.:o This is the method name:

.method public set(Lcom/android/internal/statusbar/StatusBarIcon;)Z

I have attatched my files for you to look.:fingers-crossed: