Skip to content

Commit 522df62

Browse files
committed
Prepare for version 1.2
Also added a simple logging to indicate the version the user is using in the xposed/logcat log
1 parent 731e41a commit 522df62

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ android {
88
applicationId "fr.frazew.virtualgyroscope"
99
minSdkVersion 16
1010
targetSdkVersion 23
11-
versionCode 111
12-
versionName "1.11"
11+
versionCode 120
12+
versionName "1.2"
1313
}
1414
buildTypes {
1515
release {

app/src/main/java/fr/frazew/virtualgyroscope/XposedMod.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import fr.frazew.virtualgyroscope.hooks.SystemSensorManagerHook;
2222

2323
public class XposedMod implements IXposedHookLoadPackage {
24+
public static boolean FIRST_LAUNCH_SINCE_BOOT = true;
2425

2526
public static final SparseArray<SensorModel> sensorsToEmulate = new SparseArray<SensorModel>() {{
2627
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 {
3334
@Override
3435
public void handleLoadPackage(final LoadPackageParam lpparam) throws Throwable {
3536
if(lpparam.packageName.equals("android")) {
37+
if (FIRST_LAUNCH_SINCE_BOOT) {
38+
FIRST_LAUNCH_SINCE_BOOT = false;
39+
XposedBridge.log("VirtualSensor: Using version " + BuildConfig.VERSION_NAME);
40+
}
41+
3642
hookPackageFeatures(lpparam);
3743
}
3844
hookSensorValues(lpparam);

0 commit comments

Comments
 (0)