Add isSliceable API to BasePrefController
Only support explicitly approved Settings Slices, dictated by controllers which return true for the new method isSliceable. Updating the supported settings to a whitelist means that the method to return all available slices must be updated, and checking slicability when we index slices. Test: robotests Bug: 79779103 Change-Id: Ib2b9690cdd0036b5cc4a1cb846c52bce7c824ab9
This commit is contained in:
@@ -234,6 +234,23 @@ public abstract class BasePreferenceController extends AbstractPreferenceControl
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the controller should be used as a Slice.
|
||||
* <p>
|
||||
* Important criteria for a Slice are:
|
||||
* - Must be secure
|
||||
* - Must not be a privacy leak
|
||||
* - Must be understandable as a stand-alone Setting.
|
||||
* <p>
|
||||
* This does not guarantee the setting is available. {@link #isAvailable()} should sill be
|
||||
* called.
|
||||
*
|
||||
* @return {@code true} if the controller should be used externally as a Slice.
|
||||
*/
|
||||
public boolean isSliceable() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates non-indexable keys for search provider.
|
||||
*
|
||||
|
Reference in New Issue
Block a user