Fixed not fully restore backup
This commit is contained in:
@@ -76,6 +76,9 @@ import org.xmlpull.v1.XmlPullParser;
|
||||
import java.io.InputStream;
|
||||
import java.io.StringReader;
|
||||
|
||||
import app.lawnchair.LawnchairApp;
|
||||
import app.lawnchair.LawnchairAppKt;
|
||||
|
||||
/**
|
||||
* Utility class which maintains an instance of Launcher database and provides
|
||||
* utility methods
|
||||
@@ -106,6 +109,12 @@ public class ModelDbController {
|
||||
boolean isSandbox = mContext instanceof SandboxContext;
|
||||
String dbName = isSandbox ? null : InvariantDeviceProfile.INSTANCE.get(mContext).dbFile;
|
||||
|
||||
if (!forMigration) {
|
||||
LawnchairApp app = LawnchairAppKt.getLawnchairApp(mContext);
|
||||
app.renameRestoredDb(dbName);
|
||||
app.migrateDbName(dbName);
|
||||
}
|
||||
|
||||
// Set the flag for empty DB
|
||||
Runnable onEmptyDbCreateCallback = forMigration ? () -> {
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user