Bug 725858 - Don't load sqlite for migration if we're not migrating. r=gcp

This commit is contained in:
Wes Johnston 2012-02-10 14:01:44 -08:00
Родитель 79c7218755
Коммит 5f37d21570
2 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -2328,21 +2328,21 @@ abstract public class GeckoApp
private void checkMigrateProfile() {
File profileDir = getProfileDir();
long currentTime = SystemClock.uptimeMillis();
if (profileDir != null) {
long currentTime = SystemClock.uptimeMillis();
Log.i(LOGTAG, "checking profile migration in: " + profileDir.getAbsolutePath());
final GeckoApp app = GeckoApp.mAppContext;
final SetupScreen setupScreen = new SetupScreen(app);
// don't show unless we take a while
setupScreen.showDelayed(mMainHandler);
GeckoAppShell.ensureSQLiteLibsLoaded(app.getApplication().getPackageResourcePath());
ProfileMigrator profileMigrator =
new ProfileMigrator(app.getContentResolver(), profileDir);
profileMigrator.launch();
setupScreen.dismiss();
long timeDiff = SystemClock.uptimeMillis() - currentTime;
Log.i(LOGTAG, "Profile migration took " + timeDiff + " ms");
}
long timeDiff = SystemClock.uptimeMillis() - currentTime;
Log.i(LOGTAG, "Profile migration took " + timeDiff + " ms");
}
private SynchronousQueue<String> mFilePickerResult = new SynchronousQueue<String>();

Просмотреть файл

@ -280,6 +280,7 @@ public class ProfileMigrator {
File dbFileShm = new File(dbPathShm);
SQLiteBridge db = null;
GeckoAppShell.ensureSQLiteLibsLoaded(GeckoApp.mAppContext.getApplication().getPackageResourcePath());
try {
db = new SQLiteBridge(dbPath);
migrateBookmarks(db);