@@ -282,7 +282,6 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
282282 if (param .args [0 ].equals (PowerManager .PROXIMITY_SCREEN_OFF_WAKE_LOCK )) {
283283 param .setResult (null );
284284 }
285- log (param .getResult ());
286285 }
287286 });
288287 }
@@ -575,15 +574,14 @@ private void hookProps() throws Exception {
575574 XposedBridge .hookMethod (methodPropsBoolean , new XC_MethodHook () {
576575 @ Override
577576 protected void afterHookedMethod (MethodHookParam param ) throws Throwable {
578- int i = (int ) param .args [param .args .length - 1 ];
577+ var list = ReflectionUtils .findArrayOfType (param .args , Integer .class );
578+ int i = (int ) list .get (0 ).second ;
579579
580580 var propValue = propsBoolean .get (i );
581581 if (propValue != null ) {
582582 // Fix Bug in Settings Data Usage
583- switch (i ) {
584- case 4023 :
585- if (ReflectionUtils .isCalledFromClass (dataUsageActivityClass )) return ;
586- break ;
583+ if (i == 4023 ) {
584+ if (ReflectionUtils .isCalledFromClass (dataUsageActivityClass )) return ;
587585 }
588586 param .setResult (propValue );
589587 }
@@ -595,7 +593,8 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
595593 XposedBridge .hookMethod (methodPropsInteger , new XC_MethodHook () {
596594 @ Override
597595 protected void beforeHookedMethod (MethodHookParam param ) throws Throwable {
598- int i = (int ) param .args [param .args .length - 1 ];
596+ var list = ReflectionUtils .findArrayOfType (param .args , Integer .class );
597+ int i = (int ) list .get (0 ).second ;
599598 var propValue = propsInteger .get (i );
600599 if (propValue == null ) return ;
601600 param .setResult (propValue );
0 commit comments