Files
IronFox/patches/disable-geoip.patch
celenity 956aa718e5 WIP: v140.0
Signed-off-by: celenity <celenity@celenity.dev>
2025-06-24 15:40:00 -04:00

27 lines
1.5 KiB
Diff

diff --git a/mobile/android/android-components/components/service/location/src/main/java/mozilla/components/service/location/MozillaLocationService.kt b/mobile/android/android-components/components/service/location/src/main/java/mozilla/components/service/location/MozillaLocationService.kt
index d3f59c7a97..1677b822ed 100644
--- a/mobile/android/android-components/components/service/location/src/main/java/mozilla/components/service/location/MozillaLocationService.kt
+++ b/mobile/android/android-components/components/service/location/src/main/java/mozilla/components/service/location/MozillaLocationService.kt
@@ -25,10 +25,10 @@ import org.json.JSONObject
import java.io.IOException
import java.util.concurrent.TimeUnit
-private const val GEOIP_SERVICE_URL = "https://location.services.mozilla.com/v1/"
+private const val GEOIP_SERVICE_URL = ""
private const val CONNECT_TIMEOUT_SECONDS = 10L
private const val READ_TIMEOUT_SECONDS = 10L
-private const val USER_AGENT = "MozAC/" + Build.VERSION
+private const val USER_AGENT = ""
private const val EMPTY_REQUEST_BODY = "{}"
private const val CACHE_FILE = "mozac.service.location.region"
private const val KEY_COUNTRY_CODE = "country_code"
@@ -94,7 +94,7 @@ class MozillaLocationService(
* Check to see if the cache is still valid.
*/
private fun isCacheValid(): Boolean {
- return currentTime() < context.cachedAt() + CACHE_LIFETIME_IN_MS
+ return true
}
private fun Context.cacheRegion(region: LocationService.Region) {