Merge heads

This commit is contained in:
youtaol
2012-06-20 09:45:23 +08:00
parent f1a3c5dffa
commit 978b6c5a09
123 changed files with 2475 additions and 5323 deletions
+2 -1
View File
@@ -16,7 +16,7 @@ limitations under the License.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="auto"
android:versionCode="43"
android:versionCode="44"
android:versionName="2.0"
package="com.google.android.maps.mytracks" >
@@ -126,6 +126,7 @@ limitations under the License.
<application
android:backupAgent="com.google.android.apps.mytracks.io.backup.MyTracksBackupAgent"
android:icon="@drawable/my_tracks_icon"
android:hardwareAccelerated="true"
android:label="@string/my_tracks_app_name"
android:name="com.google.android.apps.mytracks.MyTracksApplication"
android:theme="@style/ThemeSelector" >
Binary file not shown.

After

Width:  |  Height:  |  Size: 810 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 368 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 631 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 859 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.4 KiB

After

Width:  |  Height:  |  Size: 681 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

After

Width:  |  Height:  |  Size: 892 B

File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+4
View File
@@ -18,6 +18,8 @@ limitations under the License.
<!-- Keys for persisted preferences. Sorted alphabetically. DO NOT TRANSLATE. -->
<string name="allow_access_key">allowAccess</string>
<string name="announcement_frequency_key">announcementFrequency</string>
<string name="ant_bike_cadence_sensor_id_key">antBikeCadenceSensorId</string>
<string name="ant_combined_bike_sensor_id_key">antCombinedBikeSensorId</string>
<string name="ant_heart_rate_monitor_id_key">antHeartRateMonitorId</string>
<string name="ant_speed_distance_monitor_id_key">antSpeedDistanceMonitorId</string>
<string name="auto_resume_track_current_retry_key">autoResumeTrackCurrentRetry</string>
@@ -71,6 +73,8 @@ limitations under the License.
<string name="settings_reset_key">settingsReset</string>
<string name="settings_sensor_key">settingsSensor</string>
<string name="settings_sensor_ant_key">settingsSensorAnt</string>
<string name="settings_sensor_ant_reset_bike_cadence_sensor_key">settingsSensorAntResetBikeCadenceSensor</string>
<string name="settings_sensor_ant_reset_combined_bike_sensor_key">settingsSensorAntResetCombinedBikeSensor</string>
<string name="settings_sensor_ant_reset_heart_rate_monitor_key">settingsSensorAntResetHeartRateMonitor</string>
<string name="settings_sensor_ant_reset_speed_distance_monitor_key">settingsSensorAntResetSpeedDistanceMonitor</string>
<string name="settings_sensor_bluetooth_key">settingsSensorBluetooth</string>
+18 -4
View File
@@ -368,7 +368,7 @@ limitations under the License.
completion suggestion for wind surfing.">
wind surfing
</string>
<!-- Description -->
<string name="description_activity_type"
translation_description="Activity type description.
@@ -737,7 +737,7 @@ limitations under the License.
</string>
<string name="help_google_services_answer"
translation_description="In the 'Help' page, the answer on locations of google services.
%1$s url. E.g., 'maps.google.com'.
%2$s url. E.g., 'google.com/fusiontables'.
%3$s url. E.g., 'docs.google.com'.">
@@ -1296,12 +1296,12 @@ limitations under the License.
<string name="send_google_new_public_map"
translation_description="When sending a track to Google Maps, the radio option to create a
new public map as opposed to use an existing map.">
Create new public map
Create new public map
</string>
<string name="send_google_new_unlisted_map"
translation_description="When sending a track to Google Maps, the radio option to create a
new unlisted map as opposed to use an existing map.">
Create new unlisted map
Create new unlisted map
</string>
<string name="send_google_no_account_message"
translation_description="When sending to Google, the dialog message when no Google account is
@@ -1730,6 +1730,20 @@ limitations under the License.
%1$d: device id number. E.g., '1'.">
Paired with: %1$d
</string>
<string name="settings_sensor_ant_reset_bike_candence_sensor"
translation_description="In the 'Sensor' settings, under the 'ANT+ options', the option to reset
an ANT+ bike cadence sensor. Note that ANT+ is a radio standard.
Character limit: ~26 (1 line)">
Reset bike cadence
</string>
<string name="settings_sensor_ant_reset_combined_bike_sensor"
translation_description="In the 'Sensor' settings, under the 'ANT+ options', the option to reset
an ANT+ combined bike cadence and speed sensor. Note that ANT+ is a radio standard.
Character limit: ~26 (1 line)">
Reset combined bike
</string>
<string name="settings_sensor_ant_reset_heart_rate_monitor"
translation_description="In the 'Sensor' settings, under the 'ANT+ options', the option to reset
an ANT+ heart rate monitor. Note that ANT+ is a radio standard.
+1
View File
@@ -40,6 +40,7 @@ limitations under the License.
</style>
<!-- The style for choose upload service image view -->
<style name="ChooseUploadServiceImageView">
<item name="android:layout_gravity">center</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_width">wrap_content</item>
</style>
+8
View File
@@ -47,5 +47,13 @@ limitations under the License.
android:key="@string/settings_sensor_ant_reset_speed_distance_monitor_key"
android:persistent="false"
android:title="@string/settings_sensor_ant_reset_speed_distance_monitor" />
<Preference
android:key="@string/settings_sensor_ant_reset_bike_cadence_sensor_key"
android:persistent="false"
android:title="@string/settings_sensor_ant_reset_bike_candence_sensor" />
<Preference
android:key="@string/settings_sensor_ant_reset_combined_bike_sensor_key"
android:persistent="false"
android:title="@string/settings_sensor_ant_reset_combined_bike_sensor" />
</PreferenceCategory>
</PreferenceScreen>
@@ -86,7 +86,7 @@ public class MarkerDetailActivity extends AbstractMyTracksActivity {
} else {
waypointSection.setVisibility(View.GONE);
statisticsSection.setVisibility(View.VISIBLE);
StatsUtils.setTripStatisticsValues(this, waypoint.getStatistics());
StatsUtils.setTripStatisticsValues(this, waypoint.getTripStatistics());
StatsUtils.setLocationValues(this, waypoint.getLocation(), false);
}
}
@@ -59,12 +59,13 @@ public class MarkerListActivity extends AbstractMyTracksActivity {
private static final String TAG = MarkerListActivity.class.getSimpleName();
private static final String[] PROJECTION = new String[] { WaypointsColumns._ID,
WaypointsColumns.TYPE,
private static final String[] PROJECTION = new String[] {
WaypointsColumns._ID,
WaypointsColumns.NAME,
WaypointsColumns.DESCRIPTION,
WaypointsColumns.CATEGORY,
WaypointsColumns.TIME,
WaypointsColumns.DESCRIPTION };
WaypointsColumns.TYPE,
WaypointsColumns.TIME};
// Callback when an item is selected in the contextual action mode
private ContextualActionModeCallback contextualActionModeCallback =
@@ -128,11 +129,11 @@ public class MarkerListActivity extends AbstractMyTracksActivity {
resourceCursorAdapter = new ResourceCursorAdapter(this, R.layout.list_item, null, 0) {
@Override
public void bindView(View view, Context context, Cursor cursor) {
int typeIndex = cursor.getColumnIndex(WaypointsColumns.TYPE);
int nameIndex = cursor.getColumnIndex(WaypointsColumns.NAME);
int categoryIndex = cursor.getColumnIndex(WaypointsColumns.CATEGORY);
int timeIndex = cursor.getColumnIndexOrThrow(WaypointsColumns.TIME);
int descriptionIndex = cursor.getColumnIndex(WaypointsColumns.DESCRIPTION);
int categoryIndex = cursor.getColumnIndex(WaypointsColumns.CATEGORY);
int typeIndex = cursor.getColumnIndex(WaypointsColumns.TYPE);
int timeIndex = cursor.getColumnIndexOrThrow(WaypointsColumns.TIME);
boolean statistics = cursor.getInt(typeIndex) == Waypoint.TYPE_STATISTICS;
String name = cursor.getString(nameIndex);
@@ -77,7 +77,7 @@ public class DescriptionGeneratorImpl implements DescriptionGenerator {
@Override
public String generateWaypointDescription(Waypoint waypoint) {
return generateTripStatisticsDescription(waypoint.getStatistics(), false);
return generateTripStatisticsDescription(waypoint.getTripStatistics(), false);
}
/**
@@ -52,8 +52,6 @@ public class MyTracksProvider extends ContentProvider {
private static final int TRACKS_ID = 4;
private static final int WAYPOINTS = 5;
private static final int WAYPOINTS_ID = 6;
private static final String TRACKPOINTS_TABLE = "trackpoints";
private static final String WAYPOINTS_TABLE = "waypoints";
private static final String TAG = MyTracksProvider.class.getSimpleName();
/**
@@ -67,49 +65,9 @@ public class MyTracksProvider extends ContentProvider {
@Override
public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE " + TRACKPOINTS_TABLE + " ("
+ TrackPointsColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
+ TrackPointsColumns.TRACKID + " INTEGER, "
+ TrackPointsColumns.LONGITUDE + " INTEGER, "
+ TrackPointsColumns.LATITUDE + " INTEGER, "
+ TrackPointsColumns.TIME + " INTEGER, "
+ TrackPointsColumns.ALTITUDE + " FLOAT, "
+ TrackPointsColumns.ACCURACY + " FLOAT, "
+ TrackPointsColumns.SPEED + " FLOAT, "
+ TrackPointsColumns.BEARING + " FLOAT, "
+ TrackPointsColumns.SENSOR + " BLOB);");
db.execSQL(TrackPointsColumns.CREATE_TABLE);
db.execSQL(TracksColumns.CREATE_TABLE);
db.execSQL("CREATE TABLE " + WAYPOINTS_TABLE + " ("
+ WaypointsColumns._ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
+ WaypointsColumns.NAME + " STRING, "
+ WaypointsColumns.DESCRIPTION + " STRING, "
+ WaypointsColumns.CATEGORY + " STRING, "
+ WaypointsColumns.ICON + " STRING, "
+ WaypointsColumns.TRACKID + " INTEGER, "
+ WaypointsColumns.TYPE + " INTEGER, "
+ WaypointsColumns.LENGTH + " FLOAT, "
+ WaypointsColumns.DURATION + " INTEGER, "
+ WaypointsColumns.STARTTIME + " INTEGER, "
+ WaypointsColumns.STARTID + " INTEGER, "
+ WaypointsColumns.STOPID + " INTEGER, "
+ WaypointsColumns.LONGITUDE + " INTEGER, "
+ WaypointsColumns.LATITUDE + " INTEGER, "
+ WaypointsColumns.TIME + " INTEGER, "
+ WaypointsColumns.ALTITUDE + " FLOAT, "
+ WaypointsColumns.ACCURACY + " FLOAT, "
+ WaypointsColumns.SPEED + " FLOAT, "
+ WaypointsColumns.BEARING + " FLOAT, "
+ WaypointsColumns.TOTALDISTANCE + " FLOAT, "
+ WaypointsColumns.TOTALTIME + " INTEGER, "
+ WaypointsColumns.MOVINGTIME + " INTEGER, "
+ WaypointsColumns.AVGSPEED + " FLOAT, "
+ WaypointsColumns.AVGMOVINGSPEED + " FLOAT, "
+ WaypointsColumns.MAXSPEED + " FLOAT, "
+ WaypointsColumns.MINELEVATION + " FLOAT, "
+ WaypointsColumns.MAXELEVATION + " FLOAT, "
+ WaypointsColumns.ELEVATIONGAIN + " FLOAT, "
+ WaypointsColumns.MINGRADE + " FLOAT, "
+ WaypointsColumns.MAXGRADE + " FLOAT);");
db.execSQL(WaypointsColumns.CREATE_TABLE);
}
@Override
@@ -118,9 +76,9 @@ public class MyTracksProvider extends ContentProvider {
if (oldVersion < 17) {
// Delete the old data
Log.w(TAG, "Delete all old data");
db.execSQL("DROP TABLE IF EXISTS " + TRACKPOINTS_TABLE);
db.execSQL("DROP TABLE IF EXISTS " + TrackPointsColumns.TABLE_NAME);
db.execSQL("DROP TABLE IF EXISTS " + TracksColumns.TABLE_NAME);
db.execSQL("DROP TABLE IF EXISTS " + WAYPOINTS_TABLE);
db.execSQL("DROP TABLE IF EXISTS " + WaypointsColumns.TABLE_NAME);
onCreate(db);
} else {
// Incremental updates go here. For each DB version, add a corresponding if clause.
@@ -128,8 +86,8 @@ public class MyTracksProvider extends ContentProvider {
// Track points sensor column
if (oldVersion <= 17) {
Log.w(TAG, "Upgrade DB: Adding sensor column.");
db.execSQL(
"ALTER TABLE " + TRACKPOINTS_TABLE + " ADD " + TrackPointsColumns.SENSOR + " BLOB");
db.execSQL("ALTER TABLE " + TrackPointsColumns.TABLE_NAME + " ADD "
+ TrackPointsColumns.SENSOR + " BLOB");
}
// Tracks table id column
if (oldVersion <= 18) {
@@ -196,14 +154,14 @@ public class MyTracksProvider extends ContentProvider {
boolean shouldVacuum = false;
switch (urlMatcher.match(url)) {
case TRACKPOINTS:
table = TRACKPOINTS_TABLE;
table = TrackPointsColumns.TABLE_NAME;
break;
case TRACKS:
table = TracksColumns.TABLE_NAME;
shouldVacuum = true;
break;
case WAYPOINTS:
table = WAYPOINTS_TABLE;
table = WaypointsColumns.TABLE_NAME;
break;
default:
throw new IllegalArgumentException("Unknown URL " + url);
@@ -311,7 +269,7 @@ public class MyTracksProvider extends ContentProvider {
throw new IllegalArgumentException(
"Latitude, longitude, and time values are required.");
}
long rowId = db.insert(TRACKPOINTS_TABLE, TrackPointsColumns._ID, values);
long rowId = db.insert(TrackPointsColumns.TABLE_NAME, TrackPointsColumns._ID, values);
if (rowId >= 0) {
Uri uri = ContentUris.appendId(
TrackPointsColumns.CONTENT_URI.buildUpon(), rowId).build();
@@ -339,7 +297,7 @@ public class MyTracksProvider extends ContentProvider {
}
private Uri insertWaypoint(Uri url, ContentValues values) {
long rowId = db.insert(WAYPOINTS_TABLE, WaypointsColumns._ID, values);
long rowId = db.insert(WaypointsColumns.TABLE_NAME, WaypointsColumns._ID, values);
if (rowId > 0) {
Uri uri = ContentUris.appendId(
WaypointsColumns.CONTENT_URI.buildUpon(), rowId).build();
@@ -360,14 +318,14 @@ public class MyTracksProvider extends ContentProvider {
int match = urlMatcher.match(url);
String sortOrder = null;
if (match == TRACKPOINTS) {
qb.setTables(TRACKPOINTS_TABLE);
qb.setTables(TrackPointsColumns.TABLE_NAME);
if (sort != null) {
sortOrder = sort;
} else {
sortOrder = TrackPointsColumns.DEFAULT_SORT_ORDER;
}
} else if (match == TRACKPOINTS_ID) {
qb.setTables(TRACKPOINTS_TABLE);
qb.setTables(TrackPointsColumns.TABLE_NAME);
qb.appendWhere("_id=" + url.getPathSegments().get(1));
} else if (match == TRACKS) {
qb.setTables(TracksColumns.TABLE_NAME);
@@ -380,14 +338,14 @@ public class MyTracksProvider extends ContentProvider {
qb.setTables(TracksColumns.TABLE_NAME);
qb.appendWhere("_id=" + url.getPathSegments().get(1));
} else if (match == WAYPOINTS) {
qb.setTables(WAYPOINTS_TABLE);
qb.setTables(WaypointsColumns.TABLE_NAME);
if (sort != null) {
sortOrder = sort;
} else {
sortOrder = WaypointsColumns.DEFAULT_SORT_ORDER;
}
} else if (match == WAYPOINTS_ID) {
qb.setTables(WAYPOINTS_TABLE);
qb.setTables(WaypointsColumns.TABLE_NAME);
qb.appendWhere("_id=" + url.getPathSegments().get(1));
} else {
throw new IllegalArgumentException("Unknown URL " + url);
@@ -410,10 +368,10 @@ public class MyTracksProvider extends ContentProvider {
int count;
int match = urlMatcher.match(url);
if (match == TRACKPOINTS) {
count = db.update(TRACKPOINTS_TABLE, values, where, selectionArgs);
count = db.update(TrackPointsColumns.TABLE_NAME, values, where, selectionArgs);
} else if (match == TRACKPOINTS_ID) {
String segment = url.getPathSegments().get(1);
count = db.update(TRACKPOINTS_TABLE, values, "_id=" + segment
count = db.update(TrackPointsColumns.TABLE_NAME, values, "_id=" + segment
+ (!TextUtils.isEmpty(where)
? " AND (" + where + ')'
: ""),
@@ -428,10 +386,10 @@ public class MyTracksProvider extends ContentProvider {
: ""),
selectionArgs);
} else if (match == WAYPOINTS) {
count = db.update(WAYPOINTS_TABLE, values, where, selectionArgs);
count = db.update(WaypointsColumns.TABLE_NAME, values, where, selectionArgs);
} else if (match == WAYPOINTS_ID) {
String segment = url.getPathSegments().get(1);
count = db.update(WAYPOINTS_TABLE, values, "_id=" + segment
count = db.update(WaypointsColumns.TABLE_NAME, values, "_id=" + segment
+ (!TextUtils.isEmpty(where)
? " AND (" + where + ')'
: ""),
@@ -1,57 +0,0 @@
/*
* Copyright 2010 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
*/
package com.google.android.apps.mytracks.io.backup;
import static com.google.android.apps.mytracks.content.ContentTypeIds.BLOB_TYPE_ID;
import static com.google.android.apps.mytracks.content.ContentTypeIds.FLOAT_TYPE_ID;
import static com.google.android.apps.mytracks.content.ContentTypeIds.INT_TYPE_ID;
import static com.google.android.apps.mytracks.content.ContentTypeIds.LONG_TYPE_ID;
import static com.google.android.apps.mytracks.content.ContentTypeIds.STRING_TYPE_ID;
import com.google.android.apps.mytracks.content.TrackPointsColumns;
import com.google.android.apps.mytracks.content.WaypointsColumns;
public class BackupColumns {
/** Columns that go into the backup. */
public static final String[] POINTS_BACKUP_COLUMNS =
{ TrackPointsColumns._ID, TrackPointsColumns.TRACKID, TrackPointsColumns.LATITUDE,
TrackPointsColumns.LONGITUDE, TrackPointsColumns.ALTITUDE, TrackPointsColumns.BEARING,
TrackPointsColumns.TIME, TrackPointsColumns.ACCURACY, TrackPointsColumns.SPEED,
TrackPointsColumns.SENSOR };
public static final byte[] POINTS_BACKUP_COLUMN_TYPES =
{ LONG_TYPE_ID, LONG_TYPE_ID, INT_TYPE_ID, INT_TYPE_ID, FLOAT_TYPE_ID,
FLOAT_TYPE_ID, LONG_TYPE_ID, FLOAT_TYPE_ID, FLOAT_TYPE_ID, BLOB_TYPE_ID };
public static final String[] WAYPOINTS_BACKUP_COLUMNS = {
WaypointsColumns._ID, WaypointsColumns.TRACKID, WaypointsColumns.NAME,
WaypointsColumns.DESCRIPTION, WaypointsColumns.CATEGORY, WaypointsColumns.ICON,
WaypointsColumns.TYPE, WaypointsColumns.LENGTH, WaypointsColumns.DURATION,
WaypointsColumns.STARTTIME, WaypointsColumns.STARTID, WaypointsColumns.STOPID,
WaypointsColumns.LATITUDE, WaypointsColumns.LONGITUDE, WaypointsColumns.ALTITUDE,
WaypointsColumns.BEARING, WaypointsColumns.TIME, WaypointsColumns.ACCURACY,
WaypointsColumns.SPEED, WaypointsColumns.TOTALDISTANCE, WaypointsColumns.TOTALTIME,
WaypointsColumns.MOVINGTIME, WaypointsColumns.AVGSPEED, WaypointsColumns.AVGMOVINGSPEED,
WaypointsColumns.MAXSPEED, WaypointsColumns.MINELEVATION, WaypointsColumns.MAXELEVATION,
WaypointsColumns.ELEVATIONGAIN, WaypointsColumns.MINGRADE, WaypointsColumns.MAXGRADE };
public static final byte[] WAYPOINTS_BACKUP_COLUMN_TYPES = {
LONG_TYPE_ID, LONG_TYPE_ID, STRING_TYPE_ID, STRING_TYPE_ID,
STRING_TYPE_ID, STRING_TYPE_ID, INT_TYPE_ID, FLOAT_TYPE_ID, LONG_TYPE_ID,
LONG_TYPE_ID, LONG_TYPE_ID, LONG_TYPE_ID, INT_TYPE_ID, INT_TYPE_ID,
FLOAT_TYPE_ID, FLOAT_TYPE_ID, LONG_TYPE_ID, FLOAT_TYPE_ID, FLOAT_TYPE_ID,
FLOAT_TYPE_ID, LONG_TYPE_ID, LONG_TYPE_ID, FLOAT_TYPE_ID, FLOAT_TYPE_ID,
FLOAT_TYPE_ID, FLOAT_TYPE_ID, FLOAT_TYPE_ID, FLOAT_TYPE_ID, FLOAT_TYPE_ID,
FLOAT_TYPE_ID };
}
@@ -156,12 +156,12 @@ class ExternalFileBackup {
TracksColumns.COLUMN_TYPES,
false);
DatabaseDumper waypointDumper = new DatabaseDumper(
BackupColumns.WAYPOINTS_BACKUP_COLUMNS,
BackupColumns.WAYPOINTS_BACKUP_COLUMN_TYPES,
WaypointsColumns.COLUMNS,
WaypointsColumns.COLUMN_TYPES,
false);
DatabaseDumper pointDumper = new DatabaseDumper(
BackupColumns.POINTS_BACKUP_COLUMNS,
BackupColumns.POINTS_BACKUP_COLUMN_TYPES,
TrackPointsColumns.COLUMNS,
TrackPointsColumns.COLUMN_TYPES,
false);
// Open the target for writing
@@ -628,10 +628,10 @@ public class TrackRecordingService extends Service {
lastValidLocation = null;
Waypoint waypoint = providerUtils.getFirstWaypoint(recordingTrackId);
if (waypoint != null && waypoint.getStatistics() != null) {
if (waypoint != null && waypoint.getTripStatistics() != null) {
currentWaypointId = waypoint.getId();
waypointStatsBuilder = new TripStatisticsBuilder(
waypoint.getStatistics());
waypoint.getTripStatistics());
} else {
// This should never happen, but we got to do something so life goes on:
waypointStatsBuilder = new TripStatisticsBuilder(stats.getStartTime());
@@ -1010,7 +1010,7 @@ public class TrackRecordingService extends Service {
name = getString(R.string.marker_split_name_format, nextMarkerNumber);
}
waypoint.setName(name);
waypoint.setStatistics(waypointStatsBuilder.getStatistics());
waypoint.setTripStatistics(waypointStatsBuilder.getStatistics());
waypoint.setDescription(descriptionGenerator.generateWaypointDescription(waypoint));
waypoint.setIcon(getString(R.string.marker_statistics_icon_url));

Some files were not shown because too many files have changed in this diff Show More