Refactor CustomSliceManager.
- Make everything that can be static, static. - Also removed a unused slice for battery info. Next step - going to make CustomSliceManager into a regular class instead of getting it from FeatureProvider. This way it's no longer an application level singleton, then we can do things like attaching lifecycle to it. It will be easier to deal with "session" based use case after the refactor Bug: 123937830 Test: manual Change-Id: I384761a6894fa907f72a3610437835c4dd4d1944
This commit is contained in:
@@ -147,7 +147,7 @@ public class SettingsSliceProvider extends SliceProvider {
|
||||
|
||||
@Override
|
||||
public void onSlicePinned(Uri sliceUri) {
|
||||
if (mCustomSliceManager.isValidUri(sliceUri)) {
|
||||
if (CustomSliceRegistry.isValidUri(sliceUri)) {
|
||||
final CustomSliceable sliceable = mCustomSliceManager.getSliceableFromUri(sliceUri);
|
||||
final IntentFilter filter = sliceable.getIntentFilter();
|
||||
if (filter != null) {
|
||||
@@ -194,7 +194,7 @@ public class SettingsSliceProvider extends SliceProvider {
|
||||
|
||||
// Before adding a slice to {@link CustomSliceManager}, please get approval
|
||||
// from the Settings team.
|
||||
if (mCustomSliceManager.isValidUri(sliceUri)) {
|
||||
if (CustomSliceRegistry.isValidUri(sliceUri)) {
|
||||
final CustomSliceable sliceable = mCustomSliceManager.getSliceableFromUri(
|
||||
sliceUri);
|
||||
return sliceable.getSlice();
|
||||
|
Reference in New Issue
Block a user