diff --git a/app/build.gradle b/app/build.gradle index b369ade..bfc0428 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "fr.frazew.virtualgyroscope" minSdkVersion 16 targetSdkVersion 23 - versionCode 111 - versionName "1.11" + versionCode 120 + versionName "1.2" } buildTypes { release { diff --git a/app/src/main/java/fr/frazew/virtualgyroscope/XposedMod.java b/app/src/main/java/fr/frazew/virtualgyroscope/XposedMod.java index 52b8309..dfda796 100644 --- a/app/src/main/java/fr/frazew/virtualgyroscope/XposedMod.java +++ b/app/src/main/java/fr/frazew/virtualgyroscope/XposedMod.java @@ -21,6 +21,7 @@ import fr.frazew.virtualgyroscope.hooks.SystemSensorManagerHook; public class XposedMod implements IXposedHookLoadPackage { + public static boolean FIRST_LAUNCH_SINCE_BOOT = true; public static final SparseArray sensorsToEmulate = new SparseArray() {{ put(Sensor.TYPE_ROTATION_VECTOR, new SensorModel(Sensor.TYPE_ROTATION_VECTOR, "VirtualSensor RotationVector", -1, 0.01F, -1, -1, Sensor.STRING_TYPE_ROTATION_VECTOR, "none")); @@ -33,6 +34,11 @@ public class XposedMod implements IXposedHookLoadPackage { @Override public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable { if(lpparam.packageName.equals("android")) { + if (FIRST_LAUNCH_SINCE_BOOT) { + FIRST_LAUNCH_SINCE_BOOT = false; + XposedBridge.log("VirtualSensor: Using version " + BuildConfig.VERSION_NAME); + } + hookPackageFeatures(lpparam); } hookSensorValues(lpparam);