mirror of
https://github.com/zxing/zxing.git
synced 2025-01-12 11:47:26 -08:00
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:
parent
cf6cbcd84a
commit
f4329e7d15
|
@ -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]);
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue