From f099552ae3c0d5d1da195fa20f3ac51d3744917f Mon Sep 17 00:00:00 2001 From: Grisha Kruglov Date: Tue, 19 Nov 2019 18:16:39 -0800 Subject: [PATCH] Enable encryption of persisted FxA account state --- .../org/mozilla/fenix/components/BackgroundServices.kt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt index ce8e86820..362fa1fa0 100644 --- a/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt +++ b/app/src/main/java/org/mozilla/fenix/components/BackgroundServices.kt @@ -36,6 +36,7 @@ import mozilla.components.service.fxa.manager.SCOPE_SYNC import mozilla.components.service.fxa.sync.GlobalSyncableStoreProvider import mozilla.components.service.sync.logins.SyncableLoginsStore import mozilla.components.support.base.log.logger.Logger +import org.mozilla.fenix.Config import org.mozilla.fenix.Experiments import org.mozilla.fenix.R import org.mozilla.fenix.components.metrics.Event @@ -84,7 +85,12 @@ class BackgroundServices( // NB: flipping this flag back and worth is currently not well supported and may need hand-holding. // Consult with the android-components peers before changing. // See https://github.com/mozilla/application-services/issues/1308 - capabilities = setOf(DeviceCapability.SEND_TAB) + capabilities = setOf(DeviceCapability.SEND_TAB), + + // Enable encryption for account state on supported API levels (23+). + // Just on Nightly and local builds for now. + // Enabling this for all channels is tracked in https://github.com/mozilla-mobile/fenix/issues/6704 + secureStateAtRest = Config.channel.isNightlyOrDebug ) // If sync has been turned off on the server then disable syncing. @VisibleForTesting(otherwise = PRIVATE)