Changed the app_version type

- Updated type from string to long and saved the PackageInfo.getLongVersionCode
- Modified CardDatabaseHelper, ContextualCard, CardContentProviderTest

Bug: 111820446
Test: robotest
Change-Id: Id2d39f15a1743b9f38044354a0c3b2584329bab9
This commit is contained in:
Sunny Shao
2018-09-27 17:46:55 +08:00
parent 67793945f0
commit 672febf859
3 changed files with 9 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ import androidx.annotation.VisibleForTesting;
public class CardDatabaseHelper extends SQLiteOpenHelper {
private static final String TAG = "CardDatabaseHelper";
private static final String DATABASE_NAME = "homepage_cards.db";
private static final int DATABASE_VERSION = 2;
private static final int DATABASE_VERSION = 3;
public static final String CARD_TABLE = "cards";
@@ -143,7 +143,7 @@ public class CardDatabaseHelper extends SQLiteOpenHelper {
CardColumns.PACKAGE_NAME +
" TEXT NOT NULL, " +
CardColumns.APP_VERSION +
" TEXT NOT NULL, " +
" INTEGER NOT NULL, " +
CardColumns.TITLE_RES_NAME +
" TEXT, " +
CardColumns.TITLE_TEXT +