Issue 1817 don't include name/title in map search

git-svn-id: https://zxing.googlecode.com/svn/trunk@2987 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
srowen@gmail.com 2013-12-04 18:42:19 +00:00
parent cf6cbcd84a
commit f4329e7d15
2 changed files with 3 additions and 10 deletions

View file

@ -140,9 +140,7 @@ public final class AddressBookResultHandler extends ResultHandler {
addressResult.getGeo());
break;
case 1:
String[] names = addressResult.getNames();
String title = names != null ? names[0] : null;
searchMap(address1, title);
searchMap(address1);
break;
case 2:
dialPhone(addressResult.getPhoneNumbers()[0]);

View file

@ -358,14 +358,9 @@ public abstract class ResultHandler {
* Do a geo search using the address as the query.
*
* @param address The address to find
* @param title An optional title, e.g. the name of the business at this address
*/
final void searchMap(String address, String title) {
String query = address;
if (title != null && !title.isEmpty()) {
query += " (" + title + ')';
}
launchIntent(new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + Uri.encode(query))));
final void searchMap(String address) {
launchIntent(new Intent(Intent.ACTION_VIEW, Uri.parse("geo:0,0?q=" + Uri.encode(address))));
}
final void getDirections(double latitude, double longitude) {