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,8 @@ public interface Sliceable {
|
||||
* - Must be understandable as a stand-alone Setting.
|
||||
* <p>
|
||||
* This does not guarantee the setting is available.
|
||||
* <p>
|
||||
* {@link #getSliceHighlightMenuRes} should also be overridden when returning true.
|
||||
*
|
||||
* @return {@code true} if the controller should be used as a Slice.
|
||||
*/
|
||||
@@ -131,4 +133,12 @@ public interface Sliceable {
|
||||
default Class<? extends SliceBackgroundWorker> getBackgroundWorkerClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return a resource ID that indicates which menu entry should be highlighted in multi-pane
|
||||
* mode.
|
||||
*/
|
||||
default int getSliceHighlightMenuRes() {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user