Merge branch 'master' of git@github.com:osmandapp/Osmand.git

This commit is contained in:
sonora 2011-09-07 20:25:41 +02:00
commit 0aad00c383
2 changed files with 20 additions and 20 deletions

View file

@ -54,7 +54,7 @@
<string name="local_index_download">Herunterladen...</string> <string name="local_index_download">Herunterladen...</string>
<string name="local_index_tile_data">Kachel-Daten: %1$s \nMinimale Vergrößerung : %2$d\nMaximale Vergrößerung : %3$d\nHerunterladbar : %4$s \nHeruntegeladene Vergrößerungen : %5$s</string> <string name="local_index_tile_data">Kachel-Daten: %1$s \nMinimale Vergrößerung : %2$d\nMaximale Vergrößerung : %3$d\nHerunterladbar : %4$s \nHeruntegeladene Vergrößerungen : %5$s</string>
<string name="local_index_poi_data">POI-Daten</string> <string name="local_index_poi_data">POI-Daten</string>
<string name="local_index_address_data">Address-Daten</string> <string name="local_index_address_data">Adress-Daten</string>
<string name="local_index_transport_data">ÖPNV-Daten</string> <string name="local_index_transport_data">ÖPNV-Daten</string>
<string name="local_index_map_data">Karten-Daten</string> <string name="local_index_map_data">Karten-Daten</string>
<string name="local_index_items"></string> <string name="local_index_items"></string>

View file

@ -72,7 +72,7 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
private void createTableForTrack(SQLiteDatabase db){ private void createTableForTrack(SQLiteDatabase db){
db.execSQL("CREATE TABLE " + TRACK_NAME+ " ("+TRACK_COL_LAT +" double, " + TRACK_COL_LON+" double, " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$ db.execSQL("CREATE TABLE " + TRACK_NAME+ " ("+TRACK_COL_LAT +" double, " + TRACK_COL_LON+" double, " //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ TRACK_COL_ALTITUDE+" double, " + TRACK_COL_SPEED+" double, " //$NON-NLS-1$ //$NON-NLS-2$ + TRACK_COL_ALTITUDE+" double, " + TRACK_COL_SPEED+" double, " //$NON-NLS-1$ //$NON-NLS-2$
+ TRACK_COL_DATE +" long )" ); //$NON-NLS-1$ + TRACK_COL_HDOP +" double, " + TRACK_COL_DATE +" long )" ); //$NON-NLS-1$ //$NON-NLS-2$
} }
private void createTableForPoints(SQLiteDatabase db){ private void createTableForPoints(SQLiteDatabase db){
@ -97,19 +97,19 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
public boolean hasDataToSave(){ public boolean hasDataToSave() {
SQLiteDatabase db = getWritableDatabase(); SQLiteDatabase db = getWritableDatabase();
if(db != null){ if (db != null) {
Cursor q = db.query(false, TRACK_NAME, new String[0], null, null, null, null, null, null); Cursor q = db.query(false, TRACK_NAME, new String[0], null, null, null, null, null, null);
boolean has = q.moveToFirst(); boolean has = q.moveToFirst();
q.close(); q.close();
if(has) { if (has) {
return true; return true;
} }
q = db.query(false, POINT_NAME, new String[0], null, null, null, null, null, null); q = db.query(false, POINT_NAME, new String[0], null, null, null, null, null, null);
has = q.moveToFirst(); has = q.moveToFirst();
q.close(); q.close();
if(has) { if (has) {
return true; return true;
} }
} }
@ -120,11 +120,11 @@ public class SavingTrackHelper extends SQLiteOpenHelper {
/** /**
* @return warnings * @return warnings
*/ */
public List<String> saveDataToGpx(){ public List<String> saveDataToGpx() {
SQLiteDatabase db = getReadableDatabase(); SQLiteDatabase db = getReadableDatabase();
List<String> warnings = new ArrayList<String>(); List<String> warnings = new ArrayList<String>();
File dir = OsmandSettings.getOsmandSettings(ctx).getExternalStorageDirectory(); File dir = OsmandSettings.getOsmandSettings(ctx).getExternalStorageDirectory();
if(db != null && dir.canWrite()){ if (db != null && dir.canWrite()) {
dir = new File(dir, ResourceManager.GPX_PATH); dir = new File(dir, ResourceManager.GPX_PATH);
dir.mkdirs(); dir.mkdirs();
if (dir.exists()) { if (dir.exists()) {