Skip to content

Commit

Permalink
Provisioning: Location providers
Browse files Browse the repository at this point in the history
New provisioning extras to control Location features:
* Internet lookups (Mozilla Location Services): wifi_mls, cell_mls
* Local location learning: wifi_learning, cell_learning
* Query location from supported hotspots: wifi_moving
* Geocoder (Nominatim): nominatim_enabled

Change-Id: I334c4f92437257dac261cbc9644641df9a9eaf55
  • Loading branch information
t-m-w authored and mar-v-in committed Aug 11, 2023
1 parent 28ca324 commit 9be1538
Show file tree
Hide file tree
Showing 2 changed files with 12 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,16 @@ class ProvisionService : LifecycleService() {
SafetyNetPreferences.setEnabled(this@ProvisionService, it)
DroidGuardPreferences.setEnabled(this@ProvisionService, it)
}
LocationSettings(this@ProvisionService).apply {
intent?.extras?.getBooleanOrNull("wifi_mls")?.let { wifiMls = it }
intent?.extras?.getBooleanOrNull("cell_mls")?.let { cellMls = it }
intent?.extras?.getBooleanOrNull("wifi_learning")?.let { wifiLearning = it }
intent?.extras?.getBooleanOrNull("cell_learning")?.let { cellLearning = it }
intent?.extras?.getBooleanOrNull("wifi_moving")?.let { wifiMoving = 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 9be1538

Please sign in to comment.