diff options
author | vng <viktor.govako@gmail.com> | 2013-08-25 03:04:08 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:00:17 +0300 |
commit | fcf97b04b9adb2cd7a6be5866c4fa5b782fb2296 (patch) | |
tree | 377844f3cca7b5794303aa1c976b94364fd7e167 /android/src/com/mapswithme/maps/MWMApplication.java | |
parent | aee576643dd2d75591455d69cf6157ae340d49f3 (diff) |
[android] Fix checking for available guides.
Diffstat (limited to 'android/src/com/mapswithme/maps/MWMApplication.java')
-rw-r--r-- | android/src/com/mapswithme/maps/MWMApplication.java | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/android/src/com/mapswithme/maps/MWMApplication.java b/android/src/com/mapswithme/maps/MWMApplication.java index 1e1fae0d52..8e49873b8b 100644 --- a/android/src/com/mapswithme/maps/MWMApplication.java +++ b/android/src/com/mapswithme/maps/MWMApplication.java @@ -84,21 +84,21 @@ public class MWMApplication extends android.app.Application implements MapStorag } } + private native GuideInfo getGuideInfoForIndex(Index idx); + private void tryNotifyGuideAvailable(Index idx) { - if (Utils.hasAnyGoogleStoreInstalled()) + if (Utils.hasAnyGoogleStoreInstalled()) + { + final GuideInfo info = getGuideInfoForIndex(idx); + if (info != null && !GuidesUtils.isGuideInstalled(info.getAppId(), this)) { - final String countryId = getMapStorage().countryFileNameByIndex(idx); - final GuideInfo info = Framework.getGuideInfoForCountry(countryId); - - if (info != null && !GuidesUtils.isGuideInstalled(info.getAppId(), this)) - { - final Notifier notifier = new Notifier(this); - notifier.placeGuideAvailable(info.getAppName(), - info.getAppId(), - getMapStorage().countryName(idx)); - } + final Notifier notifier = new Notifier(this); + notifier.placeGuideAvailable(info.getAppName(), + info.getAppId(), + getMapStorage().countryName(idx)); } + } } @Override |