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:
Matthew Fritze
2018-06-11 17:20:53 -07:00
parent 2d41659c32
commit 56b2bad05e
11 changed files with 398 additions and 12 deletions

View File

@@ -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);