Fix exceptions

This commit is contained in:
Victor Shcherb 2013-02-16 16:16:25 +01:00
parent 2b3230501c
commit 7f7b7c3a0f
2 changed files with 3 additions and 3 deletions

View file

@ -267,7 +267,7 @@ public class NavigationInfo {
// Show all available info
public void show(final LatLon point, Float heading) {
public void show(final LatLon point, Float heading, Context ctx) {
final List<String> attributes = new ArrayList<String>();
String item;
@ -286,7 +286,7 @@ public class NavigationInfo {
if (attributes.isEmpty())
attributes.add(getString(R.string.no_info));
AlertDialog.Builder info = new AlertDialog.Builder(app);
AlertDialog.Builder info = new AlertDialog.Builder(ctx);
if (point != null)
info.setPositiveButton(autoAnnounce ? R.string.auto_announce_off : R.string.auto_announce_on,
new DialogInterface.OnClickListener() {

View file

@ -1250,7 +1250,7 @@ public class MapActivityActions implements DialogProvider {
break;
case 1:
mapActivity.getNavigationInfo().show(mapActivity.getPointToNavigate(),
mapActivity.getMapLayers().getLocationLayer().getHeading());
mapActivity.getMapLayers().getLocationLayer().getHeading(), mapActivity);
break;
default:
break;