Handle special case slices
Create a handler for any slice that doesn't include anything from a PreferenceController. Test: robotests Change-Id: If23947152d61877537d0cac6240e96b9ab977bce Bug: 80263568
This commit is contained in:
@@ -71,6 +71,15 @@ public class SliceBroadcastReceiver extends BroadcastReceiver {
|
||||
final boolean isPlatformSlice = intent.getBooleanExtra(EXTRA_SLICE_PLATFORM_DEFINED,
|
||||
false /* default */);
|
||||
|
||||
final CustomSliceManager mCustomSliceManager = FeatureFactory.getFactory(
|
||||
context).getSlicesFeatureProvider().getCustomSliceManager(context);
|
||||
if (mCustomSliceManager.isValidAction(action)) {
|
||||
final CustomSliceable sliceable =
|
||||
mCustomSliceManager.getSliceableFromIntentAction(action);
|
||||
sliceable.onNotifyChange(intent);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (action) {
|
||||
case ACTION_TOGGLE_CHANGED:
|
||||
final boolean isChecked = intent.getBooleanExtra(Slice.EXTRA_TOGGLE_STATE, false);
|
||||
|
Reference in New Issue
Block a user