Convert xml based API allowDynamicSummaryInSlice to java
- Add boolean useDynamicSliceSummary() in Sliceable interface. This is the switch equivalent to android:allowDynamicSummaryInSlice in xml. It moves the setter closer to regular Sliceable APIs, thus less easily to miss. - Coverted all android:allowDynamicSummaryInSlice to use the java API. - Except 2 prefs in my_device_info. They incorrectly set this to true previously (controller is not sliceable, no point setting dynamicSliceSummary to true. They just won't do anything) Fixes: 128446156 Test: robolectric Change-Id: Ic57acd590dec3e87dcf4592df137321d14b854d9
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 = 4;
|
||||
private static final int DATABASE_VERSION = 5;
|
||||
|
||||
public interface Tables {
|
||||
String TABLE_SLICES_INDEX = "slices_index";
|
||||
@@ -94,12 +94,6 @@ public class SlicesDatabaseHelper extends SQLiteOpenHelper {
|
||||
*/
|
||||
String SLICE_TYPE = "slice_type";
|
||||
|
||||
/**
|
||||
* Boolean flag, {@code true} when the slice object prefers using the dynamic summary from
|
||||
* preference controller.
|
||||
*/
|
||||
String ALLOW_DYNAMIC_SUMMARY_IN_SLICE = "allow_dynamic_summary_in_slice";
|
||||
|
||||
/**
|
||||
* Customized subtitle if it's a unavailable slice
|
||||
*/
|
||||
@@ -129,8 +123,6 @@ public class SlicesDatabaseHelper extends SQLiteOpenHelper {
|
||||
", " +
|
||||
IndexColumns.SLICE_TYPE +
|
||||
", " +
|
||||
IndexColumns.ALLOW_DYNAMIC_SUMMARY_IN_SLICE +
|
||||
", " +
|
||||
IndexColumns.UNAVAILABLE_SLICE_SUBTITLE +
|
||||
");";
|
||||
|
||||
|
Reference in New Issue
Block a user