[XDA-University] ShaDisNX255:
[Help]

I would appreciate if anybody could help me know what is wrong here. I have successfully implemented 3Minit battery (for batteries I can download) but when I try to select one of the offline batteries, it crashes SystemUI

Now, I know I could go ahead and ask the 3Minit people for help, but I want to try to fix it myself before I do that (may be a good learning excercise), but I'm not very good at interpreting what the log is telling me what is wrong

Here is what the log is telling me:

06-13 12:20:51.720 19642 19642 D BatteryMeterView: ACTION_BATTERY_CHANGED : level:53 status:3 health:2
06-13 12:20:51.730 19642 19642 D AndroidRuntime: Shutting down VM
06-13 12:20:51.730 19642 19642 E AndroidRuntime: FATAL EXCEPTION: main
06-13 12:20:51.730 19642 19642 E AndroidRuntime: Process: com.android.systemui, PID: 19642
06-13 12:20:51.730 19642 19642 E AndroidRuntime: java.lang.RuntimeException: Error receiving broadcast Intent { act=android.intent.action.BATTERY_CHANGED flg=0x60000010 bqHint=4 (has extras) } in com.android.systemui.statusbar.policy.MinitBattery$1@a27cddc
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:1007)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at android.os.Handler.handleCallback(Handler.java:739)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at android.os.Handler.dispatchMessage(Handler.java:95)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at android.os.Looper.loop(Looper.java:148)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at android.app.ActivityThread.main(ActivityThread.java:7406)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at java.lang.reflect.Method.invoke(Native Method)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
06-13 12:20:51.730 19642 19642 E AndroidRuntime: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.systemui.statusbar.policy.MinitBattery$ResourceManager.getResourceId(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.systemui.statusbar.policy.MinitBattery$ResourceManager.getDrawable(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.systemui.statusbar.policy.MinitBattery.getDefaultBattery(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.systemui.statusbar.policy.MinitBattery.getNormalDrawable(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.systemui.statusbar.policy.MinitBattery.updateImageView(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.systemui.statusbar.policy.MinitBattery.access$300(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at com.android.systemui.statusbar.policy.MinitBattery$1.onReceive(MinitBattery.java)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	at android.app.LoadedApk$ReceiverDispatcher$Args.run(LoadedApk.java:997)
06-13 12:20:51.730 19642 19642 E AndroidRuntime:	... 7 more
06-13 12:20:51.730 19642 19642 I Process : Sending signal. PID: 19642 SIG: 9
06-13 12:20:51.730 706 720 W ActivityManager: Process com.android.systemui has crashed too many times: killing!

Thanks for reading!