use of com.android.settings.overlay.SupportFeatureProvider in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SupportDisclaimerDialogFragment method onClick.
@Override
public void onClick(DialogInterface dialog, int which) {
if (which == Dialog.BUTTON_NEGATIVE) {
MetricsLogger.action(getContext(), MetricsProto.MetricsEvent.ACTION_SUPPORT_DISCLAIMER_CANCEL);
return;
}
final Activity activity = getActivity();
final CheckBox doNotShow = (CheckBox) getDialog().findViewById(R.id.support_disclaimer_do_not_show_again);
final SupportFeatureProvider supportFeatureProvider = FeatureFactory.getFactory(activity).getSupportFeatureProvider(activity);
supportFeatureProvider.setShouldShowDisclaimerDialog(getContext(), !doNotShow.isChecked());
final Bundle bundle = getArguments();
MetricsLogger.action(activity, MetricsProto.MetricsEvent.ACTION_SUPPORT_DISCLAIMER_OK);
supportFeatureProvider.startSupport(getActivity(), (Account) bundle.getParcelable(EXTRA_ACCOUNT), bundle.getInt(EXTRA_TYPE));
}
use of com.android.settings.overlay.SupportFeatureProvider in project Resurrection_packages_apps_Settings by ResurrectionRemix.
the class SupportDisclaimerDialogFragment method onCreateDialog.
@Override
public Dialog onCreateDialog(Bundle savedInstanceState) {
final AlertDialog.Builder builder = new AlertDialog.Builder(getActivity()).setTitle(R.string.support_disclaimer_title).setPositiveButton(android.R.string.ok, this).setNegativeButton(android.R.string.cancel, this);
final View content = LayoutInflater.from(builder.getContext()).inflate(R.layout.support_disclaimer_content, null);
final TextView disclaimer = (TextView) content.findViewById(R.id.support_disclaimer_text);
final Activity activity = getActivity();
final SupportFeatureProvider supportFeatureProvider = FeatureFactory.getFactory(activity).getSupportFeatureProvider(activity);
disclaimer.setText(supportFeatureProvider.getDisclaimerStringResId());
stripUnderlines((Spannable) disclaimer.getText());
return builder.setView(content).create();
}
Aggregations