Remove context from applicationFeatureProvider
ApplicationFeatureProvider is created by using application context, no need pass context in when get. Bug: 286764889 Test: m Settings Change-Id: I7f8dfe5716b7b55e0ff984f7603875d7896e2313
This commit is contained in:
@@ -90,8 +90,8 @@ public abstract class AppInfoBase extends SettingsPreferenceFragment
|
||||
super.onCreate(savedInstanceState);
|
||||
mFinishing = false;
|
||||
final Activity activity = getActivity();
|
||||
mApplicationFeatureProvider = FeatureFactory.getFactory(activity)
|
||||
.getApplicationFeatureProvider(activity);
|
||||
mApplicationFeatureProvider = FeatureFactory.getFeatureFactory()
|
||||
.getApplicationFeatureProvider();
|
||||
mState = ApplicationsState.getInstance(activity.getApplication());
|
||||
mSession = mState.newSession(this, getSettingsLifecycle());
|
||||
mDpm = (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
|
||||
@@ -138,9 +138,9 @@ public class AppButtonsPreferenceController extends BasePreferenceController imp
|
||||
"Fragment should implement AppButtonsDialogListener");
|
||||
}
|
||||
|
||||
final FeatureFactory factory = FeatureFactory.getFactory(activity);
|
||||
final FeatureFactory factory = FeatureFactory.getFeatureFactory();
|
||||
mMetricsFeatureProvider = factory.getMetricsFeatureProvider();
|
||||
mApplicationFeatureProvider = factory.getApplicationFeatureProvider(activity);
|
||||
mApplicationFeatureProvider = factory.getApplicationFeatureProvider();
|
||||
mState = state;
|
||||
mDpm = (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
|
||||
mUserManager = (UserManager) activity.getSystemService(Context.USER_SERVICE);
|
||||
|
||||
@@ -40,8 +40,8 @@ public class LongBackgroundTasksDetailsPreferenceController extends
|
||||
|
||||
public LongBackgroundTasksDetailsPreferenceController(Context context, String key) {
|
||||
super(context, key);
|
||||
mAppFeatureProvider = FeatureFactory.getFactory(context)
|
||||
.getApplicationFeatureProvider(context);
|
||||
mAppFeatureProvider = FeatureFactory.getFeatureFactory()
|
||||
.getApplicationFeatureProvider();
|
||||
}
|
||||
|
||||
@VisibleForTesting
|
||||
|
||||
@@ -53,8 +53,8 @@ public class TimeSpentInAppPreferenceController extends LiveDataController {
|
||||
public TimeSpentInAppPreferenceController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
mPackageManager = context.getPackageManager();
|
||||
mAppFeatureProvider = FeatureFactory.getFactory(context)
|
||||
.getApplicationFeatureProvider(context);
|
||||
mAppFeatureProvider = FeatureFactory.getFeatureFactory()
|
||||
.getApplicationFeatureProvider();
|
||||
}
|
||||
|
||||
public void setPackageName(String packageName) {
|
||||
|
||||
@@ -30,8 +30,8 @@ public class LongBackgroundTaskController extends BasePreferenceController {
|
||||
|
||||
public LongBackgroundTaskController(Context context, String preferenceKey) {
|
||||
super(context, preferenceKey);
|
||||
mAppFeatureProvider = FeatureFactory.getFactory(context)
|
||||
.getApplicationFeatureProvider(context);
|
||||
mAppFeatureProvider = FeatureFactory.getFeatureFactory()
|
||||
.getApplicationFeatureProvider();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user