Browse Source

For #12871 - Use local TWA DAL API (#12872)

master
Tiger Oakes 1 year ago
committed by GitHub
parent
commit
8c1d3dc827
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      .gitignore
  2. 15
      app/build.gradle
  3. 6
      app/src/main/java/org/mozilla/fenix/components/Core.kt
  4. 2
      taskcluster/fenix_taskgraph/transforms/build.py

1
.gitignore

@ -83,7 +83,6 @@ gen-external-apklibs
.leanplum_token
.adjust_token
.sentry_token
.digital_asset_links_token
.mls_token

15
app/build.gradle

@ -354,21 +354,6 @@ android.applicationVariants.all { variant ->
println("X_X")
}
// -------------------------------------------------------------------------------------------------
// Digital Asset Links: Read token from local file if it exists
// -------------------------------------------------------------------------------------------------
print("Digital Asset Links token: ")
try {
def token = new File("${rootDir}/.digital_asset_links_token").text.trim()
buildConfigField 'String', 'DIGITAL_ASSET_LINKS_TOKEN', '"' + token + '"'
println "(Added from .digital_asset_links_token file)"
} catch (FileNotFoundException ignored) {
buildConfigField 'String', 'DIGITAL_ASSET_LINKS_TOKEN', 'null'
println("X_X")
}
// -------------------------------------------------------------------------------------------------
// MLS: Read token from local file if it exists
// -------------------------------------------------------------------------------------------------

6
app/src/main/java/org/mozilla/fenix/components/Core.kt

@ -43,10 +43,10 @@ import mozilla.components.feature.webnotifications.WebNotificationFeature
import mozilla.components.lib.dataprotect.SecureAbove22Preferences
import mozilla.components.lib.dataprotect.generateEncryptionKey
import mozilla.components.service.digitalassetlinks.RelationChecker
import mozilla.components.service.digitalassetlinks.api.DigitalAssetLinksApi
import mozilla.components.service.digitalassetlinks.local.StatementApi
import mozilla.components.service.digitalassetlinks.local.StatementRelationChecker
import mozilla.components.service.sync.logins.SyncableLoginsStorage
import org.mozilla.fenix.AppRequestInterceptor
import org.mozilla.fenix.BuildConfig.DIGITAL_ASSET_LINKS_TOKEN
import org.mozilla.fenix.Config
import org.mozilla.fenix.HomeActivity
import org.mozilla.fenix.R
@ -147,7 +147,7 @@ class Core(private val context: Context) {
* The [RelationChecker] checks Digital Asset Links relationships for Trusted Web Activities.
*/
val relationChecker: RelationChecker by lazy {
DigitalAssetLinksApi(client, DIGITAL_ASSET_LINKS_TOKEN)
StatementRelationChecker(StatementApi(client))
}
/**

2
taskcluster/fenix_taskgraph/transforms/build.py

@ -45,7 +45,6 @@ def add_shippable_secrets(config, tasks):
} for key, target_file in (
('adjust', '.adjust_token'),
('firebase', 'app/src/{}/res/values/firebase.xml'.format(gradle_build_type)),
('digital_asset_links', '.digital_asset_links_token'),
('leanplum', '.leanplum_token'),
('sentry_dsn', '.sentry_token'),
('mls', '.mls_token'),
@ -56,7 +55,6 @@ def add_shippable_secrets(config, tasks):
"path": target_file,
} for fake_value, target_file in (
("faketoken", ".adjust_token"),
("faketoken", ".digital_asset_links_token"),
("fake:token", ".leanplum_token"), # : is used by leanplum
("faketoken", ".mls_token"),
("https://fake@sentry.prod.mozaws.net/368", ".sentry_token"),

Loading…
Cancel
Save