Added feature for surveys provider to Settings
It is now possible to create and show surveys to a user asking them for feedback within the Settings app. Test: JUnitTests Bug: 27823357 Change-Id: I824899045f6ce30e5b6f46d20888da673114f658
This commit is contained in:
@@ -26,6 +26,7 @@ import com.android.settings.localepicker.LocaleFeatureProvider;
|
||||
import com.android.settings.overlay.FeatureFactory;
|
||||
import com.android.settings.overlay.SupportFeatureProvider;
|
||||
import com.android.settings.search2.SearchFeatureProvider;
|
||||
import com.android.settings.overlay.SurveyFeatureProvider;
|
||||
|
||||
import static org.mockito.Matchers.anyString;
|
||||
import static org.mockito.Mockito.mock;
|
||||
@@ -45,6 +46,7 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
public final ApplicationFeatureProvider applicationFeatureProvider;
|
||||
public final EnterprisePrivacyFeatureProvider enterprisePrivacyFeatureProvider;
|
||||
public final SearchFeatureProvider searchFeatureProvider;
|
||||
public final SurveyFeatureProvider surveyFeatureProvider;
|
||||
|
||||
/**
|
||||
* Call this in {@code @Before} method of the test class to use fake factory.
|
||||
@@ -75,6 +77,7 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
applicationFeatureProvider = mock(ApplicationFeatureProvider.class);
|
||||
enterprisePrivacyFeatureProvider = mock(EnterprisePrivacyFeatureProvider.class);
|
||||
searchFeatureProvider = mock(SearchFeatureProvider.class);
|
||||
surveyFeatureProvider = mock(SurveyFeatureProvider.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -116,4 +119,9 @@ public class FakeFeatureFactory extends FeatureFactory {
|
||||
public SearchFeatureProvider getSearchFeatureProvider(Context context) {
|
||||
return searchFeatureProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SurveyFeatureProvider getSurveyFeatureProvider(Context context) {
|
||||
return surveyFeatureProvider;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user