forked from organicmaps/organicmaps
[android] Added logs for checking invalid bookmark categories and pingin the bookmark service
This commit is contained in:
parent
7bf0e66bbb
commit
b5872ebe5f
3 changed files with 12 additions and 1 deletions
|
@ -22,11 +22,14 @@ import com.mapswithme.maps.dialog.ConfirmationDialogFactory;
|
|||
import com.mapswithme.maps.dialog.ProgressDialogFragment;
|
||||
import com.mapswithme.maps.purchase.BookmarkPaymentActivity;
|
||||
import com.mapswithme.maps.purchase.PurchaseUtils;
|
||||
import com.mapswithme.util.log.Logger;
|
||||
import com.mapswithme.util.log.LoggerFactory;
|
||||
|
||||
class BookmarksDownloadFragmentDelegate implements Authorizer.Callback, BookmarkDownloadCallback,
|
||||
TargetFragmentCallback
|
||||
{
|
||||
|
||||
private final static Logger LOGGER = LoggerFactory.INSTANCE.getLogger(LoggerFactory.Type.BILLING);
|
||||
private final static String TAG = BookmarksDownloadFragmentDelegate.class.getSimpleName();
|
||||
@SuppressWarnings("NullableProblems")
|
||||
@NonNull
|
||||
private Authorizer mAuthorizer;
|
||||
|
@ -77,6 +80,7 @@ class BookmarksDownloadFragmentDelegate implements Authorizer.Callback, Bookmark
|
|||
if (savedInstanceState != null)
|
||||
return;
|
||||
|
||||
LOGGER.i(TAG, "Check invalid bookmark categories...");
|
||||
BookmarkManager.INSTANCE.checkInvalidCategories();
|
||||
}
|
||||
|
||||
|
@ -211,6 +215,7 @@ class BookmarksDownloadFragmentDelegate implements Authorizer.Callback, Bookmark
|
|||
@Override
|
||||
public void onCheckInvalidCategories(boolean hasInvalidCategories)
|
||||
{
|
||||
LOGGER.i(TAG, "Has invalid categories: " + hasInvalidCategories);
|
||||
BookmarkManager.INSTANCE.removeInvalidCategoriesListener(this);
|
||||
|
||||
if (mFrag == null)
|
||||
|
|
|
@ -7,6 +7,8 @@ import com.mapswithme.maps.bookmarks.data.BookmarkManager;
|
|||
import com.mapswithme.maps.dialog.AlertDialogCallback;
|
||||
import com.mapswithme.maps.purchase.BookmarkSubscriptionActivity;
|
||||
import com.mapswithme.maps.purchase.PurchaseUtils;
|
||||
import com.mapswithme.util.log.Logger;
|
||||
import com.mapswithme.util.log.LoggerFactory;
|
||||
|
||||
class InvalidSubscriptionAlertDialogCallback implements AlertDialogCallback
|
||||
{
|
||||
|
@ -27,6 +29,9 @@ class InvalidSubscriptionAlertDialogCallback implements AlertDialogCallback
|
|||
@Override
|
||||
public void onAlertDialogNegativeClick(int requestCode, int which)
|
||||
{
|
||||
Logger logger = LoggerFactory.INSTANCE.getLogger(LoggerFactory.Type.BILLING);
|
||||
String tag = InvalidSubscriptionAlertDialogCallback.class.getSimpleName();
|
||||
logger.i(tag, "Delete invalid categories, user didn't continue subscription...");
|
||||
BookmarkManager.INSTANCE.deleteInvalidCategories();
|
||||
}
|
||||
|
||||
|
|
|
@ -428,6 +428,7 @@ public class BookmarkSubscriptionFragment extends BaseMwmFragment
|
|||
@Override
|
||||
public void onPingFinished(boolean isServiceAvailable)
|
||||
{
|
||||
LOGGER.i(TAG, "Ping finished, isServiceAvailable: " + isServiceAvailable);
|
||||
if (getUiObject() == null)
|
||||
mPendingPingingResult = isServiceAvailable;
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue