This repository has been archived by the owner on Jul 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* MLS update * Remove unused asset * Add mls secret to build * Log what Localization provider is being used for the SearchEngineManager * Fix rebase conflicts Co-authored-by: Randall E. Barker <[email protected]>
- Loading branch information
1 parent
65a4aed
commit 7f6d42c
Showing
14 changed files
with
110 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,3 +75,6 @@ tools/webgfx-tests-fxr/ | |
|
||
# Room schemas | ||
app/schemas/ | ||
|
||
# Token files | ||
.mls_token |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ tasks: | |
- "secrets:get:project/firefoxreality/fr/github-deploy-key" | ||
- "secrets:get:project/firefoxreality/fr/staging-signing-token" | ||
- "secrets:get:project/firefoxreality/fr/symbols-token" | ||
- "secrets:get:project/firefoxreality/fr/mls-key" | ||
routes: | ||
- [email protected] | ||
payload: | ||
|
@@ -91,6 +92,7 @@ tasks: | |
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk | ||
&& git submodule update | ||
&& . tools/taskcluster/get_third_party.sh | ||
&& python tools/taskcluster/fetch_secret.py -s project/firefoxreality/fr/mls-key -o .mls_token -n key | ||
&& cp tools/gradle/taskcluster.properties ./user.properties | ||
&& ./gradlew --no-daemon --console=plain clean `python tools/taskcluster/build_targets.py =all` | ||
&& python tools/taskcluster/fetch_secret.py -s project/firefoxreality/fr/staging-signing-token -o token -n token | ||
|
@@ -123,6 +125,7 @@ tasks: | |
- "secrets:get:project/firefoxreality/fr/github-deploy-key" | ||
- "secrets:get:project/firefoxreality/fr/release-signing-token" | ||
- "secrets:get:project/firefoxreality/fr/symbols-token" | ||
- "secrets:get:project/firefoxreality/fr/mls-key" | ||
routes: | ||
- [email protected] | ||
payload: | ||
|
@@ -141,6 +144,7 @@ tasks: | |
&& rm -rf gvr-android-sdk && git clone https://github.com/MozillaReality/FirefoxReality-gvr-android-sdk.git gvr-android-sdk | ||
&& git submodule update | ||
&& . tools/taskcluster/get_third_party.sh | ||
&& python tools/taskcluster/fetch_secret.py -s project/firefoxreality/fr/mls-key -o .mls_token -n key | ||
&& cp tools/gradle/taskcluster.properties ./user.properties | ||
&& ./gradlew --no-daemon --console=plain clean `python tools/taskcluster/build_targets.py ${event.release.tag_name}` | ||
&& python tools/taskcluster/fetch_secret.py -s project/firefoxreality/fr/release-signing-token -o token -n token | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
63 changes: 0 additions & 63 deletions
63
app/src/common/shared/org/mozilla/vrbrowser/geolocation/GeolocationClient.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
54 changes: 0 additions & 54 deletions
54
app/src/common/shared/org/mozilla/vrbrowser/geolocation/GeolocationWrapper.java
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
app/src/common/shared/org/mozilla/vrbrowser/geolocation/GeolocationWrapper.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
package org.mozilla.vrbrowser.geolocation | ||
|
||
import android.content.Context | ||
import kotlinx.coroutines.CoroutineScope | ||
import kotlinx.coroutines.Dispatchers | ||
import kotlinx.coroutines.GlobalScope | ||
import kotlinx.coroutines.future.future | ||
import kotlinx.coroutines.launch | ||
import mozilla.components.service.location.MozillaLocationService | ||
import org.mozilla.vrbrowser.browser.engine.EngineProvider | ||
import org.mozilla.vrbrowser.browser.SettingsStore | ||
import java.util.concurrent.CompletableFuture | ||
|
||
object GeolocationWrapper { | ||
|
||
fun update(context: Context) { | ||
val locationService = MozillaLocationService( | ||
context, | ||
EngineProvider.getDefaultClient(context), | ||
org.mozilla.vrbrowser.BuildConfig.MLS_TOKEN | ||
) | ||
CoroutineScope(Dispatchers.IO).launch { | ||
locationService.fetchRegion(true)?.run { | ||
val data: GeolocationData = GeolocationData.create(countryCode, countryName) | ||
SettingsStore.getInstance(context).setGeolocationData(data.toString()) | ||
} | ||
} | ||
} | ||
|
||
fun get(context: Context): CompletableFuture<MozillaLocationService.Region?> = | ||
GlobalScope.future { | ||
val locationService = MozillaLocationService( | ||
context, | ||
EngineProvider.getDefaultClient(context), | ||
org.mozilla.vrbrowser.BuildConfig.MLS_TOKEN | ||
) | ||
locationService.fetchRegion(false) | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters