blob: 67aa849c9d411b6154ed8b4a2ca85946df326cf2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
package cgeo.geocaching.apps.cache.navi;
import cgeo.geocaching.cgCache;
import cgeo.geocaching.Waypoint;
import cgeo.geocaching.apps.AbstractApp;
import android.app.Activity;
/**
* navigation app for simple point navigation (no differentiation between cache/waypoint/point)
*/
abstract class AbstractPointNavigationApp extends AbstractApp implements CacheNavigationApp, WaypointNavigationApp, GeopointNavigationApp {
protected AbstractPointNavigationApp(String name, String intent) {
super(name, intent);
}
protected AbstractPointNavigationApp(String name, String intent, String packageName) {
super(name, intent, packageName);
}
@Override
public void navigate(Activity activity, cgCache cache) {
navigate(activity, cache.getCoords());
}
@Override
public void navigate(Activity activity, Waypoint waypoint) {
navigate(activity, waypoint.getCoords());
}
@Override
public boolean isEnabled(cgCache cache) {
return cache.getCoords() != null;
}
@Override
public boolean isEnabled(Waypoint waypoint) {
return waypoint.getCoords() != null;
}
}
|