A new attribute which can show the dynamic summary
For now, slice view shows screen title by default, but it isn't approprate for some simple cases. ie, device model, phone number, android version etc. So, We create a new attribue which let BasePreferenceController be more flxible. User can choose what they want to show in summary text. Fixes: 74900516 Test: make RunSettingsRoboTests Change-Id: I2788c6edfaf8e656170a507607f22513841a3e0a
This commit is contained in:
@@ -49,6 +49,7 @@ public class SlicesDatabaseAccessor {
|
||||
IndexColumns.CONTROLLER,
|
||||
IndexColumns.PLATFORM_SLICE,
|
||||
IndexColumns.SLICE_TYPE,
|
||||
IndexColumns.ALLOW_DYNAMIC_SUMMARY_IN_SLICE,
|
||||
};
|
||||
|
||||
// Cursor value for boolean true
|
||||
@@ -159,6 +160,8 @@ public class SlicesDatabaseAccessor {
|
||||
cursor.getColumnIndex(IndexColumns.CONTROLLER));
|
||||
final boolean isPlatformDefined = cursor.getInt(
|
||||
cursor.getColumnIndex(IndexColumns.PLATFORM_SLICE)) == TRUE;
|
||||
final boolean isDynamicSummaryAllowed = cursor.getInt(
|
||||
cursor.getColumnIndex(IndexColumns.ALLOW_DYNAMIC_SUMMARY_IN_SLICE)) == TRUE;
|
||||
int sliceType = cursor.getInt(
|
||||
cursor.getColumnIndex(IndexColumns.SLICE_TYPE));
|
||||
|
||||
@@ -178,6 +181,7 @@ public class SlicesDatabaseAccessor {
|
||||
.setUri(uri)
|
||||
.setPlatformDefined(isPlatformDefined)
|
||||
.setSliceType(sliceType)
|
||||
.setDynamicSummaryAllowed(isDynamicSummaryAllowed)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user