am c6c8fef3: Clearing DB if necessary, when applying the default layout

* commit 'c6c8fef3e90f84b26c3b8550ec6a1d668ca9200d':
  Clearing DB if necessary, when applying the default layout
This commit is contained in:
Sunny Goyal
2015-03-05 04:32:48 +00:00
committed by Android Git Automerger
@@ -297,6 +297,10 @@ public class LauncherProvider extends ContentProvider {
if (loader == null) {
loader = getDefaultLayoutParser();
}
// There might be some partially restored DB items, due to buggy restore logic in
// previous versions of launcher.
createEmptyDB();
// Populate favorites table with initial favorites
if ((mOpenHelper.loadFavorites(mOpenHelper.getWritableDatabase(), loader) <= 0)
&& usingExternallyProvidedLayout) {