48 |
|
|
49 |
public static final int OPTIONS_MAP = 2003; |
public static final int OPTIONS_MAP = 2003; |
50 |
public static final int OPTIONS_GPSINFO = 2004; |
public static final int OPTIONS_GPSINFO = 2004; |
|
|
|
|
|
|
|
|
|
51 |
|
|
52 |
public static final int DLG_PROGRESS = 3001; |
public static final int DLG_PROGRESS = 3001; |
53 |
public static final int DLG_STATIONNAME = 3002; |
public static final int DLG_STATIONNAME = 3002; |
54 |
|
|
55 |
|
|
56 |
|
public static final int GPS_TIMEOUT_MS = 17500; //how long are we willing to wait for gps fix -in milliseconds |
57 |
|
|
58 |
|
|
59 |
static enum LookupMethod { |
static enum LookupMethod { |
60 |
ByLocation, |
ByLocation, |
61 |
ByName, |
ByName, |
149 |
if (findStationsTask != null) { |
if (findStationsTask != null) { |
150 |
findStationsTask.cancel(true); |
findStationsTask.cancel(true); |
151 |
} |
} |
152 |
|
if (locationLookup != null) { |
153 |
|
locationLookup.stopSearch(); |
154 |
|
} |
155 |
|
isRunning = false; |
156 |
} |
} |
157 |
|
|
158 |
|
|
396 |
showDialogSafe(DLG_PROGRESS); |
showDialogSafe(DLG_PROGRESS); |
397 |
|
|
398 |
locationLookup.locateStations(); |
locationLookup.locateStations(); |
399 |
stationsFetched.sendEmptyMessageDelayed(LOCATIONFIXTIMEOUT, 20000); |
stationsFetched.sendEmptyMessageDelayed(LOCATIONFIXTIMEOUT, GPS_TIMEOUT_MS); |
400 |
} |
} |
401 |
|
|
402 |
void startNameSearch(String name) { |
void startNameSearch(String name) { |