[BetterBatteryStats] mag01:
[MENTION=1330150]chamonix[/MENTION]

2.0.0.0B4

#518: fixed infinite wakeups per hour in alarms

While it now displays meaningful values at the Alarms view, displaying some of the entry details (touch any entry to see them) shows infinite/min

#526: FC after theme switch

This can still happen, you just need to switch the theme once more compared to previous state (e.g. previously you changed theme twice and got FC, now you get it after 3rd change). Log excerpt below.

Also there's still that weirdness when going back from settings to data screens after switching theme - you need to press back 2 times to get there though only 1 should be enough.

Oh yes, and the new theme is still not cleanly applied right after the switch. Relaunching the app sorts that out.

11-17 01:18:46.699 725 1182 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@ae35c8 attribute=null, token = android.os.BinderProxy@200de444
11-17 01:18:46.700 3476 3476 D AndroidRuntime: Shutting down VM
--------- beginning of crash
11-17 01:18:46.701 3476 3476 E AndroidRuntime: FATAL EXCEPTION: main
11-17 01:18:46.701 3476 3476 E AndroidRuntime: Process: com.asksven.betterbatterystats_xdaedition, PID: 3476
11-17 01:18:46.701 3476 3476 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.content.Context.getPackageName()' on a null object reference
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.content.ComponentName.<init>(ComponentName.java:77)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.content.Intent.<init>(Intent.java:3996)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at com.asksven.betterbatterystats.PreferencesFragmentActivity_V11$PrefsFragment.onSharedPreferenceChanged(PreferencesFragmentActivity_V11.java:215)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.app.SharedPreferencesImpl$EditorImpl.notifyListeners(SharedPreferencesImpl.java:476)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.app.SharedPreferencesImpl$EditorImpl.apply(SharedPreferencesImpl.java:384)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.preference.Preference.tryCommit(Preference.java:1403)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.preference.Preference.persistString(Preference.java:1436)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.preference.ListPreference.setValue(ListPreference.java:147)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.preference.ListPreference.onDialogClosed(ListPreference.java:282)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.preference.DialogPreference.onDismiss(DialogPreference.java:391)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1257)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5221)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
11-17 01:18:46.701 3476 3476 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
11-17 01:18:46.706 725 1876 W ActivityManager: Force finishing activity com.asksven.betterbatterystats_xdaedition/com.asksven.betterbatterystats.PreferencesFragmentActivity_V11
11-17 01:18:46.739 185 185 W SurfaceFlinger: couldn't log to binary event log: overflow.

Partial wakelocks don't seem to reset anymore after the screen goes off (Android 5.0). Good.

As for Kernel wakelocks, waiting for some next beta. I noticed your issue:

#522: retrieve kernel wakelocks from api if the kernel file access fails

So you seem to plan a different fallback approach when the primary method fails?

Still, doing it via 'su --context <SELinux-context> -c "<command>"' where the context would be like 'u:r:untrusted_app:s0', 'u:r:platform_app:s0', or 'u:r:system_app:s0' (don't know which one is enough in your case) should do the trick. But yes, that will mean you will have to leave the pure Java approach and execute something outside of it and then parse the output. :( Also don't forget to test the SELinux policy and do this only when it's enforcing (e.g. virtual file '/sys/fs/selinux/enforce' exists and contains '1').