Merge "Reduce scope for some methods in SliceFeatureProvider"

This commit is contained in:
TreeHugger Robot
2019-03-14 19:15:49 +00:00
committed by Android (Google) Code Review
4 changed files with 7 additions and 21 deletions

View File

@@ -12,8 +12,6 @@ public interface SlicesFeatureProvider {
boolean DEBUG = false;
SlicesIndexer getSliceIndexer(Context context);
SliceDataConverter getSliceDataConverter(Context context);
/**

View File

@@ -31,14 +31,6 @@ public class SlicesFeatureProviderImpl implements SlicesFeatureProvider {
private SliceDataConverter mSliceDataConverter;
private CustomSliceManager mCustomSliceManager;
@Override
public SlicesIndexer getSliceIndexer(Context context) {
if (mSlicesIndexer == null) {
mSlicesIndexer = new SlicesIndexer(context.getApplicationContext());
}
return mSlicesIndexer;
}
@Override
public SliceDataConverter getSliceDataConverter(Context context) {
if (mSliceDataConverter == null) {
@@ -76,4 +68,11 @@ public class SlicesFeatureProviderImpl implements SlicesFeatureProvider {
public Enhanced4gLteSliceHelper getNewEnhanced4gLteSliceHelper(Context context) {
return new Enhanced4gLteSliceHelper(context);
}
private SlicesIndexer getSliceIndexer(Context context) {
if (mSlicesIndexer == null) {
mSlicesIndexer = new SlicesIndexer(context.getApplicationContext());
}
return mSlicesIndexer;
}
}