Bug 736237 - Don't update about:home on database operations. r=lucasr

This commit is contained in:
Gian-Carlo Pascutto 2012-04-04 21:29:31 +02:00
Родитель dfd5f6002f
Коммит 7c0bfd1c3f
2 изменённых файлов: 17 добавлений и 1 удалений

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

@ -730,6 +730,13 @@ public class AboutHomeContent extends ScrollView
public int getCount() {
return Math.min(super.getCount(), getNumberOfTopSites());
}
@Override
protected void onContentChanged () {
// Don't do anything. We don't want to regenerate every time
// our history database is updated.
return;
}
}
class TopSitesViewBinder implements SimpleCursorAdapter.ViewBinder {

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

@ -724,7 +724,7 @@ abstract public class GeckoApp
});
}
void handleClearHistory() {
void updateAboutHomeTopSites() {
if (mAboutHomeContent == null)
return;
@ -736,6 +736,10 @@ abstract public class GeckoApp
});
}
void handleClearHistory() {
updateAboutHomeTopSites();
}
public StartupMode getStartupMode() {
// This function might touch the disk and should not
// be called from UI's main thread.
@ -2285,13 +2289,18 @@ abstract public class GeckoApp
final GeckoApp app = GeckoApp.mAppContext;
ProfileMigrator profileMigrator =
new ProfileMigrator(app.getContentResolver(), profileDir);
// Do a migration run on the first start after an upgrade.
if (!profileMigrator.hasMigrationRun()) {
final SetupScreen setupScreen = new SetupScreen(app);
// don't show unless this take a while
setupScreen.showDelayed(mMainHandler);
profileMigrator.launch();
setupScreen.dismiss();
// Update about:home with the new information.
updateAboutHomeTopSites();
}
}
long timeDiff = SystemClock.uptimeMillis() - currentTime;