forked from organicmaps/organicmaps
[android] Fixed checking pro version.
This commit is contained in:
parent
467c228167
commit
2ce27305b7
2 changed files with 2 additions and 3 deletions
|
@ -107,7 +107,7 @@ public class MWMApplication extends android.app.Application implements MapStorag
|
|||
{
|
||||
super.onCreate();
|
||||
|
||||
m_isProVersion = getPackageName().endsWith(".pro");
|
||||
m_isProVersion = getPackageName().contains(".pro");
|
||||
|
||||
// http://stackoverflow.com/questions/1440957/httpurlconnection-getresponsecode-returns-1-on-second-invocation
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.ECLAIR_MR1)
|
||||
|
|
|
@ -297,8 +297,7 @@ public class MapObjectFragment extends Fragment
|
|||
|
||||
private void onAddBookmarkClicked()
|
||||
{
|
||||
//TODO add normal PRO check
|
||||
if ( !((MWMApplication)getActivity().getApplication()).isProVersion())
|
||||
if (MWMApplication.get().isProVersion())
|
||||
{
|
||||
// TODO this cast if safe, but style is bad
|
||||
final MapObjectActivity activity = (MapObjectActivity) getActivity();
|
||||
|
|
Loading…
Add table
Reference in a new issue