yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] remuntada78:
[MENTION=3065070]Goldie[/MENTION], my new stuff here http://xdaforums.com/galaxy-s2/development-derivatives/mod-how-to-change-dialer-background-t2850923#post54886993 thanks again for your guide:good:
[Galaxy S II Android Development] Goldie:
Nice mate :)
[Galaxy S II Android Development] remuntada78:
[MENTION=3065070]Goldie[/MENTION]

Hi Goldie i tried to implement the stuff to change color for the ticker text in the statusbar, i added the following method in PhoneStatusBar.smali file

.method setTickerTextColor()V
.locals 5

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

const v1, 0x7f0d00db

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

move-result-object v0

check-cast v0, Landroid/widget/TextView;

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

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

move-result-object v2

const-string v3, "text_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/TextView;->setTextColor(I)V

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

const v1, 0x7f0d00dc

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

move-result-object v0

check-cast v0, Landroid/widget/TextView;

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

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

move-result-object v2

const-string v3, "text_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/TextView;->setTextColor(I)V

return-void
.end method

and added the invoke of the method in method.makestatusbar and all the code in PhoneStatusBar$SettingsObserver.smali file

but the text is not colored and i don't have FC

have you some explanation for that?

thanks in advance
[Galaxy S II Android Development] Goldie:
If i remember right you have to do it in phonestatusbar$myticker file
[Galaxy S II Android Development] Pankaj Rai:
Thanks. Got a great help in this thread
[Galaxy S II Android Development] remuntada78:
[MENTION=3065070]Goldie[/MENTION]

Hi Goldie, I have included all my settings's mod inside Display header, so i thought to add a new header in Settings where include them, to achieve this i followed this guide http://xdaforums.com/showpost.php?p=47872745&postcount=1, clearly my goal is different from the guide

However, after all my changes i got this error

W/dalvikvm( 4273): VFY: execution can walk off end of code area (from 0x17f)

W/dalvikvm( 4273): VFY: rejected Lcom/android/settings/custommod/ModSettings;.updateState ()V

W/dalvikvm( 4273): Verifier rejected class Lcom/android/settings/custommod/ModSettings;

W/dalvikvm( 4273): Class init failed in newInstance call (Lcom/android/settings/custommod/ModSettings;)

D/AndroidRuntime( 4273): Shutting down VM

W/dalvikvm( 4273): threadid=1: thread exiting with uncaught exception (group=0x414142a0)

E/AndroidRuntime( 4273): FATAL EXCEPTION: main

E/AndroidRuntime( 4273): java.lang.VerifyError: com/android/settings/custommod/ModSettings

E/AndroidRuntime( 4273):	at java.lang.Class.newInstanceImpl(Native Method)

E/AndroidRuntime( 4273):	at java.lang.Class.newInstance(Class.java:1319)

this is the new smali file where i put all my stuff View attachment ModSettings.zip

thanks in advance
[Galaxy S II Android Development] maskerwsk:
Maybe try it with this one.

http://xdaforums.com/showthread.php?t=2166315

Thats the one I used to create my rom control tab
[Galaxy S II Android Development] Goldie:
Missing return void i guess
[Galaxy S II Android Development] remuntada78:
I followed the [MENTION=2910757]Didact74[/MENTION] way and all work fine, but now i need to add the .method private updateState()V where to put code like this

iget-object v0, p0, Lcom/android/settings/custommod/ModSettings;->mTextColor:Lcom/loser/colorpicker/ColorPickerPreference;

invoke-virtual {p0}, Lcom/android/settings/custommod/ModSettings;->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-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

move-result-object v3

const/16 v5, 0x0

invoke-virtual {v0, v5, v3}, Lcom/loser/colorpicker/ColorPickerPreference;->onSetInitialValue(ZLjava/lang/Object;)V

because the Color Piker don't show the last selected color

when all my settings's stuff were in DisplaySettings.smali the .method private updateState()V was recall in the .method public onResume()V like this

.method public onResume()V
.locals 5

.prologue
const/4 v2, 0x0

const/4 v1, 0x1

.line 779
invoke-super {p0}, Lcom/android/settings/SettingsPreferenceFragment;->onResume()V

.line 780
invoke-direct {p0}, Lcom/android/settings/DisplaySettings;->updateAnimation()V

.line 781
[COLOR="Red"] invoke-direct {p0}, Lcom/android/settings/DisplaySettings;->updateState()V[/COLOR]

so in my new smali i also added the .method public onResume()V like this

.method public onResume()V
.locals 0

invoke-super {p0}, Lcom/android/settings/SettingsPreferenceFragment;->onResume()V

invoke-direct {p0}, Lcom/android/custommod/ModSettings;->updateState()V

return-void

.end method

but i got this error

I/dalvikvm( 4954): Could not find method com.android.custommod.ModSettings.updateState, referenced from method com.android.settings.custommod.ModSettings.onResume

W/dalvikvm( 4954): VFY: unable to resolve virtual method 3377: Lcom/android/custommod/ModSettings;.updateState ()V

D/dalvikvm( 4954): VFY: replacing opcode 0x70 at 0x0003

D/AndroidRuntime( 4954): Shutting down VM

W/dalvikvm( 4954): threadid=1: thread exiting with uncaught exception (group=0x412492a0)

E/AndroidRuntime( 4954): FATAL EXCEPTION: main

E/AndroidRuntime( 4954): java.lang.NoClassDefFoundError: com.android.custommod.ModSettings

E/AndroidRuntime( 4954):	at com.android.settings.custommod.ModSettings.onResume(ModSettings.java)

i understand that the problem is the invoke, but why?
[Galaxy S II Android Development] maskerwsk:
Feel free to take a look at my rom control smali here. It has color pickers

http://xdaforums.com/showthread.php?t=2748827
[Galaxy S II Android Development] remuntada78:
Hi maskerwsk, i'm sorry but your RomSettings.smali don't solve my problem

I explain better my need:

in the above picture the highlighted section show the selected color, now with the [MENTION=2910757]Didact74[/MENTION] way if i select a color and i go out from Color Piker when i turn back to ColorPiker to choose a color the highlighted section don''t show me the last color selected

To solve this i need to add some code as the following into a method called .method private updateState()V

iget-object v0, p0, Lcom/android/settings/custommod/ModSettings;->mTextColor:Lcom/loser/colorpicker/ColorPickerPreference;

invoke-virtual {p0}, Lcom/android/settings/custommod/ModSettings;->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-static {v3}, Ljava/lang/Integer;->valueOf(I)Ljava/lang/Integer;

move-result-object v3

const/16 v5, 0x0

invoke-virtual {v0, v5, v3}, Lcom/loser/colorpicker/ColorPickerPreference;->onSetInitialValue(ZLjava/lang/Object;)V

the .method private updateState()V need to be invoked into a method called .method public onResume()V

I hope I was clear

edit: solved:laugh::laugh:

was wrong to insert the exact address for the invoke

wrong address

.method public onResume()V
.locals 0

invoke-super {p0}, Lcom/android/settings/SettingsPreferenceFragment;->onResume()V

invoke-direct {p0}, [COLOR="Red"]Lcom/android/custommod/ModSettings;->updateState()V[/COLOR]

return-void

.end method

right address

.method public onResume()V
.locals 0

invoke-super {p0}, Lcom/android/settings/SettingsPreferenceFragment;->onResume()V

invoke-direct {p0},[COLOR="Red"] Lcom/android/settings/custommod/ModSettings;->updateState()V[/COLOR]

return-void

.end method
[Galaxy S II Android Development] Pankaj Rai:
Plz anyone tell me how to add apps in settings .. KitKat devices
[Galaxy S II Android Development] remuntada78:
[MENTION=3065070]Goldie[/MENTION]

Hi Goldie i have a doubt ,it's possible to have more than one "return" in the same method?

Here's an example

code
.
.
.
.
:cond_0
:goto_0
move v5, v2

return v5
code
.
.
.
.
.
.
:goto_16
move v2, v3

:goto_17
return v2
code

thanks in advance
[Galaxy S II Android Development] Goldie:
Its possible i believe yes but not really optimal as you are doubling up code. Would be better to do a move then a goto a single goto
[Galaxy S II Android Development] remuntada78:
so it need to return the same register?
[Galaxy S II Android Development] Goldie:
For example....

goto :goto_1

.

.

.

:goto_1

move v2, v5

return v2

:goto_2

move v4, v5

return v5

.....would be better as....

goto :goto_1

.

.

.

:goto_1

move v2, v5

goto :goto_3

:goto_2

move v2, v4

goto :goto_3

.

.

.

.

:goto_3

return v2
[Galaxy S II Android Development] remuntada78:
can i PM you?
[Galaxy S II Android Development] tdunham:
Is there a smali method(s) already available that will show a list of installed apps, let you select one and assign it so that it can be utilized as a default launch action?
[Galaxy S II Android Development] tdunham:
[MENTION=3065070]Goldie[/MENTION]

About my previous post, I've been still searching for this and finally found you completed this but cannot find a followup post in the thread. Do you mind if I used part of your smali method for this please? Tnx TD
[Galaxy S II Android Development] maskerwsk:
I think ive seen this error before and im sure it was called when i had errors in checkbox/list preferences in the rom control smali. I cant be sure but i think it was because there was entries in the smali which didnt relate to things in the xml
[Galaxy S II Android Development] the_vanya1:
Hi guys, I trying to add colorpicker to statusbar ticker. Pls check my code

.line 223
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/Ticker;->mTextSwitcher:Landroid/widget/TextSwitcher;

invoke-virtual {v0}, Landroid/widget/TextSwitcher;->reset()V

.line 224
iget-object v0, p0, Lcom/android/systemui/statusbar/phone/Ticker;->mTextSwitcher:Landroid/widget/TextSwitcher;

invoke-virtual {v11}, Lcom/android/systemui/statusbar/phone/Ticker$Segment;->getText()Ljava/lang/CharSequence;

move-result-object v1

invoke-virtual {v0, v1}, Landroid/widget/TextSwitcher;->setText(Ljava/lang/CharSequence;)V

invoke-virtual {v0}, Landroid/widget/TextView;->getContext()Landroid/content/Context;

move-result-object v1

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

move-result-object v1

const-string v2, "ticker_text_color"

const v3, -0xcc4a1a

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

move-result v1

invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
[Galaxy S II Android Development] Goldie:
You put the contentresolver string and default into v1, v2, and v3 but then for some reason use 2,3 and 4 in the invoke for getint
[Galaxy S II Android Development] the_vanya1:
I change it to this, but FC

invoke-virtual {v0, v1}, Landroid/widget/TextSwitcher;->setText(Ljava/lang/CharSequence;)V

invoke-virtual {v0}, Landroid/widget/TextView;->getContext()Landroid/content/Context;

move-result-object v1

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

move-result-object v1

const-string v2, "ticker_text_color"

const v3, -0xcc4a1a

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

move-result v1

invoke-virtual {v0, v1}, Landroid/widget/TextView;->setTextColor(I)V
[Galaxy S II Android Development] Goldie:
Then you should get the log and read it and try to understand what is happening. If unclear then ask. But first you should try
[Galaxy S II Android Development] Goldie:
As far as i know you cant just add the field as it will be null. You could try to get context some other way maybe. I really dont know without looking in depth at all the files which I simply dont have time to do
[Galaxy S II Android Development] remuntada78:
ok , but i don't understand, original LockscreenNotifications.smali don't have the .field private mContext:Landroid/content/Context; so why

logcat gives me

D/dalvikvm( 6086): DexOpt: couldn't find field Lcom/android/settings/AOSPAL/LockscreenNotifications;.mContext

W/dalvikvm( 6086): VFY: unable to resolve instance field 545

D/dalvikvm( 6086): VFY: replacing opcode 0x54 at 0x022a

D/dalvikvm( 6086): DexOpt: couldn't find field Lcom/android/settings/AOSPAL/LockscreenNotifications;.mContext

W/dalvikvm( 6086): VFY: unable to resolve instance field 545

D/dalvikvm( 6086): VFY: replacing opcode 0x54 at 0x0062

D/dalvikvm( 6086): DexOpt: couldn't find field Lcom/android/settings/AOSPAL/LockscreenNotifications;.mContext

I/dalvikvm( 6086): DexOpt: unable to optimize instance field ref 0x0221 at 0x24c in Lcom/android/settings/AOSPAL/LockscreenNotifications;.onCreate

D/dalvikvm( 6086): DexOpt: couldn't find field Lcom/android/settings/AOSPAL/LockscreenNotifications;.mContext

I/dalvikvm( 6086): DexOpt: unable to optimize instance field ref 0x0221 at 0x82 in Lcom/android/settings/AOSPAL/LockscreenNotifications;.onPreferenceChange

E/AndroidRuntime( 6086): FATAL EXCEPTION: main

E/AndroidRuntime( 6086): java.lang.NoSuchFieldError: com.android.settings.AOSPAL.LockscreenNotifications.mContext

E/AndroidRuntime( 6086):	at com.android.settings.AOSPAL.LockscreenNotifications.onCreate(LockscreenNotifications.java:128)

E/AndroidRuntime( 6086):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:796)

E/AndroidRuntime( 6086):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1035)

E/AndroidRuntime( 6086):	at android.app.BackStackRecord.run(BackStackRecord.java:635)

E/AndroidRuntime( 6086):	at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:1399)

E/AndroidRuntime( 6086):	at android.app.Activity.performStart(Activity.java:5215)

E/AndroidRuntime( 6086):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2083)

E/AndroidRuntime( 6086):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)

E/AndroidRuntime( 6086):	at android.app.ActivityThread.access$700(ActivityThread.java:140)

E/AndroidRuntime( 6086):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)

E/AndroidRuntime( 6086):	at android.os.Handler.dispatchMessage(Handler.java:99)

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

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

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

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

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

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

E/AndroidRuntime( 6086):	at dalvik.system.NativeStart.main(Native Method)
[Galaxy S II Android Development] Goldie:
Maybe comes from its super
[Galaxy S II Android Development] remuntada78:
you mean

.class public Lcom/android/settings/AOSPAL/LockscreenNotifications;
.super Lcom/android/settings/SettingsPreferenceFragment;
.source "LockscreenNotifications.java"

so i need to look at SettingsPreferenceFragment.smali ?
[Galaxy S II Android Development] Goldie:
Well you call the msignalrandomcolor and use it to filter as the last thing. So even if it's disabled it sets the color to your chosen in set_signal_randomcolor and then sets it again after the invoke of that method. You should do the coloring in the set_signal_randomcolor method for both random and not.

Something to think about is....In that mod you are checking database twice for every refresh of signal. That's gonna impact battery I think. You should call the method once and store the state and colors in fields. Then iget the field and color after the existing setImageResource
[Galaxy S II Android Development] remuntada78:
if I understand correctly you mean like the following code?

.method set_signal_randomcolor()V
.locals 13

iget-object v6, p0, Lcom/android/systemui/statusbar/SignalClusterView;->mMobile:Landroid/widget/ImageView;

invoke-virtual {v6}, Landroid/widget/TextView;->getContext()Landroid/content/Context;

move-result-object v6

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

move-result-object v6

const-string v7, "signal_bg_state"

const/4 v8, 0x0

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

move-result v6

if-eqz v6, :cond_0

const/16 v5, 0x100

new-instance v1, Ljava/util/Random;

invoke-direct {v1}, Ljava/util/Random;-><init>()V

.local v1, rnd:Ljava/util/Random;
const/16 v2, 0xff

invoke-virtual {v1, v5}, Ljava/util/Random;->nextInt(I)I

move-result v3

invoke-virtual {v1, v5}, Ljava/util/Random;->nextInt(I)I

move-result v4

invoke-virtual {v1, v5}, Ljava/util/Random;->nextInt(I)I

move-result v5

invoke-static {v2, v3, v4, v5}, Landroid/graphics/Color;->argb(IIII)I

move-result v0

goto :goto_1

:cond_0
iget-object v6, p0, Lcom/android/systemui/statusbar/SignalClusterView;->mMobile:Landroid/widget/ImageView;

invoke-virtual {v6}, Landroid/widget/ImageView;->getContext()Landroid/content/Context;

move-result-object v6

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

move-result-object v6

const-string v7, "signal_color"

const v8, -0x1

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

move-result v0

goto :goto_1

:goto_1
iput v0, p0, Lcom/android/systemui/statusbar/SignalClusterView;->mSignalRandomColor:I

return-void
.end method

if yes ,it don't work i can't change again color with color picker

if i don't understand correctly can you have the patience to explain it to me?

thanks again

[MENTION=3065070]Goldie[/MENTION]

Have you a suggestion?

[MENTION=3065070]Goldie[/MENTION]

i'm sorry i was wrong, i had the files i was working in a different folder in pc and don't put them in my SystemUI so i flashed the wrong files

the above method work perfectly thanks again:good::laugh:
[Galaxy S II Android Development] the_vanya1:
How to add custom background to expanded header on 4.1?
[Galaxy S II Android Development] Goldie:
That is really a theming question rather than smali. Take a look at this thread from my team mate Bubba...

http://xdaforums.com/showthread.php?t=2844710
[Galaxy S II Android Development] the_vanya1:
I mean, how to add this future and change it from settings, sir remuntada78 already did it
[Galaxy S II Android Development] remuntada78:
As for your question in http://xdaforums.com/galaxy-s2/development-derivatives/mod-how-to-change-dialer-background-t2850923/page3 i don't think that code with which we are working in this thread can work for your device,the last time

that i see your systemui it was definitely different from Samsung code.

In this thread must of the code is for Samsung devices sorry mate

Sorry for OT
[Galaxy S II Android Development] the_vanya1:
Can you share your code or .smali for custom header color?
[Galaxy S II Android Development] Goldie:
Buddy the idea of the thread is reading and learning. There is more than enough info in the first few posts to do what you want. This is not the place to ask for ready made code.

Read...try.....post logs....then ask
[Galaxy S II Android Development] the_vanya1:
Pls check my code, i add setTextColor part

.method private final updateClock()V

.locals 12

.prologue

const v11, 0x7f090002

const/4 v10, 0x2

const/4 v9, 0x1

const/4 v8, 0x0

.line 115

invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/DateView;->getContext()Landroid/content/Context;

move-result-object v2

.line 116

.local v2, context:Landroid/content/Context;

new-instance v6, Ljava/util/Date;

invoke-direct {v6}, Ljava/util/Date;-><init>()V

.line 120

.local v6, now:Ljava/util/Date;

const-string v7, "EEEE"

invoke-static {v7, v6}, Landroid/text/format/DateFormat;->format(Ljava/lang/CharSequence;Ljava/util/Date;)Ljava/lang/CharSequence;

move-result-object v4

.line 121

.local v4, dow:Ljava/lang/CharSequence;

invoke-static {v2}, Landroid/text/format/DateFormat;->getMediumDateFormat(Landroid/content/Context;)Ljava/text/DateFormat;

move-result-object v7

invoke-virtual {v7, v6}, Ljava/text/DateFormat;->format(Ljava/util/Date;)Ljava/lang/String;

move-result-object v3

.line 123

.local v3, date:Ljava/lang/CharSequence;

new-array v7, v10, [Ljava/lang/Object;

aput-object v4, v7, v8

aput-object v3, v7, v9

invoke-virtual {v2, v11, v7}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v7

invoke-virtual {p0, v7}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V

invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/DateView;->getContext()Landroid/content/Context;

move-result-object v7

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

move-result-object v7

const-string v8, "01_text_color"

const v9, -0x3c251d

invoke-static {v7, v8, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v7

invoke-virtual {p0, v7}, Landroid/widget/TextView;;->setTextColor(I)V
[Galaxy S II Android Development] Goldie:
You check it....does it work? If not whats the log say?
[Galaxy S II Android Development] the_vanya1:
I find this lin

invoke-virtual {p0, v7}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V

then

invoke-virtual {v2, v11, v7}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;
move-result-object v7

then add this code

invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/DateView;->getContext()Landroid/content/Context;

becouse - invoke-virtual {p0, v7}, Lcom/android/systemui/statusbar/policy/DateView;->setText(Ljava/lang/CharSequence;)V)

then

move-result-object v7

becouse - invoke-virtual {v2, v11, v7}, Landroid/content/Context;->getString(I[Ljava/lang/Object;)Ljava/lang/String;

move-result-object v7

And my full code

invoke-virtual {p0}, Lcom/android/systemui/statusbar/policy/DateView;->getContext()Landroid/content/Context;

move-result-object v7

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

move-result-object v7

const-string v8, "date_color"

const v9, -0x3c251d

invoke-static {v7, v8, v9}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v7

invoke-virtual {p0, v7}, Lcom/android/systemui/statusbar/policy/DateView;->setTextColor(I)V

Is it right?

---------- Post added at 09:43 PM ---------- Previous post was at 09:41 PM ----------

Sorry, but i cant read the log
[Galaxy S II Android Development] Goldie:
Did you try it?
[Galaxy S II Android Development] the_vanya1:
yes sir, its work, thx. But i want to understand this