diff --git a/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerSwitchBarControllerTest.java b/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerSwitchBarControllerTest.java index be04eecefc8..1bc859f2679 100644 --- a/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerSwitchBarControllerTest.java +++ b/tests/robotests/src/com/android/settings/deletionhelper/AutomaticStorageManagerSwitchBarControllerTest.java @@ -71,6 +71,7 @@ public class AutomaticStorageManagerSwitchBarControllerTest { mSwitchBar = new SwitchBar(mContext); Context fakeContextForFakeProvider = mock(Context.class, RETURNS_DEEP_STUBS); + FakeFeatureFactory.setupForTest(fakeContextForFakeProvider); FeatureFactory featureFactory = FakeFeatureFactory.getFactory(fakeContextForFakeProvider); mMetricsFeatureProvider = featureFactory.getMetricsFeatureProvider(); mPreference = new Preference(mContext);