[android] Added finishing ugc activity when cancel or error is obtained during social authentication

This commit is contained in:
Александр Зацепин 2018-04-15 13:54:53 +03:00 committed by Arsentiy Milchakov
parent b08f15ad6a
commit 3748eabf60

View file

@ -121,12 +121,16 @@ public class UGCEditorFragment extends BaseMwmAuthorizationFragment
public void onSocialAuthenticationCancel(@Framework.AuthTokenType int type)
{
Statistics.INSTANCE.trackEvent(Statistics.EventName.UGC_AUTH_DECLINED);
if (isAdded())
getActivity().finish();
}
@Override
public void onSocialAuthenticationError(int type, @Nullable String error)
{
Statistics.INSTANCE.trackUGCAuthFailed(type, error);
if (isAdded())
getActivity().finish();
}
private void onSubmitButtonClick()