[Galaxy S II Android Development] remuntada78:
i'm trying tocreate a observer file for DialpadFragmen.smali in LegacyInCallUI.apk but i get this error

I/art ( 1953): Verification error in void com.android.incallui.DialpadFragment$SettingsObserver.observe()

I/art ( 1953): void com.android.incallui.DialpadFragment$SettingsObserver.observe() failed to verify: 'this' argument 'Reference: com.android.incallui.DialpadFragment' not instance of 'Reference: android.view.View'

E/art ( 1953): Verification failed on class com.android.incallui.DialpadFragment$SettingsObserver in /system/app/LegacyInCallUI/LegacyInCallUI.apk because: Verifier rejected class com.android.incallui.DialpadFragment$SettingsObserver due to bad method void com.android.incallui.DialpadFragment$SettingsObserver.observe()

D/StatusBar.NetworkController( 1272): refreshSignalCluster - setNWBoosterIndicators(false)

D/AndroidRuntime( 1953): Shutting down VM

D/StatusBar.NetworkController( 1272): applyOpen

D/StatusBar.NetworkController( 1272): refreshSignalCluster - setNWBoosterIndicators(false)

D/StatusBar.NetworkController( 1272): applyOpen

E/AndroidRuntime( 1953): FATAL EXCEPTION: main

E/AndroidRuntime( 1953): Process: com.android.incallui, PID: 1953

E/AndroidRuntime( 1953): java.lang.VerifyError: Verifier rejected class com.android.incallui.DialpadFragment$SettingsObserver due to bad method void com.android.incallui.DialpadFragment$SettingsObserver.observe() (declaration of 'com.android.incallui.DialpadFragment$SettingsObserver' appears in /system/app/LegacyInCallUI/LegacyInCallUI.apk)

E/AndroidRuntime( 1953):	at com.android.incallui.DialpadFragment.onFinishInflate(DialpadFragment.java:517)

E/AndroidRuntime( 1953):	at com.android.incallui.DialpadTwelveFragment.onCreateView(DialpadTwelveFragment.java:43)

E/AndroidRuntime( 1953):	at android.app.Fragment.performCreateView(Fragment.java:2114)

E/AndroidRuntime( 1953):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:904)

E/AndroidRuntime( 1953):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1082)

E/AndroidRuntime( 1953):	at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1064)

E/AndroidRuntime( 1953):	at android.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:1884)

E/AndroidRuntime( 1953):	at android.app.Activity.performCreateCommon(Activity.java:6216)

E/AndroidRuntime( 1953):	at android.app.Activity.performCreate(Activity.java:6244)

E/AndroidRuntime( 1953):	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1119)

E/AndroidRuntime( 1953):	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2611)

E/AndroidRuntime( 1953):	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2723)

E/AndroidRuntime( 1953):	at android.app.ActivityThread.access$900(ActivityThread.java:172)

E/AndroidRuntime( 1953):	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1422)

E/AndroidRuntime( 1953):	at android.os.Handler.dispatchMessage(Handler.java:102)

E/AndroidRuntime( 1953):	at android.os.Looper.loop(Looper.java:145)

E/AndroidRuntime( 1953):	at android.app.ActivityThread.main(ActivityThread.java:5832)

E/AndroidRuntime( 1953):	at java.lang.reflect.Method.invoke(Native Method)

E/AndroidRuntime( 1953):	at java.lang.reflect.Method.invoke(Method.java:372)

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

E/AndroidRuntime( 1953):	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1194)

in the file i added this method

.method static synthetic access$001(Lcom/android/incallui/DialpadFragment;)Landroid/widget/LinearLayout;
.locals 1

.prologue
iget-object v0, p0, Lcom/android/incallui/DialpadFragment;->mDialpad:Landroid/widget/LinearLayout;

return-object v0
.end method

in the onFinishInflate method i added the following red code

.line 517
:cond_1[COLOR="Red"]
new-instance v1, Lcom/android/incallui/DialpadFragment$SettingsObserver;

new-instance v2, Landroid/os/Handler;

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

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

invoke-virtual {v1}, Lcom/android/incallui/DialpadFragment$SettingsObserver;->observe()V
[/COLOR]
return-void

.line 503
:cond_2

and in the DialpadFragment$SettingsObserver observe method says

.method observe()V
.locals 3

.prologue
const/4 v2, 0x0

.line 273

iget-object v1, p0, Lcom/android/incallui/DialpadFragment$SettingsObserver;->this$0:Lcom/android/incallui/DialpadFragment;

# getter for: Lcom/android/incallui/DialpadFragment;->mDialpad:Landroid/widget/LinearLayout;
invoke-static {v1}, Lcom/android/incallui/DialpadFragment;->access$001(Lcom/android/incallui/DialpadFragment;)Landroid/widget/LinearLayout;

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

move-result-object v1

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

move-result-object v0

have you any suggestions?