[Galaxy S II Android Development] remuntada78:
[MENTION=3065070]Goldie[/MENTION]. Hi I'm still trying to solve my problem with lockscreen notifications's port.

Looking at my log , it says

E/AndroidRuntime( 4338): Caused by: java.lang.NullPointerException

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

java.128 mean that error is in line 128 right?

If that is right in line 128 i have the following code

.line 128
.local v2, displaySize:Landroid/graphics/Point;
iget-object v9, p0, Lcom/android/settings/AOSPAL/LockscreenNotifications;->mContext:Landroid/content/Context;

const-string v10, "window"

invoke-virtual {v9, v10}, Landroid/content/Context;->getSystemService(Ljava/lang/String;)Ljava/lang/Object;

move-result-object v9

check-cast v9, Landroid/view/WindowManager;

invoke-interface {v9}, Landroid/view/WindowManager;->getDefaultDisplay()Landroid/view/Display;

move-result-object v9

invoke-virtual {v9, v2}, Landroid/view/Display;->getSize(Landroid/graphics/Point;)V

the first time when i tried to install the port , i got the following error

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)

so i added the field .field private mContext:Landroid/content/Context; , but with it i got the error

E/AndroidRuntime( 4338): Caused by: java.lang.NullPointerException

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

How can i solve that? Which is the problem?

thanks in advance