From 5de0754f4cadeb9741a6909b7e85ac7ba1106de5 Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 14 Jul 2014 19:50:33 +0200 Subject: [PATCH] Fix class cast --- OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java | 3 +-- OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java index 67a8240d7b..ff8fdfef20 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/OsmEditingPlugin.java @@ -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); } diff --git a/OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java b/OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java index 85c3648e09..dde40bc5b5 100644 --- a/OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java +++ b/OsmAnd/src/net/osmand/plus/osmedit/UploadGPXFilesTask.java @@ -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 { 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;