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

This commit is contained in:
Wes Johnston 2012-02-10 10:23:22 -08:00
Родитель 03040ac231
Коммит 412adf88e6
2 изменённых файлов: 6 добавлений и 5 удалений

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

@ -2321,22 +2321,22 @@ abstract public class GeckoApp
}
private void checkMigrateProfile() {
long currentTime = SystemClock.uptimeMillis();
Log.i(LOGTAG, "checking profile migration in: " + profileDir.getAbsolutePath());
File profileDir = getProfileDir();
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);