Home
last modified time | relevance | path

Searched refs:DbDowngradeHelper (Results 1 – 4 of 4) sorted by relevance

/packages/apps/Launcher3/src/com/android/launcher3/model/
DDbDowngradeHelper.java42 public class DbDowngradeHelper { class
52 private DbDowngradeHelper(int version) { in DbDowngradeHelper() method in DbDowngradeHelper
78 public static DbDowngradeHelper parse(File file) throws JSONException, IOException { in parse()
85 public static DbDowngradeHelper parse(byte[] fileData) throws JSONException { in parse()
87 DbDowngradeHelper helper = new DbDowngradeHelper(obj.getInt(KEY_VERSION)); in parse()
103 if (DbDowngradeHelper.parse(schemaFile).version >= expectedVersion) { in updateSchemaFile()
DDatabaseHelper.java137 DbDowngradeHelper.updateSchemaFile(schemaFile, SCHEMA_VERSION, mContext); in onOpen()
291 DbDowngradeHelper.parse(mContext.getFileStreamPath(DOWNGRADE_SCHEMA_FILE)) in onDowngrade()
/packages/apps/Launcher3/tests/src/com/android/launcher3/model/
DDbDowngradeHelperTest.java75 DbDowngradeHelper.updateSchemaFile(mSchemaFile, 0, mContext); in testDowngradeSchemaMatchesVersion()
76 assertEquals(DatabaseHelper.SCHEMA_VERSION, DbDowngradeHelper.parse(mSchemaFile).version); in testDowngradeSchemaMatchesVersion()
93 DbDowngradeHelper.updateSchemaFile(mSchemaFile, 10, context); in testUpdateSchemaFile()
95 assertEquals(10, DbDowngradeHelper.parse(mSchemaFile).version); in testUpdateSchemaFile()
99 DbDowngradeHelper.updateSchemaFile(mSchemaFile, 11, context); in testUpdateSchemaFile()
104 DbDowngradeHelper.updateSchemaFile(mSchemaFile, 10, context); in testUpdateSchemaFile()
108 DbDowngradeHelper.updateSchemaFile(mSchemaFile, 3, context); in testUpdateSchemaFile()
166 DbDowngradeHelper.updateSchemaFile(mSchemaFile, DatabaseHelper.SCHEMA_VERSION, mContext); in setupTestDb()
198 DbDowngradeHelper.parse(mSchemaFile).onDowngrade(db, oldVersion, newVersion); in onDowngrade()
/packages/apps/Launcher3/tests/src/com/android/launcher3/provider/
DLauncherDbUtilsTest.java47 import com.android.launcher3.model.DbDowngradeHelper;
148 DbDowngradeHelper.parse(IOUtils.toByteArray(in)).onDowngrade(db, db.getVersion(), 31); in setupLegacyShortcut()