Permalink
Browse files

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

…r=gcp
  • Loading branch information...
1 parent 54cacf7 commit eac87eadfe37139e8c09be6df6a9955409bb4c13 Wes Johnston committed Feb 10, 2012
Showing with 5 additions and 4 deletions.
  1. +4 −4 mobile/android/base/GeckoApp.java
  2. +1 −0 mobile/android/base/ProfileMigrator.java
@@ -2328,21 +2328,21 @@ private String readUpdateStatus(File statusFile) {
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 @@ protected void migratePlaces(File aFile) {
File dbFileShm = new File(dbPathShm);
SQLiteBridge db = null;
+ GeckoAppShell.ensureSQLiteLibsLoaded(GeckoApp.mAppContext.getApplication().getPackageResourcePath());
try {
db = new SQLiteBridge(dbPath);
migrateBookmarks(db);

0 comments on commit eac87ea

Please sign in to comment.