mirror of
https://github.com/rhunk/SnapEnhance.git
synced 2025-05-28 20:40:13 +02:00
fix: location spoofer
- float to double conversion
This commit is contained in:
parent
55f6627d72
commit
ddfa89f4b4
@ -30,8 +30,8 @@ class LocationSpoofer: Feature("LocationSpoof", loadParams = FeatureLoadParams.A
|
||||
val locationClass = android.location.Location::class.java
|
||||
val locationManagerClass = android.location.LocationManager::class.java
|
||||
|
||||
locationClass.hook("getLatitude", HookStage.BEFORE) { it.setResult(latitude) }
|
||||
locationClass.hook("getLongitude", HookStage.BEFORE) { it.setResult(longitude) }
|
||||
locationClass.hook("getLatitude", HookStage.BEFORE) { it.setResult(latitude.toDouble()) }
|
||||
locationClass.hook("getLongitude", HookStage.BEFORE) { it.setResult(longitude.toDouble()) }
|
||||
locationClass.hook("getAccuracy", HookStage.BEFORE) { it.setResult(0.0F) }
|
||||
|
||||
//Might be redundant because it calls isProviderEnabledForUser which we also hook, meaning if isProviderEnabledForUser returns true this will also return true
|
||||
|
Loading…
x
Reference in New Issue
Block a user