From adb0e3e1451e9d612724dbd2c2695a87beae44eb Mon Sep 17 00:00:00 2001 From: Denis Date: Wed, 24 Sep 2014 11:47:02 +0300 Subject: [PATCH] Updated downloads only for sherpafy --- OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java | 2 ++ OsmAnd/src/net/osmand/plus/download/DownloadActivity.java | 2 +- .../src/net/osmand/plus/download/DownloadIndexFragment.java | 2 +- .../src/net/osmand/plus/sherpafy/SherpafyCustomization.java | 5 +++++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java b/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java index 8a1db01948..956980c2d7 100644 --- a/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java +++ b/OsmAnd/src/net/osmand/plus/OsmAndAppCustomization.java @@ -155,4 +155,6 @@ public class OsmAndAppCustomization { } public boolean showNavigationControls() { return true;} + + public boolean onlyTourDownload() { return false;} } diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java index 6815728093..5ea4bcffdb 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadActivity.java @@ -72,7 +72,7 @@ public class DownloadActivity extends SherlockFragmentActivity { tabHost.setup(); ViewPager viewPager = (ViewPager) findViewById(R.id.pager); mTabsAdapter = new FavouritesActivity.TabsAdapter(this, tabHost, viewPager, settings, false); - if (Version.isSherpafy(getMyApplication())){ + if (getMyApplication().getAppCustomization().onlyTourDownload()){ mTabsAdapter.addTab(tabHost.newTabSpec("DOWNLOADS").setIndicator("Downloads"), DownloadIndexFragment.class, null); } else { diff --git a/OsmAnd/src/net/osmand/plus/download/DownloadIndexFragment.java b/OsmAnd/src/net/osmand/plus/download/DownloadIndexFragment.java index 4cb729d69a..9012f65446 100644 --- a/OsmAnd/src/net/osmand/plus/download/DownloadIndexFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/DownloadIndexFragment.java @@ -191,7 +191,7 @@ public class DownloadIndexFragment extends OsmandExpandableListFragment { @Override public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) { - if (Version.isSherpafy(getMyApplication())){ + if (getMyApplication().getAppCustomization().onlyTourDownload()){ return; } diff --git a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java index 3bd0e573c3..32b2837c2f 100644 --- a/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java +++ b/OsmAnd/src/net/osmand/plus/sherpafy/SherpafyCustomization.java @@ -735,4 +735,9 @@ public class SherpafyCustomization extends OsmAndAppCustomization { public boolean showNavigationControls() { return false; } + + @Override + public boolean onlyTourDownload() { + return true; + } }