Obsolete
Status Update
Comments
en...@google.com <en...@google.com>
ka...@gmail.com <ka...@gmail.com> #2
I've experienced the same issue but without a path to reproduce. The line refers to mService.isScreenOn(), it's simply delegating to the Binder interface. I'm not sure what there is to fix, or why that would be null...
je...@android.com <je...@android.com> #3
Something likely crashed earlier in the boot process so the power manager
service is not registered with the service manager. All other app
processes are likely to be killed soon when the system server restarts.
service is not registered with the service manager. All other app
processes are likely to be killed soon when the system server restarts.
ia...@iangclifton.com <ia...@iangclifton.com> #4
I've seen this NPE a few times in a section of code that's just doing this:
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
mScreenOn = pm != null && pm.isScreenOn();
Samsung SGH-T99 running 4.2.2:
android.os.PowerManager.isScreenOn(PowerManager.java:854)
HTC EVO running 4.1.1:
android.os.PowerManager.isScreenOn(PowerManager.java:629)
PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE);
mScreenOn = pm != null && pm.isScreenOn();
Samsung SGH-T99 running 4.2.2:
android.os.PowerManager.isScreenOn(PowerManager.java:854)
HTC EVO running 4.1.1:
android.os.PowerManager.isScreenOn(PowerManager.java:629)
sa...@google.com <sa...@google.com> #5
Thank you for your feedback. We have tried our best to address the issue reported, however our product team has shifted work priority which doesn't include this issue. For now, we will be closing the issue as "Won't Fix (Obsolete)". If this issue still currently exists, we request that you log a new issue along with the latest bug report here: https://goo.gl/TbMiIO and reference this bug for context.
Description
java.lang.NullPointerException
at android.os.PowerManager.isScreenOn(PowerManager.java:584)
at android.view.ViewRootImpl.<init>(ViewRootImpl.java:384)
at android.view.WindowManagerGlobal.addView(WindowManagerGlobal.java:216)
at android.view.WindowManagerImpl.addView(WindowManagerImpl.java:69)
at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2930)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2359)
at android.app.ActivityThread.access$600(ActivityThread.java:150)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1244)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5191)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
at dalvik.system.NativeStart.main(Native Method)