Fix non-compiling issues

This commit is contained in:
Alexey Kulish 2015-10-06 17:20:51 +03:00
parent d562346d3b
commit 390bd2e71c
2 changed files with 1 additions and 32 deletions

View file

@ -14,7 +14,6 @@ import net.osmand.plus.OsmandSettings;
import net.osmand.plus.R; import net.osmand.plus.R;
import net.osmand.plus.download.DownloadActivity; import net.osmand.plus.download.DownloadActivity;
import net.osmand.plus.download.items.ItemsListBuilder.VoicePromptsType; import net.osmand.plus.download.items.ItemsListBuilder.VoicePromptsType;
import net.osmand.plus.download.newimplementation.DownloadsUiHelper;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
@ -23,7 +22,6 @@ public class VoiceDialogFragment extends DialogFragment {
public static final String TAG = "VoiceDialogFragment"; public static final String TAG = "VoiceDialogFragment";
private static final String VOICE_PROMPT_TYPE_DLG_KEY = "voice_prompt_type_dlg_key"; private static final String VOICE_PROMPT_TYPE_DLG_KEY = "voice_prompt_type_dlg_key";
private VoicePromptsType voicePromptsType = VoicePromptsType.NONE; private VoicePromptsType voicePromptsType = VoicePromptsType.NONE;
private DownloadsUiHelper.MapDownloadListener mProgressListener;
@Override @Override
public void onCreate(Bundle savedInstanceState) { public void onCreate(Bundle savedInstanceState) {
@ -76,38 +74,11 @@ public class VoiceDialogFragment extends DialogFragment {
ItemsListBuilder builder = getDownloadActivity().getItemsBuilder(); ItemsListBuilder builder = getDownloadActivity().getItemsBuilder();
toolbar.setTitle(builder.getVoicePromtName(voicePromptsType)); toolbar.setTitle(builder.getVoicePromtName(voicePromptsType));
} }
DownloadsUiHelper.initFreeVersionBanner(view, getMyApplication(), ((DownloadActivity)getActivity()).initFreeVersionBanner(view);
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());
}
};
return view; return view;
} }
@Override
public void onResume() {
super.onResume();
getDownloadActivity().setOnProgressUpdateListener(mProgressListener);
}
@Override
public void onPause() {
super.onPause();
getDownloadActivity().setOnProgressUpdateListener(null);
}
@Override @Override
public void onSaveInstanceState(Bundle outState) { public void onSaveInstanceState(Bundle outState) {
outState.putString(VOICE_PROMPT_TYPE_DLG_KEY, voicePromptsType.name()); outState.putString(VOICE_PROMPT_TYPE_DLG_KEY, voicePromptsType.name());

View file

@ -175,7 +175,6 @@ public class WorldItemsFragment extends OsmandExpandableListFragment {
private Map<String, List<Object>> data = new LinkedHashMap<>(); private Map<String, List<Object>> data = new LinkedHashMap<>();
private List<String> sections = new LinkedList<>(); private List<String> sections = new LinkedList<>();
private Context ctx;
private boolean srtmDisabled; private boolean srtmDisabled;
private boolean nauticalPluginDisabled; private boolean nauticalPluginDisabled;
private boolean freeVersion; private boolean freeVersion;
@ -185,7 +184,6 @@ public class WorldItemsFragment extends OsmandExpandableListFragment {
} }
public WorldItemsAdapter(Context ctx) { public WorldItemsAdapter(Context ctx) {
this.ctx = ctx;
srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null; srtmDisabled = OsmandPlugin.getEnabledPlugin(SRTMPlugin.class) == null;
nauticalPluginDisabled = OsmandPlugin.getEnabledPlugin(NauticalMapsPlugin.class) == null; nauticalPluginDisabled = OsmandPlugin.getEnabledPlugin(NauticalMapsPlugin.class) == null;
freeVersion = Version.isFreeVersion(getMyApplication()); freeVersion = Version.isFreeVersion(getMyApplication());