Add metric event for skipping support disclaimer in future

We were not recording when users selected to skip the
support disclaimer in future requests for support. This
event has been added and logged when it occurs.

Test: SettingsRoboTests
Bug: 33414180
Change-Id: I689580ea2256d5554afcd17e77f90ae498d4ad1b
This commit is contained in:
Salvador Martinez
2016-12-21 11:03:45 -08:00
parent c4372f1a48
commit 553ba00a27
3 changed files with 125 additions and 2 deletions

View File

@@ -95,10 +95,15 @@ public final class SupportDisclaimerDialogFragment extends InstrumentedDialogFra
final Activity activity = getActivity();
final CheckBox doNotShow =
(CheckBox) getDialog().findViewById(R.id.support_disclaimer_do_not_show_again);
final boolean isChecked = doNotShow.isChecked();
final SupportFeatureProvider supportFeatureProvider =
FeatureFactory.getFactory(activity).getSupportFeatureProvider(activity);
supportFeatureProvider.setShouldShowDisclaimerDialog(getContext(), !doNotShow.isChecked());
supportFeatureProvider.setShouldShowDisclaimerDialog(getContext(), !isChecked);
final Bundle bundle = getArguments();
if (isChecked) {
mMetricsFeatureProvider.action(activity,
MetricsProto.MetricsEvent.ACTION_SKIP_DISCLAIMER_SELECTED);
}
mMetricsFeatureProvider.action(activity,
MetricsProto.MetricsEvent.ACTION_SUPPORT_DISCLAIMER_OK);
supportFeatureProvider.startSupport(getActivity(),