diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2012-06-03 16:15:34 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2012-06-03 16:15:34 +0200 |
commit | 7297933b1c5cfe1b00474824f5cbb3a7a176d5a2 (patch) | |
tree | 4be8c300d6ba20cd704fd51aaebc3a8855566fb8 /main/src/cgeo/geocaching/SearchActivity.java | |
parent | 2b70b0a6f5b83d40928e2e104f62b1d47b9b7f17 (diff) | |
download | cgeo-7297933b1c5cfe1b00474824f5cbb3a7a176d5a2.zip cgeo-7297933b1c5cfe1b00474824f5cbb3a7a176d5a2.tar.gz cgeo-7297933b1c5cfe1b00474824f5cbb3a7a176d5a2.tar.bz2 |
fix #1704: Filter applied to single cache request
Diffstat (limited to 'main/src/cgeo/geocaching/SearchActivity.java')
-rw-r--r-- | main/src/cgeo/geocaching/SearchActivity.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/SearchActivity.java b/main/src/cgeo/geocaching/SearchActivity.java index 5d4fa47..ae350c0 100644 --- a/main/src/cgeo/geocaching/SearchActivity.java +++ b/main/src/cgeo/geocaching/SearchActivity.java @@ -11,6 +11,7 @@ import cgeo.geocaching.utils.Log; import org.apache.commons.lang3.StringUtils; +import android.app.Activity; import android.app.SearchManager; import android.content.Intent; import android.content.res.Configuration; @@ -26,7 +27,7 @@ import android.widget.EditText; public class SearchActivity extends AbstractActivity { - public static final String EXTRAS_KEYWORDSEARCH = "keywordsearch"; + private static final String EXTRAS_KEYWORDSEARCH = "keywordsearch"; private static final int MENU_SEARCH_OWN_CACHES = 1; private EditText latEdit = null; @@ -410,4 +411,12 @@ public class SearchActivity extends AbstractActivity { } return super.onOptionsItemSelected(item); } + + public static void startActivityScan(final String scan, final Activity fromActivity) { + final Intent searchIntent = new Intent(fromActivity, SearchActivity.class); + searchIntent.setAction(Intent.ACTION_SEARCH). + putExtra(SearchManager.QUERY, scan). + putExtra(SearchActivity.EXTRAS_KEYWORDSEARCH, false); + fromActivity.startActivityForResult(searchIntent, cgeo.SEARCH_REQUEST_CODE); + } } |