diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java index 45cf3b067e1..8900d58b3e0 100644 --- a/mobile/android/base/GeckoApp.java +++ b/mobile/android/base/GeckoApp.java @@ -156,6 +156,7 @@ abstract public class GeckoApp public static int mOrientation; private boolean mIsRestoringActivity; private String mCurrentResponse = ""; + public static boolean sIsUsingCustomProfile = false; private PromptService mPromptService; private Favicons mFavicons; @@ -1554,6 +1555,7 @@ abstract public class GeckoApp if (profileName == null) profileName = "default"; } + GeckoApp.sIsUsingCustomProfile = true; } if (profileName != null || profilePath != null) { mProfile = GeckoProfile.get(this, profileName, profilePath); @@ -2252,7 +2254,8 @@ abstract public class GeckoApp ProfileMigrator profileMigrator = new ProfileMigrator(app); // Do a migration run on the first start after an upgrade. - if (!profileMigrator.hasMigrationRun()) { + if (!GeckoApp.sIsUsingCustomProfile && + !profileMigrator.hasMigrationRun()) { // Show the "Setting up Fennec" screen if this takes // a while. final SetupScreen setupScreen = new SetupScreen(app); @@ -2296,7 +2299,7 @@ abstract public class GeckoApp private void checkMigrateSync() { final File profileDir = getProfile().getDir(); - if (profileDir != null) { + if (!GeckoApp.sIsUsingCustomProfile && profileDir != null) { final GeckoApp app = GeckoApp.mAppContext; ProfileMigrator profileMigrator = new ProfileMigrator(app); if (!profileMigrator.hasSyncMigrated()) { diff --git a/mobile/android/base/GeckoProfile.java b/mobile/android/base/GeckoProfile.java index f04d957ed04..16fc0fa8a78 100644 --- a/mobile/android/base/GeckoProfile.java +++ b/mobile/android/base/GeckoProfile.java @@ -148,7 +148,8 @@ public final class GeckoProfile { try { // Check for old profiles that may need migration. ProfileMigrator profileMigrator = new ProfileMigrator(mContext); - if (!profileMigrator.isProfileMoved()) { + if (!GeckoApp.sIsUsingCustomProfile && + !profileMigrator.isProfileMoved()) { Log.i(LOGTAG, "New installation or update, checking for old profiles."); profileMigrator.launchMoveProfile(); }