Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BatteryBar broken with Cyanogenmod 13, fix inside #41

Open
bymoz089 opened this issue Aug 22, 2016 · 4 comments
Open

BatteryBar broken with Cyanogenmod 13, fix inside #41

bymoz089 opened this issue Aug 22, 2016 · 4 comments

Comments

@bymoz089
Copy link

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 ;)

@ahstro
Copy link

ahstro commented Aug 22, 2016

This project is pretty abandoned (no commits in 2 years), and @zst123 hasn't been active on GitHub since february. If you're willing to invest the time, you might want to track them down (XDA-developers or their commit email address might be a good start?) and see if they can transfer the repo to you. Good luck :)

@bymoz089
Copy link
Author

Just wanted to post my solution.
This project seems still to be used by some users.
Maybe zst123 got some personal matters and has time later.

@ahstro
Copy link

ahstro commented Aug 22, 2016

Maybe :)

@rxzcums
Copy link

rxzcums commented Jul 8, 2021

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 ;)

could you share your release? thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants