Skip to content

BatteryBar broken with Cyanogenmod 13, fix inside #41

@bymoz089

Description

@bymoz089

With Cyanogenmod 13 the BatteryBar function is broken (at least on "serranoltexx" and official CM 13 nightly). BatteryBar is working with NavBar option, but not with StatusBar option.
When trying to activate BatteryBar with StatusBar, XuiMod did not show the BatteryBar. :(

Thanks to XuiMod is OpenSource it is easy to fix this:

1.) locate file: BatteryBarMod.java

2a.) locate line: final Class<?> phoneStatusBar = XposedHelpers.findClass("com.android.systemui.statusbar.phone.PhoneStatusBarView", lpp.classLoader);
replace the line with: final Class<?> phoneStatusBar = XposedHelpers.findClass("com.android.systemui.statusbar.phone.StatusBarWindowView", lpp.classLoader);

OR

2b) take the line below which states: XposedBridge.hookAllMethods(phoneStatusBar, "onAttachedToWindow", hook);
replace it with: XposedBridge.hookAllMethods(phoneStatusBar, "onFinishInflate", hook);

You have to choose only one of the two solutions (2a OR 2b).
I do not know which is the better one.

compile and install ;)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions