Support slice deep links highlighting menu entries
- Add an interface to get highlight menu key resource in Sliceable - Force implementing the new interface in TogglePreferenceController and CustomSliceable at syntax level - Update the slice index db schema Bug: 204695404 Test: manual, robotest build pass, unit Change-Id: I0b5068bccd04f1590023de7f3385bc0a4c6fa47b
This commit is contained in:
@@ -50,6 +50,7 @@ public class SlicesDatabaseAccessor {
|
||||
IndexColumns.CONTROLLER,
|
||||
IndexColumns.SLICE_TYPE,
|
||||
IndexColumns.UNAVAILABLE_SLICE_SUBTITLE,
|
||||
IndexColumns.HIGHLIGHT_MENU_RESOURCE,
|
||||
};
|
||||
|
||||
private final Context mContext;
|
||||
@@ -163,6 +164,8 @@ public class SlicesDatabaseAccessor {
|
||||
cursor.getColumnIndex(IndexColumns.SLICE_TYPE));
|
||||
final String unavailableSliceSubtitle = cursor.getString(
|
||||
cursor.getColumnIndex(IndexColumns.UNAVAILABLE_SLICE_SUBTITLE));
|
||||
final int highlightMenuRes = cursor.getInt(
|
||||
cursor.getColumnIndex(IndexColumns.HIGHLIGHT_MENU_RESOURCE));
|
||||
|
||||
if (isIntentOnly) {
|
||||
sliceType = SliceData.SliceType.INTENT;
|
||||
@@ -180,6 +183,7 @@ public class SlicesDatabaseAccessor {
|
||||
.setUri(uri)
|
||||
.setSliceType(sliceType)
|
||||
.setUnavailableSliceSubtitle(unavailableSliceSubtitle)
|
||||
.setHighlightMenuRes(highlightMenuRes)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user