zst123 / XuiMod

Xposed: Small Collection of Unique Features - ListView Animation, BatteryBar, SecondsClock and more.
https://forum.xda-developers.com/xposed/modules/mod-xuimod-v2-3-listview-anim-t2477558
28 stars 28 forks source link

BatteryBar broken with Cyanogenmod 13, fix inside #41

Open bymoz089 opened 8 years ago

bymoz089 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

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 commented 8 years ago

Maybe :)

rxzcums commented 3 years ago

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.