Merge "Remove the redundant constructor of SuggestionFeatureProviderImpl"
This commit is contained in:
@@ -73,7 +73,7 @@ public class SuggestionFeatureProviderImplTest {
|
||||
when(mContext.getSystemService(Context.ACTIVITY_SERVICE)).thenReturn(mActivityManager);
|
||||
when(mActivityManager.isLowRamDevice()).thenReturn(false);
|
||||
|
||||
mProvider = new SuggestionFeatureProviderImpl(mContext);
|
||||
mProvider = new SuggestionFeatureProviderImpl();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@@ -111,7 +111,7 @@ public class DoubleTapPowerPreferenceControllerTest {
|
||||
com.android.internal.R.bool.config_cameraDoubleTapPowerGestureEnabled, true);
|
||||
// No stored value in shared preferences if not visited yet.
|
||||
final SharedPreferences prefs =
|
||||
new SuggestionFeatureProviderImpl(mContext).getSharedPrefs(mContext);
|
||||
new SuggestionFeatureProviderImpl().getSharedPrefs(mContext);
|
||||
assertThat(isSuggestionComplete(mContext, prefs)).isFalse();
|
||||
}
|
||||
|
||||
@@ -121,7 +121,7 @@ public class DoubleTapPowerPreferenceControllerTest {
|
||||
com.android.internal.R.bool.config_cameraDoubleTapPowerGestureEnabled, true);
|
||||
// No stored value in shared preferences if not visited yet.
|
||||
final SharedPreferences prefs =
|
||||
new SuggestionFeatureProviderImpl(mContext).getSharedPrefs(mContext);
|
||||
new SuggestionFeatureProviderImpl().getSharedPrefs(mContext);
|
||||
prefs.edit().putBoolean(DoubleTapPowerSettings.PREF_KEY_SUGGESTION_COMPLETE, true).commit();
|
||||
|
||||
assertThat(isSuggestionComplete(mContext, prefs)).isTrue();
|
||||
|
@@ -83,7 +83,7 @@ public class DoubleTapScreenPreferenceControllerTest {
|
||||
// No stored value in shared preferences if not visited yet.
|
||||
final Context context = RuntimeEnvironment.application;
|
||||
final SharedPreferences prefs =
|
||||
new SuggestionFeatureProviderImpl(context).getSharedPrefs(context);
|
||||
new SuggestionFeatureProviderImpl().getSharedPrefs(context);
|
||||
|
||||
assertThat(DoubleTapScreenPreferenceController
|
||||
.isSuggestionComplete(mAmbientDisplayConfiguration, prefs)).isFalse();
|
||||
@@ -94,7 +94,7 @@ public class DoubleTapScreenPreferenceControllerTest {
|
||||
when(mAmbientDisplayConfiguration.doubleTapSensorAvailable()).thenReturn(false);
|
||||
final Context context = RuntimeEnvironment.application;
|
||||
final SharedPreferences prefs =
|
||||
new SuggestionFeatureProviderImpl(context).getSharedPrefs(context);
|
||||
new SuggestionFeatureProviderImpl().getSharedPrefs(context);
|
||||
|
||||
prefs.edit().putBoolean(
|
||||
DoubleTapScreenSettings.PREF_KEY_SUGGESTION_COMPLETE, true).commit();
|
||||
|
@@ -85,7 +85,7 @@ public class PickupGesturePreferenceControllerTest {
|
||||
when(mContext.getResources().getString(anyInt())).thenReturn("foo");
|
||||
final Context context = RuntimeEnvironment.application;
|
||||
final SharedPreferences prefs =
|
||||
new SuggestionFeatureProviderImpl(context).getSharedPrefs(context);
|
||||
new SuggestionFeatureProviderImpl().getSharedPrefs(context);
|
||||
prefs.edit().putBoolean(PickupGestureSettings.PREF_KEY_SUGGESTION_COMPLETE, true).commit();
|
||||
|
||||
assertThat(PickupGesturePreferenceController.isSuggestionComplete(mContext, prefs))
|
||||
|
@@ -145,7 +145,7 @@ public class SwipeToNotificationPreferenceControllerTest {
|
||||
.thenReturn(true);
|
||||
// No stored value in shared preferences if not visited yet.
|
||||
final Context context = RuntimeEnvironment.application;
|
||||
final SharedPreferences prefs = new SuggestionFeatureProviderImpl(context)
|
||||
final SharedPreferences prefs = new SuggestionFeatureProviderImpl()
|
||||
.getSharedPrefs(context);
|
||||
|
||||
assertThat(SwipeToNotificationPreferenceController.isSuggestionComplete(mContext, prefs))
|
||||
@@ -161,7 +161,7 @@ public class SwipeToNotificationPreferenceControllerTest {
|
||||
.thenReturn(true);
|
||||
// No stored value in shared preferences if not visited yet.
|
||||
final Context context = RuntimeEnvironment.application;
|
||||
final SharedPreferences prefs = new SuggestionFeatureProviderImpl(context)
|
||||
final SharedPreferences prefs = new SuggestionFeatureProviderImpl()
|
||||
.getSharedPrefs(context);
|
||||
prefs.edit()
|
||||
.putBoolean(SwipeToNotificationSettings.PREF_KEY_SUGGESTION_COMPLETE, true)
|
||||
|
@@ -142,7 +142,7 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SuggestionFeatureProvider getSuggestionFeatureProvider(Context context) {
|
||||
public SuggestionFeatureProvider getSuggestionFeatureProvider() {
|
||||
return suggestionsFeatureProvider;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user