Fix class cast

This commit is contained in:
Victor Shcherb 2014-07-14 19:50:33 +02:00
parent e33981d4db
commit 5de0754f4c
2 changed files with 4 additions and 6 deletions

View file

@ -34,7 +34,6 @@ import android.widget.EditText;
import android.widget.Spinner;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockActivity;
import com.actionbarsherlock.app.SherlockFragment;
public class OsmEditingPlugin extends OsmandPlugin {
@ -257,7 +256,7 @@ public class OsmEditingPlugin extends OsmandPlugin {
@Override
public void onClick(DialogInterface dialog, int which) {
new UploadGPXFilesTask((SherlockActivity) la, descr.getText().toString(), tags.getText().toString(),
new UploadGPXFilesTask(la, descr.getText().toString(), tags.getText().toString(),
(UploadVisibility) visibility.getItemAtPosition(visibility.getSelectedItemPosition())
).execute(info);
}

View file

@ -6,19 +6,18 @@ import net.osmand.access.AccessibleToast;
import net.osmand.plus.R;
import net.osmand.plus.activities.AvailableGPXFragment.GpxInfo;
import net.osmand.plus.osmedit.OsmEditingPlugin.UploadVisibility;
import android.app.Activity;
import android.os.AsyncTask;
import android.widget.Toast;
import com.actionbarsherlock.app.SherlockActivity;
public class UploadGPXFilesTask extends AsyncTask<GpxInfo, String, String> {
private final String visibility;
private final String description;
private final String tagstring;
private SherlockActivity la;
private Activity la;
public UploadGPXFilesTask(SherlockActivity la,
public UploadGPXFilesTask(Activity la,
String description, String tagstring, UploadVisibility visibility) {
this.la = la;
this.description = description;