Skip to content

Commit 118fbfe

Browse files
committed
restrict to android package only
1 parent c2273b8 commit 118fbfe

File tree

1 file changed

+2
-0
lines changed
  • AlwaysAllowChargingSounds/src/main/java/de/binarynoise/AlwaysAllowChargingSounds

1 file changed

+2
-0
lines changed

AlwaysAllowChargingSounds/src/main/java/de/binarynoise/AlwaysAllowChargingSounds/Hook.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import de.robv.android.xposed.callbacks.XC_LoadPackage
1010
class Hook : IXposedHookLoadPackage {
1111

1212
override fun handleLoadPackage(lpparam: XC_LoadPackage.LoadPackageParam) {
13+
if (lpparam.packageName != "android") return
14+
1315
val NotifierClass = XposedHelpers.findClass("com.android.server.power.Notifier", lpparam.classLoader)
1416
XposedHelpers.findAndHookMethod(NotifierClass, "isChargingFeedbackEnabled", Int::class.java, object : XC_MethodReplacement() {
1517
override fun replaceHookedMethod(param: MethodHookParam): Boolean {

0 commit comments

Comments
 (0)