commit ddfa89f4b4e3c5271f6dc218470b93090d781604
parent 55f6627d72cd6797f2737f7db5de6dfa165f4346
Author: rhunk <101876869+rhunk@users.noreply.github.com>
Date:   Sat,  5 Aug 2023 10:34:21 +0200

fix: location spoofer
- float to double conversion

Diffstat:
Mcore/src/main/kotlin/me/rhunk/snapenhance/features/impl/tweaks/LocationSpoofer.kt | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/tweaks/LocationSpoofer.kt b/core/src/main/kotlin/me/rhunk/snapenhance/features/impl/tweaks/LocationSpoofer.kt @@ -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