yashsingh1/xdaforums huggingface dataset:
[Galaxy S II Android Development] CNexus:
Use jd-gui, you don't need the exact sources of everything. Just the main parts

The following two sets of code are equivalent

if (choice ==1){
unlock_array = s2_array;
} else if (choice == 2){
unlock_array = sense_array;
} else if (choice == 3){
unlock_array == aosp_array;
}

switch (choice) {
case 1:
unlock_array = s2_array;
break;
case 2:
unlock_array = sense_array;
break;
case 3:
unlock_array == aosp_array;
break;
}

[MENTION=3065070]Goldie[/MENTION]... never say it's impossible if you've never tried it ;) you don't need the jd-gui decompiled code to be usable, you just need your new code to be usable. I've used this approach (mainly when I'm feeling lazy) and it works fine:thumbup:
[Galaxy S II Android Development] Goldie:
Lol. Not impossible just not necessary. I said compiled code from dex2jar was unuseable I.e the original code from the file you converted. If you were writing new you would most likely be using eclipse not dex2jar. I used dex2jar years ago but its really not needed here and to be honest I never used it since.l preferring to learn to write the smali. If you are good at coding in java you may as well be doing xposed modules instead of smali mods. The point of the thread is not everyone can do java and so easier to learn just smali rather than both. Im not ashamed to say I know virtually no java and struggle through with the help of the error highlighting.

Maybe use eclipse if the code you need is like something out of the ordinary like I did for random color but really way too much hassle for a simple type key switch. This thread is, after all, about learning smali. :)
[Galaxy S II Android Development] CNexus:
I understand, but I was simply elaborating in the process as it can greatly simplify things wmin situations where you are doing complex mods. So by elaborating on how to do it now, people already know how to do it later
[Galaxy S II Android Development] remuntada78:
Hi Goldie I realized that in framework there are other pngs to switch and the ids are distributed in other method and in other smali file like this in

CircleUnlockView.smali

.method private createArrow()V
.registers 3

.prologue
.line 199
new-instance v0, Landroid/widget/ImageView

iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context;

invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

.line 200
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const v1, 0x108048e [COLOR="Red"]<---png to switch[/COLOR]

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

like this in .method public constructor in CircleLockScreenMotion.smali

new-instance v1, Landroid/widget/ImageView;

iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreenMotion;->mContext:Landroid/content/Context;

invoke-direct {v1, v2}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

iput-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreenMotion;->mCircleIn:Landroid/widget/ImageView;

.line 127
iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleLockScreenMotion;->mCircleIn:Landroid/widget/ImageView;

const v2, 0x108048f [COLOR="Red"]<---png to switch[/COLOR]

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

like this in CircleMissedEventWidget$2.smali

.line 188
:pswitch_52
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget$2;->this$0:Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;

#getter for: Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;->mMissedCallMsgBackground:Landroid/widget/LinearLayout;
invoke-static {v0}, Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;->access$100(Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;)Landroid/widget/LinearLayout;

move-result-object v0

const v1, 0x1080406 [COLOR="Red"]<---png to switch[/COLOR]

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

so the way to switch them is the same of your suggestion?
[Galaxy S II Android Development] remuntada78:
Hi Goldie i tried to implement the mod of lockscreen effect but i got error in LockScreenSettings.smali

D/AndroidRuntime( 3945): Shutting down VM

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

E/AndroidRuntime( 3945): FATAL EXCEPTION: main

E/AndroidRuntime( 3945): java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Boolean

E/AndroidRuntime( 3945):	at com.android.settings.LockScreenSettings.onPreferenceChange(LockScreenSettings.java:517)

E/AndroidRuntime( 3945):	at android.preference.Preference.callChangeListener(Preference.java:895)

E/AndroidRuntime( 3945):	at android.preference.ListPreference.onDialogClosed(ListPreference.java:265)

E/AndroidRuntime( 3945):	at android.preference.DialogPreference.onDismiss(DialogPreference.java:383)

E/AndroidRuntime( 3945):	at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1240)

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

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

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

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

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

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

i think it depend on my problem with the post above this
[Galaxy S II Android Development] Goldie:
Where did you get that code above? You are tring to cast p2 of the method which it cant do
[Galaxy S II Android Development] remuntada78:
i tried to follow this guide http://xdaforums.com/showthread.php?t=2141193 to create the listpreference in lockscreen option and i got this

but when i choose an effect SecSettings goes in FC
[Galaxy S II Android Development] Goldie:
Actually scratch that. Your code doesnt include cast to boolean so it must just be misplaced. Will look properly later
[Galaxy S II Android Development] remuntada78:
What can you tell me about on post #476? Thank

Inviato dal mio GT-I9100 utilizzando Tapatalk
[Galaxy S II Android Development] remuntada78:
Hi Goldie i solved the problem with the .method public onPreferenceChange and the mod work perfectly I made these changes

.method public onPreferenceChange(Landroid/preference/Preference;Ljava/lang/Object;)Z
.locals 13
.parameter "preference"
.parameter "objValue"

.prologue
.line 363
invoke-virtual {p1}, Landroid/preference/Preference;->getKey()Ljava/lang/String;

move-result-object v4

.line 364
.local v4, key:Ljava/lang/String;
const-string v10, "dualclock_settings"

invoke-virtual {v10, v4}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

move-result v10

if-eqz v10, :cond_18 [COLOR="Red"]changed cond_2 to cond_18[/COLOR]

.line 365
check-cast p2, Ljava/lang/Boolean;

.end local p2
invoke-virtual {p2}, Ljava/lang/Boolean;->booleanValue()Z

move-result v10

if-eqz v10, :cond_1

const/4 v9, 0x1

and add this code at the end of the method

now the others ids of pngs i need to switch them look my post #476.the way is the same of your code in post #470?
[Galaxy S II Android Development] gerryS2:
Hello, I would like to create a array list to select the pictures to show in the notification panel toggle (quicksettings), the stock id are in a method constructor like this:

.method public constructor <init>(Landroid/content/Context;)V
.locals 9

const/4 v7, 0x0

const/4 v2, 0x0

const v3, 0x7f0a00f5 #text public id

const v4, 0x7f0201ba #drawable public id

const v5, 0x7f0201b9 #drawable public id

const v6, 0x7f0201b8 #drawable public id

move-object v0, p0

move-object v1, p1

move v8, v7

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

iput-boolean v7, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mIsWaitingForEcmExit:Z

new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$1;

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

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

new-instance v0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;

invoke-direct {v0, p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton$2;-><init>(Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;)V

iput-object v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mPhoneStateListener:Landroid/telephony/PhoneStateListener;

iput-object p1, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mContext:Landroid/content/Context;

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

invoke-direct {p0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->getAirplaneMode()Z

move-result v0

iput-boolean v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mAirplaneMode:Z

iget-boolean v0, p0, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->mAirplaneMode:Z

if-eqz v0, :cond_0

const/4 v0, 0x1

:goto_0
invoke-virtual {p0, v0}, Lcom/android/systemui/statusbar/policy/quicksetting/AirplaneModeQuickSettingButton;->setActivateStatus(I)V

return-void

:cond_0
const/4 v0, 0x2

goto :goto_0
.end method

I have try with insert a code but it doesn't work, can someone give me a hand?
[Galaxy S II Android Development] Goldie:
Thats one specific toggle?
[Galaxy S II Android Development] gerryS2:
Yes, I wuold create this array mod for each toggles
[Galaxy S II Android Development] CNexus:
What exactly do you want? Could you give some pseudo code for what you're trying to do? Not really understanding how you want to implement it
[Galaxy S II Android Development] remuntada78:
I need to switch others pngs this way could work?

original

.method private createArrow()V
.registers 3

.prologue
.line 199
new-instance v0, Landroid/widget/ImageView;

iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context;

invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

.line 200
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const v1, 0x108048e

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

.line 201
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const/4 v1, 0x0

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

modded

.method private createArrow()V
[COLOR="Red"] .registers 6[/COLOR]

.prologue
.line 199
new-instance v0, Landroid/widget/ImageView;

iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context;

[COLOR="Red"]move-result v2

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

move-result v2

const-string v3, "unlock_effect"

const v4, 0x0

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

move-result v2

const v4, 0x1

if-eq v2, v3, :cond_new

invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

.line 200
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const v1, 0x108048e

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

.line 201
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const/4 v1, 0x0

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

:cond_new

invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

.line 200
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const v1, 0xid of new png

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

.line 201
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const/4 v1, 0x0

invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setAlpha(I)V [/COLOR]

thanks
[Galaxy S II Android Development] Goldie:
Yes. But you dont really need to cond the whole code. Just use const v1, 0xxxxxxxx in each cond, remove the const v1, 0x108048e in the main code and put the goto at the top of main code. So you just change whats in v1 then run the rest. Either would work though :)
[Galaxy S II Android Development] remuntada78:
I'm not sure I understood you mean like this

.method private createArrow()V
[COLOR="Red"] .registers 6[/COLOR]

.prologue
.line 199
new-instance v0, Landroid/widget/ImageView;

[COLOR="Red"][/COLOR] iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context;

move-result v2

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

move-result v2

const-string v3, "unlock_effect"

const v4, 0x0

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

move-result v2

const v4, 0x1

if-eq v2, v3, :cond_new

const v1, 0x108048e

goto :goto_new

:cond_new

const v1, 0xnew id

:goto_new

invoke-direct {v0, v1}, Landroid/widget/ImageView;-><init>(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

.line 200
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

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

.line 201
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const/4 v1, 0x0

invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setAlpha(I)V[/COLOR]
[Galaxy S II Android Development] Goldie:
Nearly yes. Move these 2 lines...

invoke-direct {v0, v1}, Landroid/widget/ImageView;->(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

To above the toggle code along with an mcontext.

.method private createArrow()V
[COLOR="Red"] .registers 6[/COLOR]

.prologue
.line 199
new-instance v0, Landroid/widget/ImageView;

iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context;

invoke-direct {v0, v1}, Landroid/widget/ImageView;->(Landroid/content/Context;)V

iput-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

[COLOR="Red"][/COLOR] iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context;

move-result v2

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

move-result v2

const-string v3, "unlock_effect"

const v4, 0x0

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

move-result v2

const v4, 0x1

if-eq v2, v3, :cond_new

const v1, 0x108048e

goto :goto_new

:cond_new

const v1, 0xnew id

:goto_new

.line 200
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

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

.line 201
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->arrow:Landroid/widget/ImageView;

const/4 v1, 0x0

invoke-virtual {v0, v1}, Landroid/widget/ImageView;->setAlpha(I)V
[Galaxy S II Android Development] remuntada78:
thanks Goldie :good: go to the pub there is a beer for you:D
[Galaxy S II Android Development] Goldie:
Thanks but you didnt need to do that. This thread is for helping :)
[Galaxy S II Android Development] Goldie:
You would need to figure out how to use the array instead of directly passing a single public id. Not something I done before but will give it a go at some point soon. :)
[Galaxy S II Android Development] remuntada78:
I added the but i got bootloop

D/CircleLockScreen( 3258): explore by touch mode off

W/dalvikvm( 3258): VFY: copyRes1 v2<-v6 cat=1 type=0

W/dalvikvm( 3258): VFY: rejecting opcode 0x0a at 0x000b

W/dalvikvm( 3258): VFY: rejected Lcom/android/internal/policy/impl/sec/CircleUnlockView;.createArrow ()V

W/dalvikvm( 3258): Verifier rejected class Lcom/android/internal/policy/impl/sec/CircleUnlockView;

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

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

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

E/AndroidRuntime( 3258): java.lang.VerifyError: com/android/internal/policy/impl/sec/CircleUnlockView

E/AndroidRuntime( 3258):	at com.android.internal.policy.impl.sec.CircleLockScreen.createUnlockWidget(CircleLockScreen.java:901)

E/AndroidRuntime( 3258):	at com.android.internal.policy.impl.sec.CircleLockScreen.<init>(CircleLockScreen.java:541)

mean i need to change v2 to v0?
[Galaxy S II Android Development] Goldie:
Sorry...these lines...

iget-object v1, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context;

move-result v2

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

move-result v2

Should be...

iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context;

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

move-result-object v2
[Galaxy S II Android Development] Goldie:
Edited my above post after you thanked it. Just in case you missed it!
[Galaxy S II Android Development] remuntada78:
:p not work

/CircleLockScreen( 2841): explore by touch mode off

W/dalvikvm( 2841): VFY: args to if-eq/if-ne must both be refs or cat1

W/dalvikvm( 2841): VFY: rejecting opcode 0x32 at 0x001b

W/dalvikvm( 2841): VFY: rejected Lcom/android/internal/policy/impl/sec/CircleUnlockView;.createArrow ()V

W/dalvikvm( 2841): Verifier rejected class Lcom/android/internal/policy/impl/sec/CircleUnlockView;

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

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

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

E/AndroidRuntime( 2841): java.lang.VerifyError: com/android/internal/policy/impl/sec/CircleUnlockView

E/AndroidRuntime( 2841):	at com.android.internal.policy.impl.sec.CircleLockScreen.createUnlockWidget(CircleLockScreen.java:901)
[Galaxy S II Android Development] Goldie:
invoke-static {v2, v3, v4}, Landroid/provider/Settings$System;->getInt(Landroid/content/ContentResolver;Ljava/lang/String;I)I

move-result v2

const v4, 0x1

if-eq v2, v3, :cond_new

Should be...

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

move-result v2

const v4, 0x1

if-eq v2, v4, :cond_new
[Galaxy S II Android Development] remuntada78:
:laugh: now it work, but i need some explanation, i can understand your change like if-eq v2, v4, :cond_new and iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleUnlockView;->mContext:Landroid/content/Context; but why change move-result to move-result-object?

thanks
[Galaxy S II Android Development] Goldie:
Because the result of getcontenresolver is the resolver iteslf which is an object so it needs move-result-object
[Galaxy S II Android Development] remuntada78:
last png to switch, here is more hard to do

original

.line 181
:pswitch_2d
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget$2;->this$0:Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;

#getter for: Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;->mMissedCallMsgBackground:Landroid/widget/LinearLayout;
invoke-static {v0}, Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;->access$100(Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;)Landroid/widget/LinearLayout;

move-result-object v0

const v1, 0x108040a

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

modded

.line 181
:pswitch_2d
iget-object v0, p0, Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget$2;->this$0:Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;

#getter for: Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;->mMissedCallMsgBackground:Landroid/widget/LinearLayout;
invoke-static {v0}, Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;->access$100(Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget;)Landroid/widget/LinearLayout;

[COLOR="Red"]	iget-object v2, p0, Lcom/android/internal/policy/impl/sec/CircleMissedEventWidget$2;->mContext:Landroid/content/Context;

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

move-result-object v2

const-string v3, "unlock_effect"

const v4, 0x0

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

move-result v2

const v4, 0x1

if-eq v2, v4, :cond_new

const v1, 0x108040a

goto :goto_new

:cond_new

const v1, 0xnew id

:goto_new
[/COLOR]

move-result-object v0

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

might work?
[Galaxy S II Android Development] remuntada78:
Hi Goldie i tried with the code above ,but it not work no error no bootloop, i show you the effect

[YOUTUBE]9xBWf6dhLmg[/YOUTUBE]

In S4 effect remains the white circle, what is wrong?

edit: my mistake, no need to switch other pngs, I was wrong in the .method private createInnerCircle()V, i put the same id in the switch, now i think i finished with this mod, thank again Goldie
[Galaxy S II Android Development] CNexus:
Ok, what you can do is as follows

1) implement a listpreference that maps icon type selection to lists of the form:

id1;id2;id3;....idXXX

2)split the resulting id string in some auxiliary method to get the individual ids, so something like this

# grab the list of ids (id1;id2, etc) then call this method with that string as the parameter
.method static getIds(Ljava/lang/String)Ljava/lang/String]
.locals 1
const-string v0, ";"
invoke-virtual {p1, v0}, Ljava/lang/String;->split(Ljava/lang/String)Ljava/lang/String]

move-result-object v0

return v0

.end method

And now that you have the array of individual ids, you can change the icons using the setIcons(III) method (name is something close to that, might be setIcon or similar, I can check the exact name for you later)

-----

If you need any more help let me know...rompnit knows how much I've done with the sammy quick toggles by now so I'll probably be able to answer anything you ask lol