Skip to content

Commit

Permalink
Provisioning: Internet-based location providers
Browse files Browse the repository at this point in the history
New provisioning extras to control Mozilla Location Services and
Nominatim: mls_wifi, mls_cell, and nominatim_enabled.

Change-Id: I334c4f92437257dac261cbc9644641df9a9eaf55
  • Loading branch information
t-m-w committed Aug 1, 2023
1 parent 28ca324 commit 20841cb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions play-services-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ dependencies {
implementation project(':play-services-fido-core')
implementation project(':play-services-gmscompliance-core')
implementation project(':play-services-location-core')
implementation project(':play-services-location-core-base')
implementation project(':play-services-location-core-provider')
withNearbyImplementation project(':play-services-nearby-core')
implementation project(':play-services-oss-licenses-core')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import org.microg.gms.checkin.setCheckinServiceConfiguration
import org.microg.gms.droidguard.core.DroidGuardPreferences
import org.microg.gms.gcm.getGcmServiceInfo
import org.microg.gms.gcm.setGcmServiceConfiguration
import org.microg.gms.location.LocationSettings
import org.microg.gms.safetynet.SafetyNetPreferences

class ProvisionService : LifecycleService() {
Expand All @@ -38,6 +39,13 @@ class ProvisionService : LifecycleService() {
SafetyNetPreferences.setEnabled(this@ProvisionService, it)
DroidGuardPreferences.setEnabled(this@ProvisionService, it)
}
LocationSettings(this@ProvisionService).apply {
intent?.extras?.getBooleanOrNull("mls_wifi")?.let { wifiMls = it }
intent?.extras?.getBooleanOrNull("mls_cell")?.let { cellMls = it }
intent?.extras?.getBooleanOrNull("nominatim_enabled")?.let {
geocoderNominatim = it
}
}
// What else?

delay(2 * 1000) // Wait 2 seconds to give provisioning some extra time
Expand Down

0 comments on commit 20841cb

Please sign in to comment.