use of com.android.settings.overlay.SurveyFeatureProvider in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class InstrumentedFragment method onResume.
@Override
public void onResume() {
super.onResume();
MetricsLogger.visible(getActivity(), getMetricsCategory());
Activity activity = getActivity();
// guard against the activity not existing yet or the feature being disabled
if (activity != null) {
SurveyFeatureProvider provider = FeatureFactory.getFactory(activity).getSurveyFeatureProvider(activity);
if (provider != null) {
// Try to download a survey if there is none available, show the survey otherwise
String id = provider.getSurveyId(activity, getClass().getSimpleName());
if (provider.getSurveyExpirationDate(activity, id) <= -1) {
// register the receiver to show the survey on completion.
mReceiver = provider.createAndRegisterReceiver(activity);
provider.downloadSurvey(activity, id, null);
} else {
provider.showSurveyIfAvailable(activity, id);
}
}
}
}
use of com.android.settings.overlay.SurveyFeatureProvider in project android_packages_apps_Settings by DirtyUnicorns.
the class SurveyMixin method onResume.
@Override
public void onResume() {
Activity activity = mFragment.getActivity();
// guard against the activity not existing yet or the feature being disabled
if (activity != null) {
SurveyFeatureProvider provider = FeatureFactory.getFactory(activity).getSurveyFeatureProvider(activity);
if (provider != null) {
// Try to download a survey if there is none available, show the survey otherwise
String id = provider.getSurveyId(activity, mName);
if (provider.getSurveyExpirationDate(activity, id) <= -1) {
// register the receiver to show the survey on completion.
mReceiver = provider.createAndRegisterReceiver(activity);
provider.downloadSurvey(activity, id, null);
} else {
provider.showSurveyIfAvailable(activity, id);
}
}
}
}
use of com.android.settings.overlay.SurveyFeatureProvider in project platform_packages_apps_Settings by BlissRoms.
the class SurveyMixin method onResume.
@Override
public void onResume() {
Activity activity = mFragment.getActivity();
// guard against the activity not existing yet or the feature being disabled
if (activity != null) {
SurveyFeatureProvider provider = FeatureFactory.getFactory(activity).getSurveyFeatureProvider(activity);
if (provider != null) {
// Try to download a survey if there is none available, show the survey otherwise
String id = provider.getSurveyId(activity, mName);
if (provider.getSurveyExpirationDate(activity, id) <= -1) {
// register the receiver to show the survey on completion.
mReceiver = provider.createAndRegisterReceiver(activity);
provider.downloadSurvey(activity, id, null);
} else {
provider.showSurveyIfAvailable(activity, id);
}
}
}
}
use of com.android.settings.overlay.SurveyFeatureProvider in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class InstrumentedPreferenceFragment method onResume.
@Override
public void onResume() {
super.onResume();
MetricsLogger.visible(getActivity(), getMetricsCategory());
Activity activity = getActivity();
// guard against the activity not existing yet or the feature being disabled
if (activity != null) {
SurveyFeatureProvider provider = FeatureFactory.getFactory(activity).getSurveyFeatureProvider(activity);
if (provider != null) {
// Try to download a survey if there is none available, show the survey otherwise
String id = provider.getSurveyId(activity, getClass().getSimpleName());
if (provider.getSurveyExpirationDate(activity, id) <= -1) {
// register the receiver to show the survey on completion.
mReceiver = provider.createAndRegisterReceiver(activity);
provider.downloadSurvey(activity, id, null);
} else {
provider.showSurveyIfAvailable(activity, id);
}
}
}
}
use of com.android.settings.overlay.SurveyFeatureProvider in project android_packages_apps_Settings by LineageOS.
the class SurveyMixin method onResume.
@Override
public void onResume() {
Activity activity = mFragment.getActivity();
// guard against the activity not existing yet or the feature being disabled
if (activity != null) {
SurveyFeatureProvider provider = FeatureFactory.getFactory(activity).getSurveyFeatureProvider(activity);
if (provider != null) {
// Try to download a survey if there is none available, show the survey otherwise
String id = provider.getSurveyId(activity, mName);
if (provider.getSurveyExpirationDate(activity, id) <= -1) {
// register the receiver to show the survey on completion.
mReceiver = provider.createAndRegisterReceiver(activity);
provider.downloadSurvey(activity, id, null);
} else {
provider.showSurveyIfAvailable(activity, id);
}
}
}
}
Aggregations