Skip to content

Commit

Permalink
Bug 725858 - Don't load sqlite for migration if we're not migrating. …
Browse files Browse the repository at this point in the history
…r=gcp
  • Loading branch information
Wes Johnston committed Feb 10, 2012
1 parent 54cacf7 commit eac87ea
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
8 changes: 4 additions & 4 deletions mobile/android/base/GeckoApp.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2328,21 +2328,21 @@ private String readUpdateStatus(File statusFile) {


private void checkMigrateProfile() { private void checkMigrateProfile() {
File profileDir = getProfileDir(); File profileDir = getProfileDir();
long currentTime = SystemClock.uptimeMillis();

if (profileDir != null) { if (profileDir != null) {
long currentTime = SystemClock.uptimeMillis();
Log.i(LOGTAG, "checking profile migration in: " + profileDir.getAbsolutePath()); Log.i(LOGTAG, "checking profile migration in: " + profileDir.getAbsolutePath());
final GeckoApp app = GeckoApp.mAppContext; final GeckoApp app = GeckoApp.mAppContext;
final SetupScreen setupScreen = new SetupScreen(app); final SetupScreen setupScreen = new SetupScreen(app);
// don't show unless we take a while // don't show unless we take a while
setupScreen.showDelayed(mMainHandler); setupScreen.showDelayed(mMainHandler);
GeckoAppShell.ensureSQLiteLibsLoaded(app.getApplication().getPackageResourcePath());
ProfileMigrator profileMigrator = ProfileMigrator profileMigrator =
new ProfileMigrator(app.getContentResolver(), profileDir); new ProfileMigrator(app.getContentResolver(), profileDir);
profileMigrator.launch(); profileMigrator.launch();
setupScreen.dismiss(); 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>(); private SynchronousQueue<String> mFilePickerResult = new SynchronousQueue<String>();
Expand Down
1 change: 1 addition & 0 deletions mobile/android/base/ProfileMigrator.java
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -280,6 +280,7 @@ protected void migratePlaces(File aFile) {
File dbFileShm = new File(dbPathShm); File dbFileShm = new File(dbPathShm);


SQLiteBridge db = null; SQLiteBridge db = null;
GeckoAppShell.ensureSQLiteLibsLoaded(GeckoApp.mAppContext.getApplication().getPackageResourcePath());
try { try {
db = new SQLiteBridge(dbPath); db = new SQLiteBridge(dbPath);
migrateBookmarks(db); migrateBookmarks(db);
Expand Down

0 comments on commit eac87ea

Please sign in to comment.