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

Few additional bits

- welcome window would also welcome the translation possibility ;)

- reference names at the stats screen perhaps too (being translatable)

- there's still that issue with settings screen and white text on the light background that appears after clean start: 1. Delete application data and start BBS. 2. Go to settings. White text on bright background and in "Switch Themes" the dark one is selected (though everything is light). 3. Go back to main screen (don't change any settings in previous step) and again to settings and settings will use dark theme while the rest of the application will still be light. Only after explicitly selecting the desired theme it will redraw.

- switching themes 3 times still causes FC, see below.

11-20 00:35:48.125 963 1033 I ActivityManager: Displayed com.asksven.betterbatterystats_xdaedition/com.asksven.betterbatterystats.PreferencesFragmentActivity_V11: +306ms
11-20 00:35:48.166 9874 9874 I StatsActivity: onSaveInstanceState references: refFrom=ref_boot refTo=ref_current
11-20 00:35:48.169 182 182 W SurfaceFlinger: couldn't log to binary event log: overflow.
11-20 00:35:49.726 963 1783 W InputMethodManagerService: Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@ad6d27a attribute=null, token = android.os.BinderProxy@2d6da196
11-20 00:35:49.729 9874 9874 D AndroidRuntime: Shutting down VM
11-20 00:35:49.730 9874 9874 E AndroidRuntime: FATAL EXCEPTION: main
11-20 00:35:49.730 9874 9874 E AndroidRuntime: Process: com.asksven.betterbatterystats_xdaedition, PID: 9874
11-20 00:35:49.730 9874 9874 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.Context android.app.Activity.getBaseContext()' on a null object reference
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at com.asksven.betterbatterystats.PreferencesFragmentActivity_V11$PrefsFragment.onSharedPreferenceChanged(PreferencesFragmentActivity_V11.java:218)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.app.SharedPreferencesImpl$EditorImpl.notifyListeners(SharedPreferencesImpl.java:476)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.app.SharedPreferencesImpl$EditorImpl.apply(SharedPreferencesImpl.java:384)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.preference.Preference.tryCommit(Preference.java:1403)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.preference.Preference.persistString(Preference.java:1436)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.preference.ListPreference.setValue(ListPreference.java:147)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.preference.ListPreference.onDialogClosed(ListPreference.java:282)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.preference.DialogPreference.onDismiss(DialogPreference.java:391)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1257)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.os.Looper.loop(Looper.java:135)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5221)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at java.lang.reflect.Method.invoke(Method.java:372)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
11-20 00:35:49.730 9874 9874 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
11-20 00:35:49.732 963 980 W ActivityManager: Force finishing activity com.asksven.betterbatterystats_xdaedition/com.asksven.betterbatterystats.PreferencesFragmentActivity_V11
11-20 00:35:49.766 182 182 W SurfaceFlinger: couldn't log to binary event log: overflow.
11-20 00:35:49.774 963 9239 I OpenGLRenderer: Initialized EGL, version 1.4
11-20 00:35:50.234 963 1028 W ActivityManager: Activity pause timeout for ActivityRecord{2216ce35 u0 com.asksven.betterbatterystats_xdaedition/com.asksven.betterbatterystats.PreferencesFragmentActivity_V11 t98 f}
11-20 00:35:52.013 9874 9874 I Process : Sending signal. PID: 9874 SIG: 9
11-20 00:35:52.062 963 1152 I WindowState: WIN DEATH: Window{2eb6b00e u0 com.asksven.betterbatterystats_xdaedition/com.asksven.betterbatterystats.StatsActivity}
11-20 00:35:52.062 963 980 I libprocessgroup: Killing pid 9933 in uid 10110 as part of process group 9874
11-20 00:35:52.062 963 980 I libprocessgroup: Killing pid 9947 in uid 10110 as part of process group 9874
11-20 00:35:52.063 963 980 I libprocessgroup: Killing pid 9933 in uid 10110 as part of process group 9874
11-20 00:35:52.063 963 980 I libprocessgroup: Killing pid 9947 in uid 10110 as part of process group 9874
11-20 00:35:52.063 963 980 I libprocessgroup: Killing pid 9933 in uid 10110 as part of process group 9874
11-20 00:35:52.063 963 980 I libprocessgroup: Killing pid 9947 in uid 10110 as part of process group 9874
11-20 00:35:52.064 963 980 I libprocessgroup: Killing pid 9933 in uid 10110 as part of process group 9874
11-20 00:35:52.064 963 980 I libprocessgroup: Killing pid 9947 in uid 10110 as part of process group 9874
11-20 00:35:52.070 963 1768 I WindowState: WIN DEATH: Window{eedb117 u0 com.asksven.betterbatterystats_xdaedition/com.asksven.betterbatterystats.PreferencesFragmentActivity_V11}
11-20 00:35:52.119 963 980 I ActivityManager: Process com.asksven.betterbatterystats_xdaedition (pid 9874) has died

EDIT: Adding more kernel wakelock info and also alarms

1. Kernel wakelocks - I left the phone for some time and then retried, still no luck. In both cases it shows the toast that an unknown error occured. Raw stats show some data in both cases, with default approach everything has zero values, with API approach there are some non-zero data (but at main screen it still gives that error message).

Could it there be also some data parsing issue? Or could that NullPointerException at FileReader.close() be tearing things apart? See attached logs and screenshot of raw stats in API mode. Logs are interesting near their end, I saved them separately for each scenario.

2. Alarms - here I see a difference between the default and API modes. Generally values in API mode are higher than in the default mode. Raw stats are the same as the processed ones in API mode. And these raw stats are also different in each mode. Not sure what could be done about this inconsistency, have a look at the attached logs and screenshots of all screens (I disabled filtering so processed stats also show zero value data). Logs are interesting near their end, I saved them separately for each scenario.

And by the way that warning from supersu that you attempt to run a shell command from the main thread would be worth fixing - Chainfire strongly discourages from that: http://su.chainfire.eu/#when-not