@@ -67,7 +67,11 @@ public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
6767 }
6868
6969 private void hookSensorValues (final LoadPackageParam lpparam ) {
70- if (Build .VERSION .SDK_INT >= 23 )
70+ if (Build .VERSION .SDK_INT >= 24 )
71+ XposedHelpers .findAndHookMethod ("android.hardware.SystemSensorManager$SensorEventQueue" ,
72+ lpparam .classLoader , "dispatchSensorEvent" , int .class , float [].class , int .class , long .class ,
73+ new fr .frazew .virtualgyroscope .hooks .sensorchange .API24 ());
74+ else if (Build .VERSION .SDK_INT == 23 )
7175 XposedHelpers .findAndHookMethod ("android.hardware.SystemSensorManager$SensorEventQueue" ,
7276 lpparam .classLoader , "dispatchSensorEvent" , int .class , float [].class , int .class , long .class ,
7377 new fr .frazew .virtualgyroscope .hooks .sensorchange .API23 ());
@@ -84,7 +88,11 @@ else if (Build.VERSION.SDK_INT >= 16)
8488
8589 @ SuppressWarnings ("unchecked" )
8690 private void addSensors (final LoadPackageParam lpparam ) {
87- if (Build .VERSION .SDK_INT >= 23 )
91+ if (Build .VERSION .SDK_INT >= 24 )
92+ XposedHelpers .findAndHookConstructor ("android.hardware.SystemSensorManager" ,
93+ lpparam .classLoader , android .content .Context .class , android .os .Looper .class ,
94+ new fr .frazew .virtualgyroscope .hooks .constructor .API24 (lpparam ));
95+ else if (Build .VERSION .SDK_INT == 23 )
8896 XposedHelpers .findAndHookConstructor ("android.hardware.SystemSensorManager" ,
8997 lpparam .classLoader , android .content .Context .class , android .os .Looper .class ,
9098 new fr .frazew .virtualgyroscope .hooks .constructor .API23 (lpparam ));
0 commit comments