Commit c6c8fef3 authored by Sunny Goyal's avatar Sunny Goyal
Browse files

Clearing DB if necessary, when applying the default layout

Bug: 19574498
Change-Id: I34850d9a7f7316bcc2cb9fc8a5be57d2488c16a6
parent e72f3d53
......@@ -305,6 +305,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) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment