forked from organicmaps/organicmaps
[android] Fixed review notes
This commit is contained in:
parent
50beeb926e
commit
4a4c8f750a
6 changed files with 20 additions and 12 deletions
|
@ -107,8 +107,7 @@ public class SocialAuthDialogFragment extends BaseMwmDialogFragment
|
|||
.requestIdToken(PrivateVariables.googleWebClientId())
|
||||
.requestEmail()
|
||||
.build();
|
||||
mGoogleSignInClient = GoogleSignIn.getClient(getActivity(), gso);
|
||||
trackStatsIfArgsExist(Statistics.EventName.AUTH_SHOWN);
|
||||
mGoogleSignInClient = GoogleSignIn.getClient(requireActivity(), gso);
|
||||
}
|
||||
|
||||
private void trackStatsIfArgsExist(@NonNull String action)
|
||||
|
@ -165,6 +164,8 @@ public class SocialAuthDialogFragment extends BaseMwmDialogFragment
|
|||
|
||||
setButtonAvailability(view, false, R.id.google_button, R.id.facebook_button,
|
||||
R.id.phone_button);
|
||||
|
||||
trackStatsIfArgsExist(Statistics.EventName.AUTH_SHOWN);
|
||||
return view;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,12 +17,7 @@ public abstract class BaseAuthFragment extends BaseAsyncOperationFragment
|
|||
@NonNull
|
||||
private final Authorizer mAuthorizer = new Authorizer(this);
|
||||
|
||||
protected void authorize()
|
||||
{
|
||||
mAuthorizer.authorize(AuthBundleFactory.subscription());
|
||||
}
|
||||
|
||||
protected void authorize(@NonNull Bundle bundle)
|
||||
protected final void authorize(@NonNull Bundle bundle)
|
||||
{
|
||||
mAuthorizer.authorize(bundle);
|
||||
}
|
||||
|
|
|
@ -21,7 +21,7 @@ public abstract class BaseToolbarAuthFragment extends BaseMwmToolbarFragment
|
|||
@NonNull
|
||||
private final Authorizer mAuthorizer = new Authorizer(this);
|
||||
|
||||
protected void authorize(@NonNull Bundle bundle)
|
||||
protected final void authorize(@NonNull Bundle bundle)
|
||||
{
|
||||
mAuthorizer.authorize(bundle);
|
||||
}
|
||||
|
|
|
@ -5,34 +5,39 @@ import android.os.Bundle;
|
|||
import androidx.annotation.NonNull;
|
||||
import com.mapswithme.util.statistics.Statistics;
|
||||
|
||||
public abstract class AuthBundleFactory
|
||||
public class AuthBundleFactory
|
||||
{
|
||||
|
||||
@NonNull
|
||||
public static Bundle saveReview()
|
||||
{
|
||||
return buildBundle(Statistics.EventParam.AFTER_SAVE_REVIEW);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Bundle bookmarksBackup()
|
||||
{
|
||||
return buildBundle(Statistics.EventParam.BOOKMARKS_BACKUP);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Bundle guideCatalogue()
|
||||
{
|
||||
return buildBundle(Statistics.EventParam.GUIDE_CATALOGUE);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Bundle subscription()
|
||||
{
|
||||
return buildBundle(Statistics.EventParam.SUBSCRIPTION);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static Bundle exportBookmarks()
|
||||
{
|
||||
return buildBundle(Statistics.EventParam.EXPORT_BOOKMARKS);
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private static Bundle buildBundle(@NonNull String value)
|
||||
{
|
||||
Bundle bundle = new Bundle();
|
||||
|
|
|
@ -1306,7 +1306,8 @@ public class Factory
|
|||
private static Bundle toDialogArgs(@NonNull List<KeyValue> pairs)
|
||||
{
|
||||
Bundle bundle = new Bundle();
|
||||
for (KeyValue each : pairs) bundle.putString(each.getKey(), each.getValue());
|
||||
for (KeyValue each : pairs)
|
||||
bundle.putString(each.getKey(), each.getValue());
|
||||
return bundle;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.android.billingclient.api.SkuDetails;
|
|||
import com.mapswithme.maps.Framework;
|
||||
import com.mapswithme.maps.R;
|
||||
import com.mapswithme.maps.base.BaseAuthFragment;
|
||||
import com.mapswithme.maps.bookmarks.AuthBundleFactory;
|
||||
import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
||||
import com.mapswithme.maps.dialog.AlertDialog;
|
||||
import com.mapswithme.maps.dialog.AlertDialogCallback;
|
||||
|
@ -112,6 +113,11 @@ abstract class AbstractBookmarkSubscriptionFragment extends BaseAuthFragment
|
|||
activateState(BookmarkSubscriptionPaymentState.CHECK_NETWORK_CONNECTION);
|
||||
}
|
||||
|
||||
protected void authorize()
|
||||
{
|
||||
authorize(AuthBundleFactory.subscription());
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void onDestroyView()
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue