Add a new column for slices_index table.
To distinguish public and non-public slices, add public_slice column to the database so we can return corresponding results based on this value. Bug: 141088937 Test: robotests Change-Id: I05d003875a8be27e5cb735b4814eb86d6dc40174
This commit is contained in:
@@ -36,7 +36,7 @@ public class SlicesDatabaseHelper extends SQLiteOpenHelper {
|
||||
private static final String DATABASE_NAME = "slices_index.db";
|
||||
private static final String SHARED_PREFS_TAG = "slices_shared_prefs";
|
||||
|
||||
private static final int DATABASE_VERSION = 7;
|
||||
private static final int DATABASE_VERSION = 8;
|
||||
|
||||
public interface Tables {
|
||||
String TABLE_SLICES_INDEX = "slices_index";
|
||||
@@ -98,6 +98,11 @@ public class SlicesDatabaseHelper extends SQLiteOpenHelper {
|
||||
* The uri of slice.
|
||||
*/
|
||||
String SLICE_URI = "slice_uri";
|
||||
|
||||
/**
|
||||
* Whether the slice should be exposed publicly.
|
||||
*/
|
||||
String PUBLIC_SLICE = "public_slice";
|
||||
}
|
||||
|
||||
private static final String CREATE_SLICES_TABLE =
|
||||
@@ -124,6 +129,12 @@ public class SlicesDatabaseHelper extends SQLiteOpenHelper {
|
||||
IndexColumns.SLICE_TYPE +
|
||||
", " +
|
||||
IndexColumns.UNAVAILABLE_SLICE_SUBTITLE +
|
||||
", "
|
||||
+
|
||||
IndexColumns.PUBLIC_SLICE
|
||||
+
|
||||
" INTEGER DEFAULT 0 "
|
||||
+
|
||||
");";
|
||||
|
||||
private final Context mContext;
|
||||
|
Reference in New Issue
Block a user