From 390bd2e71c324eb0b21f366291e8e5536c442aa3 Mon Sep 17 00:00:00 2001 From: Alexey Kulish Date: Tue, 6 Oct 2015 17:20:51 +0300 Subject: [PATCH] Fix non-compiling issues --- .../download/items/VoiceDialogFragment.java | 31 +------------------ .../download/items/WorldItemsFragment.java | 2 -- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/download/items/VoiceDialogFragment.java b/OsmAnd/src/net/osmand/plus/download/items/VoiceDialogFragment.java index 4b254fe609..20220f984c 100644 --- a/OsmAnd/src/net/osmand/plus/download/items/VoiceDialogFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/items/VoiceDialogFragment.java @@ -14,7 +14,6 @@ import net.osmand.plus.OsmandSettings; import net.osmand.plus.R; import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.download.items.ItemsListBuilder.VoicePromptsType; -import net.osmand.plus.download.newimplementation.DownloadsUiHelper; import org.apache.commons.logging.Log; @@ -23,7 +22,6 @@ public class VoiceDialogFragment extends DialogFragment { public static final String TAG = "VoiceDialogFragment"; private static final String VOICE_PROMPT_TYPE_DLG_KEY = "voice_prompt_type_dlg_key"; private VoicePromptsType voicePromptsType = VoicePromptsType.NONE; - private DownloadsUiHelper.MapDownloadListener mProgressListener; @Override public void onCreate(Bundle savedInstanceState) { @@ -76,38 +74,11 @@ public class VoiceDialogFragment extends DialogFragment { ItemsListBuilder builder = getDownloadActivity().getItemsBuilder(); toolbar.setTitle(builder.getVoicePromtName(voicePromptsType)); } - DownloadsUiHelper.initFreeVersionBanner(view, getMyApplication(), - getResources()); - - mProgressListener = new DownloadsUiHelper.MapDownloadListener(view, getResources()){ - @Override - public void onProgressUpdate(int progressPercentage, int activeTasks) { - super.onProgressUpdate(progressPercentage, activeTasks); - } - - @Override - public void onFinished() { - super.onFinished(); - DownloadsUiHelper.initFreeVersionBanner(view, - getMyApplication(), getResources()); - } - }; + ((DownloadActivity)getActivity()).initFreeVersionBanner(view); return view; } - @Override - public void onResume() { - super.onResume(); - getDownloadActivity().setOnProgressUpdateListener(mProgressListener); - } - - @Override - public void onPause() { - super.onPause(); - getDownloadActivity().setOnProgressUpdateListener(null); - } - @Override public void onSaveInstanceState(Bundle outState) { outState.putString(VOICE_PROMPT_TYPE_DLG_KEY, voicePromptsType.name()); diff --git a/OsmAnd/src/net/osmand/plus/download/items/WorldItemsFragment.java b/OsmAnd/src/net/osmand/plus/download/items/WorldItemsFragment.java index acf148a65e..0627a1547f 100644 --- a/OsmAnd/src/net/osmand/plus/download/items/WorldItemsFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/items/WorldItemsFragment.java @@ -175,7 +175,6 @@ public class WorldItemsFragment extends OsmandExpandableListFragment { private Map> data = new LinkedHashMap<>(); private List sections = new LinkedList<>(); - private Context ctx; private boolean srtmDisabled; private boolean nauticalPluginDisabled; private boolean freeVersion; @@ -185,7 +184,6 @@ public class WorldItemsFragment extends OsmandExpandableListFragment { } public WorldItemsAdapter(Context ctx) { - this.ctx = ctx; srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null; nauticalPluginDisabled = OsmandPlugin.getEnabledPlugin(NauticalMapsPlugin.class) == null; freeVersion = Version.isFreeVersion(getMyApplication());