diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index bce271e70..a9d68bd73 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -33,10 +33,14 @@ We inherited this entry (${applicationId}.App) from Fennec. We need to keep this as our main launcher to avoid launcher icons on the home screen disappearing for all our users on a Fennec build. + + !!HERE BE DRAGONS!! + We need the targetActivity to be IntentReceiverActivity so that we can check if we have + a migration in progress. If not, the HomeActivity is invoked. --> + android:targetActivity=".IntentReceiverActivity"> @@ -96,7 +100,7 @@ android:taskAffinity="" android:windowSoftInputMode="adjustResize|stateAlwaysHidden" /> - + @@ -162,6 +166,12 @@ + + + 14sp + diff --git a/app/src/migration/AndroidManifest.xml b/app/src/migration/AndroidManifest.xml index 3ddb51069..91b8afc31 100644 --- a/app/src/migration/AndroidManifest.xml +++ b/app/src/migration/AndroidManifest.xml @@ -13,11 +13,6 @@ android:name="org.mozilla.fenix.MigratingFenixApplication" tools:replace="android:name"> - - - diff --git a/app/src/migration/java/org/mozilla/fenix/MigratingFenixApplication.kt b/app/src/migration/java/org/mozilla/fenix/MigratingFenixApplication.kt index 956b877b4..349027330 100644 --- a/app/src/migration/java/org/mozilla/fenix/MigratingFenixApplication.kt +++ b/app/src/migration/java/org/mozilla/fenix/MigratingFenixApplication.kt @@ -5,10 +5,8 @@ package org.mozilla.fenix import android.content.Context -import android.content.Intent import kotlinx.coroutines.runBlocking import mozilla.components.support.migration.FennecMigrator -import mozilla.components.support.migration.state.MigrationStore /** * An application class which knows how to migrate Fennec data. @@ -28,13 +26,11 @@ class MigratingFenixApplication : FenixApplication() { .build() } - val migrationStore by lazy { MigrationStore() } - val migrationPushSubscriber by lazy { MigrationPushSubscriber( this, components.backgroundServices.pushService, - migrationStore + components.migrationStore ) } @@ -47,11 +43,7 @@ class MigratingFenixApplication : FenixApplication() { // The rest of the migrations can happen now. migrationPushSubscriber.start() - migrator.startMigrationIfNeeded(migrationStore, MigrationService::class.java) - - // Start migration UI - val intent = Intent(this, MigrationProgressActivity::class.java) - startActivity(intent) + migrator.startMigrationIfNeeded(components.migrationStore, MigrationService::class.java) } private fun migrateBlocking() { @@ -71,7 +63,3 @@ class MigratingFenixApplication : FenixApplication() { fun Context.getMigratorFromApplication(): FennecMigrator { return (applicationContext as MigratingFenixApplication).migrator } - -fun Context.getMigrationStoreFromApplication(): MigrationStore { - return (applicationContext as MigratingFenixApplication).migrationStore -}