Skip to content

Commit

Permalink
Prepare for version 1.2
Browse files Browse the repository at this point in the history
Also added a simple logging to indicate the version the user is using in the xposed/logcat log
  • Loading branch information
Frazew committed Jul 26, 2016
1 parent 731e41a commit 522df62
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 6 additions & 0 deletions app/src/main/java/fr/frazew/virtualgyroscope/XposedMod.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<SensorModel> sensorsToEmulate = new SparseArray<SensorModel>() {{
put(Sensor.TYPE_ROTATION_VECTOR, new SensorModel(Sensor.TYPE_ROTATION_VECTOR, "VirtualSensor RotationVector", -1, 0.01F, -1, -1, Sensor.STRING_TYPE_ROTATION_VECTOR, "none"));
Expand All @@ -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);
Expand Down

0 comments on commit 522df62

Please sign in to comment.