Compare commits

..

1269 Commits

Author SHA1 Message Date
Jimmy Shih 087b3b0e69 update manifest for version 1.1.15 2012-02-09 10:08:51 -08:00
Jimmy Shih 9d02d4ed67 Fix bug with invalidate auth token. Need to pass in account type, not
auth token type.
2012-02-08 19:51:41 -08:00
Jimmy Shih c4d5471c9b Added tag v1.1.14 for changeset 119d28cee019 2012-02-07 10:17:37 -08:00
Jimmy Shih a5645036ae update strings.xml 2012-02-07 10:16:49 -08:00
Jimmy Shih ec57495481 Update strings.xml in all the locales. 2012-02-06 10:47:40 -08:00
Jimmy Shih 79a86769ee fix eclipse warnings 2012-02-06 10:27:58 -08:00
Jimmy Shih 5f97aa4b99 merge heads 2012-02-06 10:19:43 -08:00
Jimmy Shih 102aabcc95 Fix comment for 490b8ae75c7a 2012-02-06 10:17:17 -08:00
Jimmy Shih cc28fdb65b merge heads 2012-02-06 10:12:13 -08:00
Jimmy Shih 9065992cd7 merge heads 2012-02-06 09:53:53 -08:00
Jimmy Shih cdf2cc8e81 Fix comment on 9984a731b84b 2012-02-06 09:51:41 -08:00
Jimmy Shih 6f5c1aec2c Merge from main. 2012-02-06 09:44:01 -08:00
Rodrigo Damazio ad8a9d2099 Merging heads 2012-02-06 10:38:38 -02:00
Rodrigo Damazio 00540bcfcc Addressing review comments for the search functionality. 2012-02-06 10:37:26 -02:00
ml1050 fc12c1f29e fix comments for da7d78b18f25 2012-02-06 13:22:50 +01:00
jshih 45dc512f01 Set waypoint icon based on the waypoint type.
Only consider valid waypoints. E.g., the first waypoint of a track
contains stats for the whole track, thus should not show up on the
search result.
2012-02-03 21:24:12 -08:00
Jimmy Shih 0691875f06 merge heads 2012-02-03 17:17:12 -08:00
Jimmy Shih c320d16af4 Move checking for service permission at AccountChooserActivity. 2012-02-03 16:41:06 -08:00
ml1050 d105c58309 Use a reference count with SensorManagers created by SensorManagerFactory 2012-02-04 00:47:55 +01:00
Jimmy Shih 55fd48d2dd When an activity starts, prompts the user (if necessary) for permission
to access the service.
2012-02-03 12:55:52 -08:00
youtaol 8c65aeec88 Add test case for ChartSettingsDialog 2012-02-03 20:34:53 +08:00
youtaol 7749c2600a Add test case for BootReceiver. 2012-02-03 20:26:44 +08:00
youtaol 79b3a71d15 Change the way to format setting string. 2012-02-03 20:20:24 +08:00
youtaol c4bddfd6f4 Make changes in DynamicSpeedTrackPathDescriptor :
Add field: CriticalDifference
Add helper method isDifferenceSignificant to test needsRedraw
Add getSpeedMargin,setAverageMovingSpeed getAverageMovingSpeed methods
Change some code style of DynamicSpeedTrackPathDescriptor

Add test cases for FixedSpeedTrackPathDescriptor and DynamicSpeedTrackPathDescriptor
2012-02-03 20:13:29 +08:00
ml1050 073c8a3c98 avoid null pointer exception in a race condition 2012-02-02 23:53:26 +01:00
Jimmy Shih b653e8d059 Fix elevation chart not showing distance correctly.
Use TripStatisticsBuilder to keep track of distance.
Also include the first and the last elevation.
2012-02-02 14:07:02 -08:00
Rodrigo Damazio 71bb550b1f Showing a message when no search results are found. 2012-02-02 03:04:21 -02:00
Rodrigo Damazio 19f1853426 Improving the search results UI. 2012-02-02 02:29:12 -02:00
Jimmy Shih 3b5fba9b52 merge heads 2012-02-01 17:55:01 -08:00
Jimmy Shih 89c9ad0612 Let the SettingsActivity display the confirmation dialogs.
Thus can handle screen rotation.

Rename EulaUtil.java to EulaUtils.java.
2012-02-01 17:35:40 -08:00
Jimmy Shih e4a62b4db8 merge heads 2012-02-01 13:44:50 -08:00
Jimmy Shih 1b3eaeb755 fix comment for af2bc2c67bd2 2012-02-01 13:42:51 -08:00
Jimmy Shih b4573fdc23 In TripStatistics, return 0 for average speed and moving speed
when the denominator is zero.

Use "1000.0" when getting a double by dividing by 1000.
2012-02-01 12:57:04 -08:00
Jimmy Shih 2acfef5d33 Fix the copyright year in the terms of service page. 2012-02-01 10:39:57 -08:00
Jimmy Shih 40d611b2f4 Add WRITE_EXTERNAL_STORAGE permission to the AndroidManifest. 2012-02-01 10:07:29 -08:00
ml1050 ae24966c42 added a VisibleForTesting comment 2012-01-31 20:36:56 +01:00
Jimmy Shih 342b214fd5 sync from main 2012-01-30 14:39:05 -08:00
Jimmy Shih 8c74fa74c1 Prepare release 1.1.14.
Update AndroidManifest
Update strings.xml in other locales
2012-01-30 14:35:38 -08:00
Jimmy Shih 4c552b4e24 clean up strings.xml
- sort alphabetically
- remove trailing whitespaces
2012-01-30 14:16:29 -08:00
Jimmy Shih 089cb06680 Move common Send to Google code into abstract classes.
Remove jshih@google.com in the @author field.
2012-01-30 13:28:00 -08:00
Jimmy Shih f20911ee2e sync from main 2012-01-30 10:16:16 -08:00
Jimmy Shih 041544573f Should have been part of 15e132de0291 2012-01-30 10:15:18 -08:00
Jimmy Shih 29615a3f0d merge heads 2012-01-30 09:59:09 -08:00
ml1050 256a6c6ee7 fix comments for 201f8f6de473 2012-01-30 13:41:54 +01:00
Jimmy Shih 62c40575c9 Clean up Send to Google code.
Remove SendActivity and SendType.
Pass SendRequest from one activity to the next.
2012-01-29 16:47:36 -08:00
Jimmy Shih acf2a4bee2 sync from main 2012-01-28 16:16:44 -08:00
Jimmy Shih 6bb87e1db9 merge heads 2012-01-28 16:13:12 -08:00
Jimmy Shih 5f99083747 Fix comments for 4a7e14e5837e 2012-01-28 16:03:40 -08:00
Rodrigo Damazio 22e9687aff Merge to head 2012-01-28 00:00:48 -02:00
Jimmy Shih aaceb86ba9 Organize files for Send to Google
move gdata files to
io/gdata
io/gdata/docs
io/gdata/maps

move fusion table code to
io/fusiontables
2012-01-27 16:50:33 -08:00
Jimmy Shih da013e9d51 Clean up ApiAdapter now that we only support API 7 or greater.
- rename ApiLevelAdapter to ApiAdapter
- rename ApiFeatures to ApiAdapterFactory
2012-01-27 15:51:43 -08:00
Jimmy Shih 8aa06c7128 merge heads 2012-01-27 12:39:09 -08:00
Jimmy Shih 1b27ff0d95 Fix comment for 4560c4d93a5b. 2012-01-27 12:37:35 -08:00
Jimmy Shih 9c54cc0e86 Fix unit test breakage in TrackWriterTest. 2012-01-26 16:27:14 -08:00
Jimmy Shih ffee51cee8 Use an Async Task to send a track to Google Maps. 2012-01-26 13:20:48 -08:00
ml1050 859248acde SensorEventCounterTest added; AntDirectSensorManagerTest udpated 2012-01-26 12:46:27 +01:00
Rodrigo Damazio 11972297b0 Merge to head 2012-01-25 21:01:57 -02:00
Rodrigo Damazio 8c17c6b2d9 Fixing some search issues caught by the tests:
- if the results contained a track and a waypoint with the same ID, one would be missing from results
- disregarding very old timestamps
- Moved lowercasing of the query inside the search engine
2012-01-25 20:43:54 -02:00
Rodrigo Damazio 2ac6d5d07b Adding tests for the search functionality. 2012-01-25 20:42:49 -02:00
Jimmy Shih 87c2a8fd3e Fixed comments for 68f1788b686b.
Also fixed:
- In ChooseMapActivity and SendFusionTablesActivity, check that the intent
inputs are valid.
- In ChooseMapAsyncTask, close the GDataParser in the finally block.
- In SendFusionTablesAsyncTask, check that a segment has more than 2
  points and that the segment stop time is set in prepareTrackSegment.
2012-01-25 13:20:45 -08:00
Jimmy Shih 2a5f3e6afd sync from main 2012-01-25 11:22:50 -08:00
Jimmy Shih 8472dbb195 Fix comments on aa970ad1da92.
Additional fixes:
- In SendDocsAsyncTask, check that the activity is not null before
using it.
- In SendDocsUtils, close the GDataParser in the finally block.
- When catching an exception, always log it.
2012-01-25 10:41:38 -08:00
Jimmy Shih 15ff1998cb Update the code to choose a Google Map by using
an AsyncTask to perform the network request.
2012-01-24 18:24:04 -08:00
Jimmy Shih f682f347d5 Update Send to Google Docs code to use an activity
to show progress bar and an AysncTask to send
to Google Docs.

Future plan:
Plan to place common code across SendDocs, SendFusionTables,
and SendMaps in abstract classes.
2012-01-24 10:13:04 -08:00
ml1050 625d0704bc s/SensorDataProcessor/SensorEventCounter/ 2012-01-23 23:27:20 +01:00
ml1050 faa4ddd98f member functions moved around 2012-01-23 23:12:04 +01:00
ml1050 e5885da82c explicit cap introduced for the history + displayedValue and getValue renamed 2012-01-23 23:03:27 +01:00
ml1050 efa2f3f1d5 more comments and cleanups. outdated tests are commented out temporarily 2012-01-22 22:49:12 +01:00
ml1050 b0afea35ee added more comments + minor refactoring 2012-01-21 21:35:58 +01:00
Jimmy Shih 9207600130 Merge heads 2012-01-20 15:31:06 -08:00
Jimmy Shih 81a9483f76 Fix comment forfd49d88ec658. 2012-01-20 15:03:21 -08:00
Jimmy Shih 3cf1bebe07 Fix comments for fd49d88ec658.
Also fixed the following:
in uploadAllTrackPoints, introduce a "readCount" variable
rather than using the zero based index "i".

in prepareAndUploadPoints, add a lastBatch parameter
so can include the (Part 1) marker if there is more than
one segment.

in prepareTrackSegment, set a new segment's stop time
to the last location's time.
2012-01-20 12:51:48 -08:00
ml1050 bee9f46eaf inner classes moved to their own files 2012-01-20 18:06:30 +01:00
ml1050 8afc6b4c04 cosmetic cleanups
renames for better legibility
added some bound checks
2012-01-20 13:53:30 +01:00
Jimmy Shih 152b77b01c Update the support url.
Update the minSdkVersion to 7.
2012-01-19 12:26:08 -08:00
Jimmy Shih 822d1c3eb9 Sync from main. https://mytracks.googlecode.com/hg 2012-01-19 10:51:07 -08:00
Jimmy Shih aa7fb772a0 Fix comments on 5f0afb81a4d6
Remove SendResult.java. Should have been part of this CL.
Fix a bug. Should be UploadResultActivity.FUSION_TABLES_URL.
2012-01-19 09:41:43 -08:00
youtaol 6ccff0697f Add test case for AntPreference, and add a static constant in AntPreference
----------------
2012-01-19 12:31:16 +08:00
Jimmy Shih e23c2bcfb2 Fix comments on 5f0afb81a4d6 2012-01-18 17:16:57 -08:00
Jimmy Shih 1ef6026134 Use an activity for showing the progress dialog
to send to Google Fusion Tables.
Use an AsyncTask to send a track to Google Fusion Tables.

Fix bugs with retry logic, screen rotation, sending
results back to SendActivity.
2012-01-18 16:35:43 -08:00
ml1050 93d702990a ANT+ cadence and cadence+speed sensor support added 2012-01-18 13:03:28 +01:00
Jimmy Shih d3216b0520 Add a UploadResultActivity to better support
screen rotation.
2012-01-13 13:09:56 -08:00
Jimmy Shih feac34ca32 Fix comment for 72858c5628e1 2012-01-13 09:42:51 -08:00
Jimmy Shih 4a0a2a8856 Create an AccountChooserActivity to choose an account.
Benefits of the refactor:
- can support screen rotation when choosing an account
- reduce complexity in SendActivity

Also change the minSdkVersion to 7 so that
- in AccountChooserActivity, can just use the Android AccountManager
- in SendActivity, can use Account
- in SendActivity, can remove the Constants.GET_LOGIN callback
  from the legacy AuthManager (AuthManagerOld)
2012-01-12 12:54:42 -08:00
Jimmy Shih 8f72c36351 When screen rotates, another activity is shown on the foreground.
Thus onPause, need to remove the dialog to prevent the activity
from leaking the dialog window.
2012-01-11 11:23:22 -08:00
Jimmy Shih dc019cd58d Fix comments for c2b1dec90642 2012-01-11 10:06:55 -08:00
Jimmy Shih 9feb097d11 Create a ServicePickerActivity to allow users
to pick the Google services to send a track to.

Benefits of the refactor:
- ServicePickerActivity can easily handle screen rotation
- Reduce complexity in SendActivity
2012-01-10 15:16:24 -08:00
Rodrigo Damazio dad0befca4 Addressed review suggestions and moved lat/long logic to the TripStatistics class. 2012-01-10 16:27:41 -02:00
Jimmy Shih c013db29bc Fix a typo for b287683b8500 2012-01-10 09:36:53 -08:00
Jimmy Shih 4b33e94707 Fix comment b287683b8500 2012-01-09 15:54:19 -08:00
Jimmy Shih 362dcda90c Fix comment for b287683b8500 2012-01-09 14:28:11 -08:00
Jimmy Shih 43cf0659fd Add support to choose the ISO 8601 date format as the default track name.
Note using the "yyyy-MM-dd HH:mm" format so it is readable
for users. However, the colon, ":", is not a valid
FAT32 filename character. So when saving to the SD card,
the filename becomes "yyyy-MM-dd HH_mm".
2012-01-09 12:50:53 -08:00
Jimmy Shih 88c4e0e499 merge 2012-01-09 09:39:21 -08:00
Jimmy Shih aed9248b35 Fix comments for af72371db217 2012-01-06 16:06:12 -08:00
Jimmy Shih c03f2a9adb Change the marketing message to include Google+. 2012-01-06 14:52:22 -08:00
Jimmy Shih 9e6e4bc5af Code cleanup. Rename My Maps to Maps.
Did a case insentive search and replacement for
mymap
my_map
my map
2012-01-06 14:24:26 -08:00
Rodrigo Damazio 83af7a30d8 Addressing suggestion from cbbb34be8b54 2012-01-06 04:43:25 -02:00
Rodrigo Damazio 8000d51caf Adding search suggestions 2012-01-06 04:39:07 -02:00
Rodrigo Damazio 96d740db64 Adressing many TODOs and improving documentation of the search engine. 2012-01-06 04:38:54 -02:00
Rodrigo Damazio ff15031113 Breaking down SearchActivity into display and search logic pieces. 2012-01-06 03:25:51 -02:00
Jimmy Shih 4e9fa91f27 Code cleanup. Use Menu.NONE constant when we don't care about
the groupId or the order.
2012-01-05 18:39:20 -08:00
Rodrigo Damazio 870c5d723c Providing a Search menu option in TrackList and WaypointList, for devices that don't have a search key. 2012-01-05 22:17:31 -02:00
Rodrigo Damazio 254a1d59ac Selecting a waypoint from the search screen will now show it. 2012-01-05 21:47:32 -02:00
Rodrigo Damazio ce05f5b22a Android Lint: fixing invalid height inside a ScrollView. 2012-01-05 21:18:15 -02:00
Rodrigo Damazio b2eb50732e Android Lint: fixing invalid height inside a ScrollView. 2012-01-05 21:18:15 -02:00
Rodrigo Damazio 35395926ff Android Lint: customizing the warnings:
- typography warnings should be just informational (too many of them)
- unused IDs/resources make no sense for the library project
- layout errors should be errors
2012-01-05 21:12:00 -02:00
Rodrigo Damazio e77a685b50 Android Lint: customizing the warnings:
- typography warnings should be just informational (too many of them)
- unused IDs/resources make no sense for the library project
- layout errors should be errors
2012-01-05 21:12:00 -02:00
Rodrigo Damazio ee9a19d788 Android Lint: reordering manifest so requirements come before the application. 2012-01-05 21:02:07 -02:00
Rodrigo Damazio 5cb0752645 Merge to head 2012-01-05 22:23:56 -02:00
Jimmy Shih 26a41e0afc sync from main 2012-01-05 15:37:55 -08:00
Rodrigo Damazio d2ea6dfe8d Android Lint: reordering manifest so requirements come before the application. 2012-01-05 21:02:07 -02:00
Rodrigo Damazio 46b027108c Also updating mocked class libraries to API level 15 2012-01-05 20:35:45 -02:00
Rodrigo Damazio 9afd415e3f Also updating mocked class libraries to API level 15 2012-01-05 20:35:45 -02:00
Jimmy Shih bb989dbc4c Fix file sanitization so that it supports unicode characters.
Replace invalid characters with "_" to make it easier to parse.
2012-01-05 13:56:20 -08:00
Rodrigo Damazio 50095ad044 Fixing showing of waypoints 2012-01-05 19:42:06 -02:00
Jimmy Shih 23ca7bd05e merge heads 2012-01-04 17:17:41 -08:00
Jimmy Shih f38c4ab242 Display date and time based on phone's preferences.
In StringsUtils, add formatDateTime, formatTime, formatElapsedTime.

Note that verified when sending to Google Docs, no longer need
to always show the hours when displaying total time and moving time.
2012-01-04 16:39:53 -08:00
Jimmy Shih 966f661dce In the "Share with friends" menu options, split the
"Map or Fusion Table URL" option into
"Map" and "Fusion Table" options.

- make SendType implements Parcelable so can pass it in an Intent.
2012-01-04 13:44:20 -08:00
Jimmy Shih 8db6f5b569 Support long app name in the about page.
- change from a TableLayout to a LinearLayout
- use layout_gravity="center_vertical" to vertically align the icon.
2012-01-03 17:28:43 -08:00
Jimmy Shih c0aabcfa5a Fixe escaping from the translation console. Change ">" to ">" 2012-01-03 15:42:10 -08:00
Jimmy Shih 235fd16e5a Support multiple lines on Send to Google CheckBox and RadioButtons
- Center align the CheckBox to the ImageView
- Note that to support line wrapping inside a TableLayout, need to
set the layout_width to 0dp.
2012-01-03 14:47:54 -08:00
Rodrigo Damazio 5a3bcfa51a Adressing comments from f11312d2fdc6 2012-01-03 05:33:00 -02:00
Rodrigo Damazio c3912042e9 Merge to head 2012-01-02 19:03:07 -02:00
Rodrigo Damazio cfbb1b1634 Updating to API level 15.
Main justification: the SDK for level 15 comes with the source to the core libraries, making debugging much easier.
2012-01-02 18:53:44 -02:00
Jimmy Shih 40d0eed281 Fix issue 702.
Add meaureWithLargestChild on the Button linear layout.
Change dip to dp
Change text to sp.
2011-12-23 14:23:50 -08:00
Jimmy Shih 5e52552a0c Added tag v1.1.13 for changeset 431cbbc21684 2011-12-23 09:41:15 -08:00
Jimmy Shih 9a220fade9 Fix bug. String.isEmpty is only available in api 9 or higher. 2011-12-22 16:29:05 -08:00
Jimmy Shih b86c9b3867 Merge heads 2011-12-22 15:29:20 -08:00
Jimmy Shih d22deda242 Fix comment on 9399fc25c7ce. 2011-12-22 15:15:42 -08:00
Jimmy Shih 2167111ff4 Update translated strings. 2011-12-22 15:12:23 -08:00
Jimmy Shih 6028137c46 Fix comment on 9399fc25c7ce.
Also define the default values in "do_not_translate.xml" so that can be
consistent between the preferences.xml and the java files.
2011-12-22 11:20:16 -08:00
Jimmy Shih 22dafff7b7 Fix issue 679. 2011-12-21 18:27:11 -08:00
Jimmy Shih 339b045697 Fix crash in issue 680. 2011-12-21 17:57:41 -08:00
Jimmy Shih 28ce9a1656 Fix bluetooth crashes in issue 681. 2011-12-21 17:37:34 -08:00
Jimmy Shih 34c273be7a Update translations. 2011-12-21 16:41:22 -08:00
Jimmy Shih 0e645de733 Update Android Norwegian Bokmal from "no" to "nb". 2011-12-21 16:14:55 -08:00
Jimmy Shih 1281bb311a Change the chart right border to 40 pixels. 2011-12-21 15:45:42 -08:00
Jimmy Shih 5557144728 In the ChartSettingsDialog, update whether to display speed
or pace when calling onPrepareDialog.

Change the x_axis.png and y_axis.png to white foreground
so they show up on the black background.

Clean up chart_settings.xml
- no need to specify minWidth by placing the title
  inside a TableLayout
- align text to the bottom of the image
2011-12-21 15:23:51 -08:00
Jimmy Shih 828949efa4 On ChartView, show either the speed or the pace label depending on the
user preference.
On StatsActivity, draw the unit label.
2011-12-21 13:27:51 -08:00
Jimmy Shih b0980e2e90 Fix comment for a3a7ba31357b 2011-12-21 13:16:58 -08:00
Jimmy Shih a17fc3efd2 Fix the display unit (metric or imperial) on ChartView both on
first app launch and when changing the display unit.

In ChartActivity, set the default to true to match the default
in ChartView.

When display unit changes, on the UI thread, request a layout so the
axises can be redrawn.
2011-12-21 10:55:07 -08:00
Jimmy Shih 6a9f3d9199 Add a text for the Android Market recent changes. 2011-12-21 10:06:39 -08:00
Jimmy Shih ffd3f3f14b Fix a bug where the total distance is repeated twice. 2011-12-20 16:26:24 -08:00
Jimmy Shih 912075ddd4 Change the about page layout to single column to
support long translated strings in different languages.
2011-12-20 14:10:36 -08:00
Jimmy Shih 3833a9f7fe Add the terms of service copyright string to be translated. 2011-12-20 13:20:52 -08:00
Jimmy Shih 6dd40a6edf Shorten strings that need to fit within one line. 2011-12-20 13:16:25 -08:00
Jimmy Shih aa1a7a467f version 1.1.13 release candidate #1. 2011-12-20 12:20:59 -08:00
Jimmy Shih a89475158f Added tag v1.1.12 for changeset 4654df4b02d7 2011-12-16 19:05:33 -08:00
Jimmy Shih bd887c6624 merge heads 2011-12-16 16:16:08 -08:00
Jimmy Shih e8d4537f0d sync from main 2011-12-16 16:13:22 -08:00
Jimmy Shih aa392d61e2 merge heads 2011-12-16 16:12:50 -08:00
Jimmy Shih fa2948e4ab Update strings for v1.1.12 rc3. 2011-12-16 16:11:29 -08:00
Jimmy Shih 4ce0809948 merge heads 2011-12-16 15:04:32 -08:00
Jimmy Shih 7956e761c8 Fix comments for 7057f746f9af 2011-12-16 11:17:37 -08:00
Jimmy Shih 2dc92dcc98 Modify TOS placeholders so the
text matches those already translated.
2011-12-16 10:33:20 -08:00
Jimmy Shih c604c12297 Fix sensor state activity to support right-to-left.
- Need to generate the value as one string
  rather than always putting the unit on the
  right.
2011-12-15 18:00:03 -08:00
Jimmy Shih 3b249d6a06 Fix about page layout.
If not enough space, shrink column0.
If too much space, stretch column1.
Add 2dp padding around.
2011-12-15 15:02:14 -08:00
Jimmy Shih 1b0bdea135 Fix displaying "NONE".
Use the display string rather than the value string for storage.
2011-12-15 14:42:21 -08:00
Jimmy Shih 604ded53b8 Update translation comments.
- Clarify that Zephyr, Polar, SRM are company names and should not get
  translated.
- Clarify that Bluetooth and ANT+ are radio standards and can be
  translated if possible.
- Clarify that bridge is a network bridge.
2011-12-15 14:33:20 -08:00
Jimmy Shih d509890f8f Fix escaping. Change ">" to ">". 2011-12-15 11:57:00 -08:00
Jimmy Shih f973ab8ac2 Should have been part of dff6cccf7912 2011-12-15 11:41:58 -08:00
Jimmy Shih 67407d4bd6 Fix comment for dff6cccf7912 2011-12-15 11:29:57 -08:00
Jimmy Shih 36cbd4a96f Break TOS into paragraphs to match the existing strings in the
translation console. Thus we do not need to retranslate the
TOS.
2011-12-15 10:44:14 -08:00
Jimmy Shih 896dab6d2b Display date/time based on user format for
- TrackList.java
- WaypointsList.java
- StringUtils.generateWaypointDescription for sending waypoint description
to Google services.
2011-12-14 15:41:03 -08:00
Jimmy Shih 8103bf58d8 Fix marker display when the gps location time is 0.
If gps is not available, the waypoint marker time is 0.
So do not display the time if it is not available.
2011-12-14 14:53:20 -08:00
Jimmy Shih 58868dcd4f Update strings from translation. Strings are auto-extracted. 2011-12-14 11:25:39 -08:00
Jimmy Shih 762fc0d06e Clean up TrackDetails
- use MyTracksProviderUtils to update a track
- define TRACK_ID and SHOW_CANCEL in TrackDetails
- log error if track doesn't exit
- add a scrollview
- add padding
2011-12-13 15:52:59 -08:00
Jimmy Shih bf03a4c54b merge heads 2011-12-13 10:05:23 -08:00
Jimmy Shih eac6bdcbbd Update the terms of service to use Google's mobile
terms of service instead of the one for
Google's 20% project.

Update the key so that all users will need to accept
the terms of service again.
2011-12-12 17:57:57 -08:00
Jimmy Shih fe368bc87e As requested by translators, remove mentioning of 20% project
from the android market marketing material.
2011-12-12 15:20:07 -08:00
Jimmy Shih ff5999b383 merge heads 2011-12-12 13:18:23 -08:00
Jimmy Shih ebcfcf125c fix a minor typo 2011-12-12 12:25:29 -08:00
Jimmy Shih c5e996546b improve the wording for sharing only url settings 2011-12-12 12:12:16 -08:00
Jimmy Shih 9cd0d03298 Rename Goolge My Maps to Google Maps 2011-12-12 11:56:58 -08:00
Jimmy Shih 456fa03f8e merge heads 2011-12-09 13:53:16 -08:00
Jimmy Shih a7e706268d Fix issue 608. Set button height to fill_parent
so that buttons can have enough height for 2 lines
of text.
2011-12-08 13:36:07 -08:00
Jimmy Shih 794da145c6 Check in the first iteration of My Tracks translations
- update version name and version code in AndroidManifest.xml
- delete values-es-rES/strings.xml (locale not supported by translation)
- remove escaped html characters in values/strings.xml
- all strings.xml in other locales are auto-generated. We will not
  modify these files directly.
2011-12-07 16:00:35 -08:00
Jimmy Shih ca889ee04c When sharing a url with friends, do not show the send to Google Docs option. 2011-12-07 14:19:21 -08:00
Jimmy Shih ee4e2c5288 merge heads 2011-12-06 12:47:05 -08:00
Rodrigo Damazio 1bd6e53f04 Addressing review suggestions for fusion tables upload warning. 2011-12-06 17:49:08 -02:00
Rodrigo Damazio bcba6dfe5d Fixed fusion tables upload warning - previously, it assumed all queries would be table-creation queries. 2011-12-06 17:20:48 -02:00
Rodrigo Damazio ebe8cbc798 Merge to head 2011-12-06 16:34:48 -02:00
Jimmy Shih f54fe60ca5 sync from main 2011-11-22 10:20:08 -08:00
Jimmy Shih 39b782053a fix comment on c3ea1ef58fb3 2011-11-22 10:17:07 -08:00
Jimmy Shih 5f83cc7656 merge heads 2011-11-22 10:12:28 -08:00
Jimmy Shih 97229c258d merge heads 2011-11-22 10:00:54 -08:00
Jimmy Shih 97e8037a6a Sort styles.xml alphabetically. 2011-11-21 18:11:12 -08:00
Jimmy Shih a9400afd74 Fix comment on f255f3a519fe 2011-11-21 17:26:47 -08:00
Jimmy Shih 2e11a2bfe2 For getSharedPreferences, use Context.MODE_PRIVATE constant. 2011-11-21 17:19:22 -08:00
Jimmy Shih a59cc3a6a2 For shared preferences, use apply (asynchronous)
by calling ApiFeatures.getInstance().getApiAdapter().applyPreferenceChanges.

The only exception is using commit (synchronous) when resetting all settings.
2011-11-21 15:17:26 -08:00
Jimmy Shih 8c0593ad0a Fix broken unit test in SensorManagerFactoryTest 2011-11-21 14:22:02 -08:00
Jimmy Shih 3566645643 Should have been part of 3800ce76c94f 2011-11-21 13:56:39 -08:00
Jimmy Shih 127fb2d648 Fix comment on b32833d4588e
- use Activity.showDialog to display dialogs
to avoid memory leaks when just calling
dialog.show, and to support rotation.
2011-11-21 13:52:11 -08:00
Rodrigo Damazio bb3a14aac0 Initial version of track search. (still lots of TODOs, but works) 2011-11-20 22:50:59 -02:00
Jimmy Shih 2cc2722a0b Add a name for the My Tracks Importer
because when open a GPX file using
the Linda File Manager, three My Tracks
activities show up.

ImportActivity (My Tracks Importer)
MyTracks (My Tracks)
WaypointDetails (Marker details)
2011-11-20 14:15:01 -08:00
Jimmy Shih 366aa4b307 Add screenshots for
- permissions

remove trailing white spaces
fix a typo on welcome_share_friends_answer
2011-11-20 13:22:03 -08:00
Jimmy Shih a6a43ef948 Add screenshots for
- export
- import
- sd card
- generic strings
- gps
- marker
2011-11-20 12:47:09 -08:00
Jimmy Shih 2419d652c2 Add Screenshots for
- My Location
- My Maps List page
- Send to Google
2011-11-20 11:34:15 -08:00
Jimmy Shih c47a01d11d Add screenshots for
- statistics page
- sensor state page
- share track
- settings value
2011-11-20 10:40:34 -08:00
Jimmy Shih a6ec014e73 Add screenshots for
- track list
- track detail page
- track recording messages
2011-11-19 13:46:26 -08:00
Jimmy Shih b1569c4744 Add screenshots and character limits for
- settings
2011-11-19 12:54:09 -08:00
Jimmy Shih 4f85e09edc Add screenshots for
-eula dialog
-menu items
-preferred units dialog
-welcome page
2011-11-19 10:13:33 -08:00
Jimmy Shih 3e9dd156e0 Add screenshot for about page, chart setttings.
Add ScrollView for the about page.
Set minWidth=300dp for the chart settings dialog.
2011-11-18 18:16:41 -08:00
Jimmy Shih 832aa0c303 Remove unused status message when sending to Google. 2011-11-18 16:02:36 -08:00
Jimmy Shih cdc17a8bb4 fix comment on 136b36246dd9 2011-11-18 15:19:59 -08:00
Jimmy Shih caf59954da sync from main 2011-11-18 14:45:23 -08:00
Jimmy Shih 8b2f2b21cd fix comment for daebe51be6dc 2011-11-18 14:42:54 -08:00
Jimmy Shih 744455adef merge heads 2011-11-18 14:11:24 -08:00
Jimmy Shih 7d9e1cd83a merge heads 2011-11-18 14:08:34 -08:00
Jimmy Shih 08d9af31f8 merge heads 2011-11-18 13:51:39 -08:00
Jimmy Shih a4711379e3 merge heads 2011-11-18 13:50:10 -08:00
Jimmy Shih 8c4773a9bf Added tag v1.1.11 for changeset 0656fec62693 2011-11-18 13:15:45 -08:00
Jimmy Shih 3e3b48e0cf update AndroidManifest for version 1.1.11 2011-11-18 12:46:16 -08:00
Jimmy Shih 5aea1348f6 Localize dates. Use DateFormat.getDateInstance for
user visible dates.
2011-11-17 20:10:57 -08:00
Jimmy Shih ce64da7849 correct help content for sharing with friends 2011-11-17 16:42:18 -08:00
Jimmy Shih 74bc4a4515 Localize number formatting. Only use NumberFormat. Remove all
direct calls to DecimalFormat.
2011-11-17 16:39:55 -08:00
Jimmy Shih b723700d0b should have been part of daebe51be6dc 2011-11-17 15:18:17 -08:00
Jimmy Shih f6983bba4b Add support for singular/plural. 2011-11-17 14:31:37 -08:00
Jimmy Shih 0ea4f6f13a another iteration to improve the wordings for track color mode 2011-11-16 18:12:52 -08:00
Jimmy Shih 1c2d64ea0a sync from main 2011-11-16 17:55:56 -08:00
Jimmy Shih e28a9a7cd2 Improve the descriptions where we have placeholders.
To provide translators with more context.
2011-11-16 17:37:00 -08:00
Umran Abdulla a200043667 Fix for SRM ANT+ Bridge 2011-11-17 12:02:04 +11:00
Jimmy Shih e8cf0a3dd2 Add Android Market strings 2011-11-16 16:56:47 -08:00
Umran Abdulla 10ed2233ee Fix for SRM ANT+ Bridge 2011-11-17 11:50:40 +11:00
Jimmy Shih ffb7cafe1b place help content in strings.xml 2011-11-16 15:24:37 -08:00
Jimmy Shih 041550fa6b fix comments on 244a0542bf63 2011-11-16 09:55:53 -08:00
Jimmy Shih f066c7bdce fix comments on 110385d92826 2011-11-15 18:41:02 -08:00
Jimmy Shih f5eebb1b87 merge heads 2011-11-15 17:32:29 -08:00
Jimmy Shih 3731037e68 fix null pointer errors in AntSensorManager 2011-11-15 17:28:49 -08:00
Jimmy Shih ae28dc01fe merge heads 2011-11-15 16:43:45 -08:00
Jimmy Shih 65991ba512 merge heads 2011-11-15 16:42:33 -08:00
Jimmy Shih 55ac8995a9 add eula as a string 2011-11-15 10:23:02 -08:00
Jimmy Shih bdbc453fc0 translate My Tracks application name 2011-11-14 18:42:30 -08:00
Jimmy Shih fc9dafeccd Clean up SendDialog.java
mytracks_send_to_google.xml
- remove unused ids.
- rename id variables.
- set textSize to 18dip to fit "Google Fusion Tables".
- set margin in ScrollView because its height is 0dip
  and settings margins in its children have no effect.

SendDialog.java
- use ApiFeature.applyPreferenceChanges to commit preference changes.
- set myMapsGroup View to GONE when 'Google My Maps' is not checked.
- use Context.MODE_PRIVATE.
- onStop, call super.onStop first.
2011-11-14 18:12:44 -08:00
Rodrigo Damazio c3cda97692 Merged to head 2011-11-14 23:27:04 -02:00
Jimmy Shih 7cb3cdaa05 Fix track color mode text. 'Medium speed percentage' is too long.
Change to 'Medium percentage'.
2011-11-14 10:13:54 -08:00
Jimmy Shih a61d30f522 Fix comment for 7b701a836adf 2011-11-14 09:44:57 -08:00
Jimmy Shih 1bb4dac8b5 remove trailing white space 2011-11-13 18:16:10 -08:00
Umran Abdulla 999285fcbc Fix for the signed/unsigned ANT+ device-id bug 2011-11-14 12:29:11 +11:00
Jimmy Shih 16dd54299a One round of proofreading of strings.xml
- add period when appropriate
- remove capitalization (only capitalize first word)
- add a 'title' suffix to title strings
- for Dynamic thresholds, rename to 'Medium Speed Percentage'
  because the value is a percentage.
- tranlstate 'my_tracks_service_name' string.
2011-11-13 17:18:58 -08:00
Jimmy Shih cf7be09396 Clean up do_not_translate.xml
Merge urls.xml into do_not_translate.xml
Move my_tracks_serviec_name to strings.xml
2011-11-11 18:55:55 -08:00
Jimmy Shih 0365ac5043 - Clean up arrays_do_not_translate.xml
- rename variables and sort alphabetically

- remove arrays.xml in other locales that are no longer being used.
2011-11-11 18:04:14 -08:00
Jimmy Shih 89fb6f6bd8 Reducing the number of strings by removing strings specific to
a Google service.
2011-11-11 17:33:05 -08:00
Jimmy Shih 52eb7bffb6 Reduce strings by removing strings specific for a file type. 2011-11-11 16:03:08 -08:00
Jimmy Shih ed3e3c9c41 merge from main 2011-11-11 12:39:34 -08:00
Jimmy Shih 77b54ed03b merge from main 2011-11-11 12:34:01 -08:00
Jimmy Shih c815579cb9 merge from main 2011-11-11 12:31:07 -08:00
Jimmy Shih 60f34d89ba Fix unit test for ResultDialogFactoryTest
- change to the MyTracks activity because the SendActivity doesn't have a
  window to display the dialog.
2011-11-10 18:40:26 -08:00
Jimmy Shih 2dd37ff965 merge heads 2011-11-10 17:28:50 -08:00
Jimmy Shih 750d109c93 fix unit test due to AntSensorManager changes 2011-11-10 17:25:28 -08:00
Jimmy Shih 23b5f879ae merge heads 2011-11-10 16:51:10 -08:00
Jimmy Shih cc4d57bc0c merge heads 2011-11-10 16:26:30 -08:00
Jimmy Shih c573301b2d merge heads 2011-11-10 16:08:35 -08:00
Jimmy Shih f19482985d merge heads 2011-11-10 15:53:49 -08:00
Jimmy Shih 2062ee7dfc merge heads 2011-11-10 14:52:02 -08:00
Jimmy Shih f24494d877 fix unit test with changing buttons from BUTTON_NEUTRAL to BUTTON_NEGATIVE 2011-11-10 14:24:32 -08:00
Jimmy Shih 9f05d8d8d9 For all locales
- sort variables
- remove unused variables
- delete duplicate variables

For strings.xml - remove trailing white spaces
2011-11-10 14:02:28 -08:00
Jimmy Shih ad139438f9 Last changeset for renaming & reorganizing
- Export
- Generic Strings
- Import
- SD Card
- Share Track

Other fixes
- check spelling
- check spacing
- check order
- clean up section titles
2011-11-09 17:26:50 -08:00
Jimmy Shih 0118a7691f Rename and reorganize variables in strings.xml
- My Maps List
- Send to Google
2011-11-09 15:09:57 -08:00
Rimas Trumpa 7915202aaa Some string corrections + getDefaultCategory moved to TrackRecordingService. 2011-11-09 22:03:59 +00:00
Jimmy Shih 5492bf86d1 Rename and reorganize strings.xml variables for
- Chart Settings
- Sensor State
- Statistic Page
- Unit
2011-11-09 13:13:33 -08:00
Jimmy Shih 32e01c7861 rename and reorganize variables in strings.xml for
- settings backup
- settings sharing
- settings reset
2011-11-09 11:19:20 -08:00
Jimmy Shih 13728c7c09 fix comments for f5deb2130f09 2011-11-09 09:19:57 -08:00
Rimas Trumpa a76945deef Added autocomplete to 'Default Activity Type' field. 2011-11-09 03:17:26 +00:00
Jimmy Shih 08c01f2b4e rename and reorganize
- settings recording
- settings sensor
2011-11-08 18:50:22 -08:00
Jimmy Shih eaa6922a95 rename and reorganize variables for
- top level setttings page
- display setttings
2011-11-08 17:39:57 -08:00
Jimmy Shih b99fa2b997 Rename and reorganize variables in
- About
- EULA
- My Location
- Permission
- Preferred Units
- Voice
- Welcome
2011-11-08 16:37:48 -08:00
Jimmy Shih cf28a3378f Rename and reorganize track variables in strings.xml. 2011-11-08 15:59:28 -08:00
Jimmy Shih 63ba6ec37c - rename and sort marker related variables
- rename and sort gps related variables
- clean up unused strings in AndroidManifest.xml
2011-11-08 14:30:26 -08:00
Jimmy Shih f07856ecb7 fix comment on 480bd29719ab 2011-11-08 11:42:12 -08:00
Jimmy Shih 44e81383f9 fix comment for b7f41a55cc69 2011-11-08 10:45:36 -08:00
Jimmy Shih d5c0b9cd5c Rename and reorganize menu variables in strings.xml 2011-11-07 17:53:22 -08:00
Jimmy Shih 4b0b519261 Remove urls from strings.xml 2011-11-07 12:48:09 -08:00
Jimmy Shih fde0a4ade1 fix comments on 8ff13c62c55e 2011-11-07 09:45:23 -08:00
Jimmy Shih fbd7f1b2b0 merge heads 2011-11-07 09:39:08 -08:00
Jimmy Shih 32bc71ae0f merge heads 2011-11-07 09:27:10 -08:00
Rimas Trumpa 0cf39e94a2 Added 'Default Activity Type' function (Issue 519). 2011-11-07 15:02:40 +00:00
Jimmy Shih 6ccb32c837 Clean up. Have ImportActivity call ImportAllTracks 2011-11-05 16:27:46 -07:00
Jimmy Shih c63763982a fix comment b7f41a55cc69 2011-11-05 15:03:18 -07:00
Jimmy Shih c26e63dec3 merge heads 2011-11-05 12:08:14 -07:00
Jimmy Shih 014e5257d0 merge heads 2011-11-05 11:50:27 -07:00
Jimmy Shih 1911187450 fix comment on 90eb53c0b4bd 2011-11-05 11:44:19 -07:00
Jimmy Shih 827e94b721 merge heads 2011-11-04 15:22:15 -07:00
Jimmy Shih fe9e6d47a2 fix comment on 78a330b32e6f 2011-11-04 15:04:15 -07:00
Jimmy Shih fe8cd0b884 merge heads 2011-11-04 14:30:35 -07:00
Jimmy Shih 496e0c0862 fix comment on 9f9c8f7cfb29 2011-11-04 14:16:01 -07:00
Jimmy Shih f2c3673406 merge heads 2011-11-04 14:11:47 -07:00
Jimmy Shih 8dd2ebd245 merge heads 2011-11-04 13:52:32 -07:00
Jimmy Shih cc06c469ee fix comment on 87a508c1fb9b 2011-11-04 13:50:25 -07:00
Jimmy Shih 96d8397787 fix typo on 4dcde424d9a9 2011-11-03 18:40:56 -07:00
Jimmy Shih 20346091c3 fix a typo in 4dcde424d9a9 2011-11-03 18:32:48 -07:00
Jimmy Shih 776f9bf360 Modify the check units flow so that it asks the user to pick either
metric or imperial. Metric is the default. Thus no longer need to
send the user to the 'Display' settings page.
2011-11-03 18:29:30 -07:00
Jimmy Shih d09218ca97 Fix the temp directory used by TempFileCleaner.
Previously, it missed 'MyTracks' in the directory path.
2011-11-03 14:21:30 -07:00
Jimmy Shih c4e8375ef6 merge heads 2011-11-02 11:39:14 -07:00
Jimmy Shih 4e288e4b85 - remove arrays.xml
- clean up keys.xml
- clean up do_not_translate.xml
2011-11-01 11:34:33 -07:00
Umran Abdulla 324d3f6ef1 Fix for ANT+ Sensor Manager Events Order Issue 2011-11-01 16:04:46 +11:00
Jimmy Shih e640d4280a add translation description 2011-10-31 13:59:58 -07:00
Jimmy Shih 3951f08531 should be been part of 78a330b32e6f 2011-10-31 11:21:34 -07:00
Jimmy Shih 684546f080 add translation descriptionws 2011-10-31 11:18:55 -07:00
Jimmy Shih 507ab6723c merge heads 2011-10-31 09:41:15 -07:00
Jimmy Shih 0f4483e2f8 add translation_description 2011-10-28 18:44:09 -07:00
Jimmy Shih de9c3c94de add translation descriptions for settings options 2011-10-28 16:23:45 -07:00
Jimmy Shih 730048c70b fix comments for e50bc8498bb2 2011-10-28 13:15:58 -07:00
Jimmy Shih 1637d2202c merge heads 2011-10-28 13:01:29 -07:00
Jimmy Shih c0a6850eff merge heads 2011-10-28 12:50:24 -07:00
Jimmy Shih 8f642ad112 fix a typo on a4dd967c8b26 2011-10-28 12:48:30 -07:00
Jimmy Shih 0b879eb5a0 fix comments for a4dd967c8b26 2011-10-28 12:43:36 -07:00
Jimmy Shih c1d4dd92cd Fix eclipse warnings 2011-10-28 11:14:26 -07:00
Jimmy Shih 4741e674c4 merge heads 2011-10-28 09:52:24 -07:00
Jimmy Shih d3ad49c4e1 merge heads 2011-10-27 18:59:10 -07:00
Jimmy Shih 3487da83ab slight wording changes on 8659ae7e6208 2011-10-27 18:53:53 -07:00
Jimmy Shih 3bc96bf319 merge heads 2011-10-27 18:47:05 -07:00
Jimmy Shih 3e22941484 fix comments on 425100d373ad 2011-10-27 18:35:25 -07:00
Jimmy Shih b6dcbb1377 merge heads 2011-10-27 18:13:04 -07:00
Jimmy Shih f6d99ba106 fix comment on 24401e81915f 2011-10-27 17:59:15 -07:00
Jimmy Shih 2bacc8d7b8 add translation_description 2011-10-27 13:21:14 -07:00
Jimmy Shih dfc5d61514 More translation_descriptions. 2011-10-26 18:04:49 -07:00
Jimmy Shih b2d989887d Add translation_description for status messages. 2011-10-26 16:00:49 -07:00
Jimmy Shih 0c72f1e5d3 add translation_descriptions for error messages 2011-10-26 14:19:14 -07:00
Jimmy Shih 58ce6d8a2c Add translation context for Sensor Options and Track Color Mode.
Convention:
Use "option" to indicate a display string like "sensor_type_option_ant".
Use "value" to indicate a stored value like "sensor_type_value_ant".

Additional proposals not in this changeset:
- rename "Sensor Options" to "Sensor"?
- rename "Track Color Mode" to "Track color"?
2011-10-26 10:41:33 -07:00
Jimmy Shih e7c0f3b5d0 Removing track_color_mode_none.
The default value for track_color_mode_options is
@string/none, not @string/track_color_mode_none.
See preferences.xml
2011-10-25 17:11:34 -07:00
Jimmy Shih c799f8d716 fix comments for 22e45d5be68c 2011-10-25 16:55:05 -07:00
Jimmy Shih fb036bfe4c Fix unit test errors in DocsHelper_AddTrackRowTest.java
DocsHelper_AddTrackRowTest is using a MockContext, which
cannot be used to call DateFormat.getDateFormat(context).

Refactor a getDisplayDate method in DocsHelper and allow the
test to override the method.

Also update .hgignore to AnnotationProcessor.log.
2011-10-25 15:02:03 -07:00
Jimmy Shih acfd522b57 Fix unit test failures:
Based on instruction from
http://android-mock.googlecode.com/files/AndroidMockinEclipse.pdf
- reference AndroidMockGenerator instead of AndroidMockRuntime
- name file as AnnotationProcessor.log
- in .factoryPath, upgrade to android-14
- in .factoryPath, add MyTracksLib jar

Verified that AnnotationProcessor.log contains no error.

Based on ADT14 changes:
http://code.google.com/p/android-mock/issues/detail?id=17#c0
change bin_dir location from "bin" to "bin/classes"
2011-10-25 14:26:07 -07:00
Jimmy Shih f16f7b08c8 merge heads 2011-10-25 11:50:06 -07:00
Jimmy Shih b06201d079 merge heads 2011-10-25 10:15:04 -07:00
Jimmy Shih 17ba5e6a48 Fix project dependencies.
- MyTrack app should export google-common.jar, common-logging-1.1.1.jar,
  protobuf-java-2.3.0-lite.jar and the MyTracksLib library.
- A test should only depend on its app. E.g., it should not need to
  reference the MyTracksLib library again.
2011-10-24 18:33:33 -07:00
hardillb b488ee5235 Added a comment to the track_id_broadcast_extra to note it should be deprecated and renamed in the next API refector 2011-10-24 23:00:35 +01:00
Jimmy Shih a012943119 - When there are two buttons, place the positive button on the left
and the negative button on the right to match the alert dialog.
- If an alert dialog only needs one button, assign it as the PostiveButton.
- If an alert dialog needs two buttons, assign one Positive and another
Negative.
- for CheckUnits, change the message to
  "Do you want to use metrics as your default units?" so that
  "yes" corresponds to the default case of using metrics as
  the default units.
2011-10-24 14:30:33 -07:00
hardillb 2afcd38bc5 Reuse track_id_broadcast_extra in MyTracksLib third_party.xml rather than add a new constant with the same value. 2011-10-24 10:32:35 +01:00
Jimmy Shih ef86905c58 Fix comment for 483b954b8878 2011-10-21 17:57:38 -07:00
Jimmy Shih 66f41ca1ae merge heads 2011-10-21 16:16:01 -07:00
Rodrigo Damazio 44f53dabed Merge heads 2011-10-21 20:26:43 -02:00
Jimmy Shih 2eee3c1c3e merge heads 2011-10-21 15:23:13 -07:00
Rodrigo Damazio ac652cbbd7 Also adding proper code formatting properties to signal strength projects. 2011-10-21 20:19:51 -02:00
Rodrigo Damazio de4a7be6a5 Fixing line length in project properties. 2011-10-21 20:07:36 -02:00
Jimmy Shih 5a3a2231c0 Fix classpath dependency on MyTracksLib
Move other projects to Android 4.0.
2011-10-21 14:19:46 -07:00
Jimmy Shih 8326d37806 merge heads 2011-10-21 13:50:19 -07:00
hardillb eb0ecadf31 Removed extra line added by accident 2011-10-21 19:45:16 +01:00
Jimmy Shih 661815ea1f Merge heads 2011-10-21 09:49:38 -07:00
Jimmy Shih e4f1ca83f9 merge heads 2011-10-20 18:07:10 -07:00
Jimmy Shih da2b9cb132 merge heads 2011-10-20 18:05:58 -07:00
Jimmy Shih 547e5a26ee Fix comment on 22e45d5be68c 2011-10-20 17:22:03 -07:00
Jimmy Shih 1068b64b74 Imrpove the layout style for all the Buttons on the bottom of a screen. 2011-10-20 17:13:39 -07:00
Jimmy Shih d8f6ed196e Add translation_description to prepare for translation.
Clean up menu items.
- change "Record track" to "Record Track"
- change "Stop recording" to "Stop Recording"
- remove "Delete all tracks", "Please select the track to view",
  "Current track", and "Last segment".
- move "Elevation" to the stat label section.
2011-10-20 15:56:45 -07:00
Rodrigo Damazio 9ebea2b040 Updating the My Tracks target to ICS (Android 4.0). 2011-10-20 20:52:28 -02:00
Rodrigo Damazio 0c41c36c0d Updating project to build with latest version of the ADT plugin and Android SDK.
The new version seems a bit quirky, if it has build problems try initially building one project at a time in the right order.
2011-10-20 20:50:16 -02:00
Rodrigo Damazio 1b1f3e3d8b Merging to head. 2011-10-20 20:03:43 -02:00
Rodrigo Damazio fe33982df7 Backing out unpushed ef8239961ed3 to merge with newest TrackDataHub. 2011-10-20 20:03:18 -02:00
Jimmy Shih 53804b6c80 Merge heads. 2011-10-20 09:52:46 -07:00
Jimmy Shih 5ce068b6fa Fix comments on 41a785ab72d4. 2011-10-19 17:23:05 -07:00
Jimmy Shih 9b97570a92 - Fix proguard issue with ANT+ services.
- Fix AntSensorManager.onDestroy, check antReceiver is not null.
- In AntSensorManager.onDestroy, log info rather than log error
  for AntServiceNotConnectedException.
2011-10-18 13:18:02 -07:00
Ase 352b844954 Corrected and added all spanish translations 2011-10-18 10:19:42 +02:00
hardillb 49fff1d17e Added an extra to carry the Track ID when files shared 2011-10-16 16:47:18 +01:00
Jimmy Shih d19f647d99 Move
- ApiFeatures.isAudioFocusSupported
- ApiFeatures.hasBackup
- ApiFeatures.useNetHttpTransport
into the appropriate ApiLevelAdapter.

Do not plan to move
- ApiFeatures.hasBluetoothDeviceCreateInsecureRfcommSocketToServiceRecord
- ApiFeatures.canReuseSQLiteQueryBuilder
- ApiFeatures.hasTextToSpeech
2011-10-14 16:09:09 -07:00
Jimmy Shih c5deb1d3b7 Fix comment on b786fecb39b0 2011-10-14 11:27:42 -07:00
Jimmy Shih 167e1e79a8 Clean up ApiFeatures.java
Rename CupcakePlatformAdapter to ApiLevel3Adapter.
Rename EclairPlatformAdapter to ApiLevel5Adapter.
Rename GingerbreadPlatformAdapter to ApiLevel9Adapter.
Rename ApiPlatformAdapter to ApiLevelAdapter.
2011-10-13 17:58:19 -07:00
Jimmy Shih 91b3decf01 Check in a sample app that uses the MyTracks API. 2011-10-13 15:34:25 -07:00
Jimmy Shih 4ab93b067e Added tag v1.1.10 for changeset 5595ebb1c6d4 2011-10-13 13:24:05 -07:00
Jimmy Shih 008fa88012 Update AndroidManifest.xml versionCode and versionName
for the next release.
2011-10-11 18:15:16 -07:00
Jimmy Shih 4c49497577 Fix comment on ad70806c8dc7 2011-10-11 16:36:10 -07:00
Jimmy Shih 8dd3741fa7 Fix comments for ad70806c8dc7 2011-10-11 16:19:54 -07:00
Jimmy Shih 5572e07b34 - Use BluetoothDevice createInsecureRfcommSocketToServiceRecord for API level 10 or above.
- Use DecimalFormatSymbols getInstance for API level 9 or above.
- Use Arrays copyOfRange for API level 9 or above.
- Remove ApiFeatures hasStrictMode.
- Fix comment on MapOverlay to indicate that the two methods should only be
  used during testing.
- Use android.text.format.DateFormat to format date and time in DocsHelper.
  This DateFormat uses the same locale format as the phone configuration.

Fix DecimalFormat
2011-10-11 14:54:49 -07:00
Jimmy Shih 3f5589b655 Clean up AndroidManifest.xml for SignalStrengthSampler. 2011-10-11 09:52:35 -07:00
Jimmy Shih 48abfdd621 Fix SignalStrengthSampler.
Fix style comment on TrackRecordingService.
2011-10-10 18:11:51 -07:00
Jimmy Shih 06088b807b Fix BluetoothConnectionManager by using the public api
to create an insecure connection.
2011-10-10 17:12:17 -07:00
Jimmy Shih 21e47d8ce0 Fix unit tests with TrackPathDescriptor.
In MapOverlay, for testing, expose a getter and a setter
for TrackPathDescriptor instead of newPath and getLastPath.

In SingleColorTrackPathPainter, refactor "new Path" to a
newPath method so that tests can override the newPath method
to provide a mockPath.
2011-10-10 16:47:59 -07:00
Jimmy Shih c39ab2fda2 - fix bluetooth connection manager when creating an insecure connection
- in ControlRecordingService, unbind right after handling an intent
  to prevent leaking ServiceConnection before handling the next intent.
- update comment in TrackRecordingService
2011-10-10 15:03:54 -07:00
Jimmy Shih 4197120d92 merge heads 2011-10-10 12:13:01 -07:00
Jimmy Shih da7bd0f4ea Update "Allow access" texts and variables
Change notification permission to dangerous
Sort entries in keys.xml alphabetically
2011-10-10 12:10:12 -07:00
Jimmy Shih 21ac283355 merge heads 2011-10-09 15:05:10 -07:00
Jimmy Shih 153f638e03 merge heads 2011-10-09 14:46:53 -07:00
Jimmy Shih 9156735aa0 Add a confirmation dialog when user allows access to other apps 2011-10-09 14:36:09 -07:00
Jimmy Shih b8ad90a4cb protect MyTracksProvider based on settings bit, version 2 2011-10-09 13:56:47 -07:00
Jimmy Shih 36f7ba71f9 Fix unit tests 2011-10-09 13:42:02 -07:00
Jimmy Shih b1af2089a4 merge heads 2011-10-09 13:13:30 -07:00
Jimmy Shih 2b50a314a5 backout changeset ced20b29c911 2011-10-09 13:13:01 -07:00
Jimmy Shih 376d02cce2 Protects MyTracks notifications based on the settings bit.
Only sends broadcast notifications if allowed by the settings bit.

Introduces a permission for internal MyTracks communication.
Thus the MyTracks app widget can use this permission to
always receive broadcast notifications when a track starts
and stops.
2011-10-07 18:05:23 -07:00
Rimas Trumpa a4ae9e8fd5 Fixed "My Location" map centering problem (Issue 501). 2011-10-08 01:48:13 +01:00
Jimmy Shih 9e5204934f Protect MyTracksProvider based on the MyTracks settings bit.
Move MyTracksProvider to DatabaseProvider and protect the DatabaseProvider
using the AndroidManifest.xml.

Create a MyTracksProviderUtilFactory to create an instance of
MyTracksProviderUtils that accesses the DatabaseProvider.

Recreate MyTracksProvider by extending DatabaseProvider.
The recreated provider checks access, changes the authority,
and invokes the DatabaseProvider methods.
2011-10-07 16:23:59 -07:00
Jimmy Shih 1ffd77595d Improve TrackRecordingService by placing checkService inside canAccess 2011-10-06 10:09:25 -07:00
Jimmy Shih dac6a362f2 merge heads 2011-10-06 09:54:21 -07:00
Umran Abdulla 6d29b5140b Fix for the exception thrown when remotely starting bluetooth sensors. 2011-10-06 15:02:39 +11:00
Umran Abdulla 2c5414a8e7 Makes changes to the sensor information screen, to allow sensor details to be
available when the application is not recording.
2011-10-06 14:26:10 +11:00
Jimmy Shih 2fa325dbf3 Protect TrackRecordingService to allow
external applications access based on the
sharing settings.

Protect all RPCs calls using the caller's
process id.

When the service is started, we cannot
tell whether the caller is MyTracks or
another app. Thus when the service
is started, we cannot access MyTracks
database or start/stop a recording.

Previsouly, only the MyTracks app
widget is using the service's start method
to start and stop a recording. Thus
create a private service, ControlRecordingService,
that only the MyTracks app widget can access and delegate
starting/stopping a recording to
TrackRecordingService.
2011-10-05 16:45:32 -07:00
Jimmy Shih 969a677d7d Add a Share data settings 2011-10-04 18:35:37 -07:00
Jimmy Shih 90470342e7 merge heads 2011-10-04 14:51:45 -07:00
Jimmy Shih a4e762fb01 update MyTracks permission labels and descriptions 2011-10-04 14:50:00 -07:00
Jimmy Shih da2d732041 fix proguard issues with google-api-client-1.5.0 2011-10-04 13:57:27 -07:00
Jimmy Shih 6a5acee438 merge heads 2011-09-29 18:14:44 -07:00
Jimmy Shih 49cd5014d2 merge heads 2011-09-28 19:41:18 -07:00
Josh Kasten 522882c0cc Added back throwing of IllegalStateExceptions to startNewTrack and
endCurrentTrack so they still are thrown when called from the
ServiceBinder methods.
2011-09-28 21:11:45 -05:00
Josh Kasten 7e8b4dc4b9 Removed ignore_illegal_state string and code the uses it.
Removed the throwing of exceptions on start and stop of tracks and instead
added checking to not run them.
2011-09-28 20:22:02 -05:00
Jimmy Shih 8e673f6634 Remove clearTrackDataHub in MyTracksApplication.java 2011-09-28 17:54:11 -07:00
Josh Kasten 05e6018bd1 Organized code in handleStartCommand into smaller methods to better see the code
paths and for eaier maintainability.
2011-09-28 19:22:49 -05:00
ase69s e1a845d49f I think i have done the commit correctly, althought i only had to correct manually keys.xml (add new key from the head branch xml to mine) 2011-09-29 01:34:43 +02:00
Josh Kasten 2deded2d88 Renamed omit_illegal_state to android.intent.extra.IGNORE_ILLEGAL_STATE
Code comment and code style change.
2011-09-27 22:49:53 -05:00
Josh Kasten af550a7104 Fixed widget to not cause a unhandled exception to occur if you press on the widget
before it can update its button intent.
2011-09-27 19:59:33 -05:00
Jimmy Shih e68d7eb12d Upgrade google-api-client from 1.2.2-alpha to 1.5.0-beta. 2011-09-27 14:38:31 -07:00
Jimmy Shih a186e68ca0 Fix based on Sandor's comments 2011-09-26 11:51:05 -07:00
Jimmy Shih 81c60ca6f2 merge heads 2011-09-26 11:27:34 -07:00
Jimmy Shih bd9347afd7 merge heads 2011-09-26 10:54:11 -07:00
Jimmy Shih 9023cdf726 merge heads 2011-09-26 10:53:43 -07:00
Jimmy Shih 9caef87899 Automated merge with http://jkasten-mytracks2.googlecode.com/hg 2011-09-23 09:26:21 -07:00
ase69s c9d9c065a2 Finally solved instanceof class test. Its ready to merge? 2011-09-23 17:54:58 +02:00
Jimmy Shih c024c8d87b Fix proguard issue with fusion table.
Fusion table depends on google-api-client-1.2.2.alpha.jar.
Proguard needs to be set correctly for the google-api-client library.

Tested a release version and is able to send a track to fusion table.
2011-09-22 18:47:31 -07:00
Josh Kasten 850a0d988a Fixed Next key on the virtual keyboard on the "Marker Type" field to the next
field in the waypoint and track details activities.
2011-09-22 20:29:46 -05:00
Jimmy Shih 7bd3128e8f In MyTracks onDestroy, set trackDataHub to null to save memory 2011-09-22 12:22:23 -07:00
Jimmy Shih 43a1ec60ce create MyTracksApplication to keep global state like TrackDataHub 2011-09-22 11:25:27 -07:00
ase69s d04d83b972 Theorically solved last problem with tests...anything more? 2011-09-22 19:22:28 +02:00
Josh Kasten 89516c41e3 Added hints to all text input fields with the same value as their label for
all languages.
2011-09-22 00:03:57 -05:00
Jimmy Shih 4f9b6535fb Automated merge with http://mytracks.googlecode.com/hg/ 2011-09-21 16:17:01 -07:00
Jimmy Shih 6ab1f6158a Fixes various unit tests 2011-09-21 16:16:37 -07:00
Josh Kasten bb8e6a51f4 * Added display_settings_screen_key to keys.xml and put it to use in
CheckUnits and SettingsActivity classes for use with intents.

* In SettingsActivity split onCreate() code into initActivityCommons() and
  initActivitySpecifics() methods for easier maintaining of code required
  for all screens and code require for only some screens.
2011-09-20 19:52:53 -05:00
ase69s 7a8ea2666b Review issues corrected, pending issue about "expect" with class type argument 2011-09-20 22:31:59 +02:00
Josh Kasten 3029c6d10c * Changed SettingsActivity and CheckUnits
to use open_settings_screen instead of "Open".

* Cleaned up SettingsActivity by removing the class scoped variable displaySettingsOnly.
2011-09-19 17:54:00 -05:00
Josh Kasten 9bb0ba2953 Merge from main repo 2011-09-19 17:38:32 -05:00
Sandor Dornbush 0e22eaf7c3 Merging head. 2011-09-19 13:43:58 -07:00
ase69s 53ee9d31bc Review issues corrected, added test case for remaining class TrackPathPainterFactory 2011-09-19 20:25:41 +02:00
Jimmy Shih 7134edf2f2 Create DialogButton and DialogButtonSpacer styles.
Modify mytracks_send_to_google.xml dialog to use these styles.
2011-09-15 11:20:20 -07:00
Jimmy Shih e4da671cbc Improve the buttons layout on the "Send to Google" dialog.
For style,
I sort the attributes alphabetically except for "android:id".
If "android:id" exists, I place it on the same line as the element.
2011-09-14 17:31:57 -07:00
Josh Kasten 8cde2420e7 Merge from main repo 2011-09-13 22:48:50 -05:00
ase69s 3c4c215931 Review issues corrected 2011-09-13 20:26:28 +02:00
Rodrigo Damazio 2685309926 Fixing NPE in finalizer. 2011-09-11 09:06:06 -03:00
Rodrigo Damazio 03b4a788c5 Fixing potential race condition when stopping the data hub. 2011-09-11 08:48:58 -03:00
Rodrigo Damazio eb6cdd0fc0 Fixing the fixes for localization and track importing.
Fixes issue 462
Fixes issue 559
Fixes issue 540
2011-09-11 08:16:58 -03:00
Josh Kasten 0b1c24e55c Fixed the first app start message of "Units of Measure Notice" to jump to the
display section of the settings instead of the root when pressing yes.
2011-09-11 02:00:42 -05:00
ase69s 057c2d69a9 Suggested corrections made (Pending corrections in halt until getting response from the last revision comments i made) 2011-09-10 11:31:22 +02:00
van.isacker.pieter 79c2cf90cf Fix gpx import thread error (issue 559) 2011-09-09 16:51:08 +02:00
van.isacker.pieter 20cbdccbf6 Make use of HTTPS urls for google services.
Fix formatting by using locale settings
2011-09-09 14:49:31 +02:00
ase69s 5d05d71210 Track Color Mode Beta 2011-09-06 23:52:51 +02:00
Sandor Dornbush 08294e8ada Avoid RejectedExecutionException. 2011-09-05 21:37:09 -07:00
Sandor Dornbush 41f7262280 Merging extra head. 2011-09-02 19:27:46 -07:00
Sandor Dornbush 6aa361b801 Merging stride changes 2011-09-02 19:26:06 -07:00
buff3r 7bcc428178 adding ability to delete a statistics marker if it is the first marker in the list 2011-09-01 17:03:38 -07:00
buff3r c212217f67 adding ability to delete a statistics marker if it is the first marker in the list 2011-09-01 16:52:31 -07:00
Dominik R?ttsches 9281e0adf3 Revision comments for rev 5bcaab17e76f addressed. 2011-08-27 14:32:37 +03:00
Dominik R?ttsches ace10fc511 Review comments for revision fd70af575b77 addressed. 2011-08-26 18:03:57 +03:00
Dominik R?ttsches 0ac923e104 already merged 2011-08-25 15:56:16 +03:00
Dominik R?ttsches 082aa0a34a overriden in ca3651f10063 2011-08-25 15:54:48 +03:00
Dominik R?ttsches acf5c0931f Addressing review comments for StrideReadings class and related test cases:
- removing inner class, and recording of heartbeat timestamps
- fixing issue with rollover by replacing % operator with modulo operation
- comparing problematic firmware id against byte[] instead of String
- removing zephyr packet debug loggin
- not reassigning protobuffers Builders
- moving decision to use workaround into setCadence function
- license and javadoc author for testcase class
- proposal: using introspection to access private fields in testcase in order to determine expected availablity of values from getCadence, alternatively modify access to protected.
- modifying rollover test, hopefully more clear now.
- adding asserts during the loop in this test case.
2011-08-25 15:12:33 +03:00
Dominik R?ttsches ee204f35ef Addressing review comments for revision ca3651f10063.
+ limiting RunCadence to 254, same as it was done for cycling Cadence.
2011-08-25 13:16:02 +03:00
Rodrigo Damazio e51de2bfce Added tag v1.1.9 for changeset 2df0fdeea8c1 2011-08-23 22:38:08 -03:00
Rodrigo Damazio c7da9a45ee Releasing v1.1.9. 2011-08-23 22:37:48 -03:00
Dominik R?ttsches e885224855 TCX Output Tuning
- Interpret cadence only as biking cadence when activity was marked as biking.
- Otherwise encode as RunCadence in the Extensions
2011-08-21 16:10:01 +03:00
Dominik R?ttsches d48eccc0e4 TCX Output Tuning
- Interpret cadence only as biking cadence when activity was marked as biking.
- Otherwise encode as RunCadence in the Extensions
2011-08-21 16:08:26 +03:00
Dominik R?ttsches 21012b305f Adding battery level to sensor state activity. 2011-08-21 15:00:11 +03:00
Dominik R?ttsches a79e322eff Addressing warning. 2011-08-21 14:17:54 +03:00
Dominik R?ttsches b5a1cf1b10 Adding tests for new StrideReadings class. 2011-08-21 14:11:35 +03:00
Dominik R?ttsches 40ebd7bc2c Adressing a round of review comments. Tests in separate commit. 2011-08-21 13:55:11 +03:00
Dominik R?ttsches ef37ee0f38 Merging batteryLevel branch. 2011-08-21 00:40:47 +03:00
Dominik R?ttsches 49033bf952 Fix for Cadence values from HxM with Hardware/Firmware Identification 0x1A00316550003162 2011-08-20 16:58:36 +03:00
Dominik R?ttsches d9725240a6 Storing battery level in new protobuf field. 2011-08-20 01:25:58 +03:00
Dominik R?ttsches cb5518a261 Adding battery_level to protobuffers spec. 2011-08-20 01:01:43 +03:00
Dominik R?ttsches ac71d8aa2a Fixing TCX generation:
- Cadence before Extensions
- Adding BuildMajor and BuildMinor to Version since it seems to be required by http://connect.garmin.com
- Version Values now only contain integers by splitting mytracks version code at dots, allows correct XML validation.
2011-08-19 23:01:55 +03:00
Rodrigo Damazio aa733fbfb1 Merging to head. 2011-08-19 13:19:47 -03:00
Rodrigo Damazio d2b8f65612 Added tag v1.1.8 for changeset d4623f208a4a 2011-08-19 13:19:22 -03:00
Rodrigo Damazio cf6ac06f73 Fixing the display of waypoints. 2011-08-19 01:40:15 -03:00
Rodrigo Damazio 496ad9c4e2 Fixing menu items.
The complicated bit that was missing was the delete action, which is now its own activity with proper intent handling.
2011-08-19 01:33:46 -03:00
Rodrigo Damazio 657ec17559 Fixing usage of Charset in java.lang.String, which is only supported in API level 9. 2011-08-18 15:33:39 -03:00
Sandor Dornbush 62c9af5cba Release v 1.1.8 2011-08-17 09:34:56 -07:00
Sandor Dornbush a4f16a1f30 Pick up new Chinese translations 2011-08-13 08:25:45 -07:00
Sandor Dornbush 1b595ee7fe Pick up new Chinese translations 2011-08-13 08:24:12 -07:00
Sandor Dornbush fa556e4e33 Merged with head. 2011-08-11 09:28:10 -07:00
Sandor Dornbush 391d718909 Switch widget icons.
Fix errors in finish translation.
2011-08-11 09:06:32 -07:00
Rodrigo Damazio 2ce14e443d Merging to head. 2011-08-08 16:08:38 -03:00
Rodrigo Damazio cdf0a3a3e7 Fixing description/icon in waypoint creation request. 2011-08-07 03:48:59 -03:00
Rodrigo Damazio f00f9a5277 Added APN logging to the signal strength sampler.
(not tested on CDMA)
2011-08-07 03:47:03 -03:00
Ville Muurinen 7112642e89 Merging to head. 2011-08-04 20:50:50 +03:00
Ville Muurinen 3714c21f97 Changed and improved translation based on comments 2011-08-04 20:45:42 +03:00
Rodrigo Damazio 24c49b7f2f Merge with head. 2011-08-01 20:22:31 -03:00
Rodrigo Damazio b16429f3f8 Differentiating between GPS provider unavailable and disabled - unavailable, in some implementations (such as Samsung's) just means it doesn't have a fix.
(Fixes issue 505)
2011-08-01 15:31:42 -03:00
Rodrigo Damazio 27734495f4 Fixing race condition made evident by G1's slowness :) 2011-08-01 14:47:08 -03:00
Rodrigo Damazio 097b338d19 Fixing cupcake uploading by not referencing the Account object. 2011-08-01 14:46:51 -03:00
Sandor Dornbush cbb8450435 Merge with head. 2011-07-28 15:36:01 -07:00
Sandor Dornbush 3b7e0a91bd Tighten up the border. 2011-07-27 21:52:12 -07:00
Rodrigo Damazio d9a1e56282 Review suggestions 2011-07-25 21:33:58 -03:00
Rodrigo Damazio b63e74369c Attempt at working around Samsung bug which crashes the account manager service - the auth token call now synchronously calls 2011-07-22 21:04:15 -03:00
Rodrigo Damazio 4d0ba06cba Getting rid of backported accounts API since it's only used for API levels where we have native accounts. 2011-07-22 21:12:21 -03:00
Rodrigo Damazio c4369dc237 Bundling coding style into the projects themselves.
With this there's no need to manually import the xml files.
Downside is that if we decide to change something, we need import it in all projects (e.g. change in one, save as a template, then select that template on others).
2011-07-21 03:12:14 -03:00
Rodrigo Damazio 99dd212496 Updating main app to Honeycomb MR2.
(downgrading signal strength app to Gingerbread since it doesn't need anything more than that)
2011-07-20 14:27:06 -03:00
Rodrigo Damazio 6e41033ed6 Addressing review suggestions 2011-07-15 13:20:20 -03:00
Rodrigo Damazio 90a5cb7aae Enabling some sensible warnings which are not on by default in Eclipse. 2011-07-15 13:19:14 -03:00
Rodrigo Damazio bccfbaa03b Style and warning fixes. 2011-07-12 20:42:25 -03:00
Rodrigo Damazio e32ff7116d Simplyfing the authentication dance by handling both success and failure together, and both of them outside onActivityResult. 2011-07-12 20:19:59 -03:00
Rodrigo Damazio 00214843cb Improve state handling, specially in cases where SendActivity gets destroyed. 2011-07-12 20:11:47 -03:00
Sandor Dornbush dd4054c4fc Address comments. 2011-07-11 22:50:06 -07:00
Sandor Dornbush 0b40b92340 Clean up code + add pace. 2011-07-11 22:30:49 -07:00
Rodrigo Damazio 60a3c41003 Merge with head. 2011-07-11 18:01:39 -03:00
Sandor Dornbush f501c60de1 Address comments. 2011-07-11 11:32:54 -07:00
Sandor Dornbush b985a935b0 Address comments. 2011-07-07 22:25:41 -07:00
Rodrigo Damazio a2f1790db2 Merge with head. 2011-07-07 18:25:36 -03:00
Sandor Dornbush 5784ab63cc Final widget fixes. 2011-07-05 22:11:05 -07:00
Rodrigo Damazio fd857c2586 Fixing race condition in chart UI update thread. 2011-07-05 23:15:47 -03:00
Sandor Dornbush 29df8762e2 Merge with head. 2011-07-05 16:33:45 -07:00
Sandor Dornbush 32e13c3495 Fix polar tests and sensor strings. 2011-07-05 15:20:04 -07:00
Sandor Dornbush e6151b3b71 Fix polar tests and sensor strings. 2011-07-05 15:19:21 -07:00
Sandor Dornbush 6823b08651 Merge with head. 2011-07-03 15:47:20 -07:00
Sandor Dornbush b588bb02f4 Fix formatting. 2011-07-03 10:02:16 -07:00
Sandor Dornbush faf7b6efa2 Fix widget and address comments. 2011-07-03 09:58:04 -07:00
Rodrigo Damazio 03492da2cd Fixing time-based chart drawing by ensuring data is reloaded and fixing a race condition. 2011-07-01 03:56:33 -03:00
Rodrigo Damazio 8abfc2ada0 Removing old comment 2011-07-01 01:56:34 -03:00
Rodrigo Damazio a262a2ef71 Adressing review suggestion. 2011-07-01 01:11:00 -03:00
Ville Muurinen 435a38f1d1 Removed unnecessary files 2011-06-30 22:47:00 +03:00
Ville Muurinen 91d7db7c01 Added Finnish translation 2011-06-30 19:38:34 +03:00
Rodrigo Damazio e298c88728 "I see dead threads".
Removing handler threads which were left to die, forever alone with nothing to execute.
2011-06-30 04:03:30 -03:00
Rodrigo Damazio d58e7a58d0 Making the target account be selected only once. 2011-06-30 03:44:25 -03:00
Rodrigo Damazio e530412ef0 Adding state persistence for low-memory situations and handling the share action. 2011-06-30 03:20:08 -03:00
Rodrigo Damazio 1d5e2dc4d5 Addressing TODO: Making SendActivity a state machine. 2011-06-30 02:26:01 -03:00
Rodrigo Damazio d0b5faf266 Fixing a couple of race conditions. 2011-06-30 02:24:34 -03:00
Rodrigo Damazio 76e8a39276 Allowing SendActivity to receive sub-activity results (onActivityResult calls). 2011-06-30 02:23:48 -03:00
Rodrigo Damazio 66fe8e694f Addressing review suggestions. 2011-06-29 18:07:00 -03:00
Rodrigo Damazio abd8a230b4 Moving back to managed dialogs to make them still work cross-activity. 2011-06-28 05:58:54 -03:00
Rodrigo Damazio 565662a8aa Minor style fix in authentication classes 2011-06-28 02:38:12 -03:00
Rodrigo Damazio 0f00e71b5e Merging to head. 2011-06-27 05:40:36 -03:00
Rodrigo Damazio 44fea0117d Fixing the closing of send to google dialogs. 2011-06-27 05:20:54 -03:00
Rodrigo Damazio b9b39a24f7 Merging to head 2011-06-27 05:15:32 -03:00
Rodrigo Damazio 358fb87683 Addressing review suggestions 2011-06-24 16:20:29 -03:00
Rodrigo Damazio f0ef73d150 Merging to head. 2011-06-22 17:17:31 -03:00
Rodrigo Damazio 1d2297a5fc Fixing some nits from static analysis. 2011-06-22 17:16:40 -03:00
Rodrigo Damazio 862736bba4 Changing service connection to be a non-singleton, and properly handle its state. 2011-06-22 16:35:40 -03:00
Sandor Dornbush e30dac7cc2 Allow units not in metric. 2011-06-21 22:24:14 -07:00
Sandor Dornbush f97d5fa232 Clean up widget. 2011-06-21 22:00:40 -07:00
Rodrigo Damazio e909616aff Minor reorg in the service - just reordering methods. 2011-06-22 01:59:34 -03:00
Sandor Dornbush be219bbee6 Merged with 1.1.7 2011-06-21 21:19:01 -07:00
Sandor Dornbush 17c1c81b4e Try to clean up widget. 2011-06-21 21:17:03 -07:00
Sandor Dornbush bf0a16c707 Added tag v1.1.7 for changeset a9c635c8e7b4 2011-06-21 21:05:26 -07:00
Sandor Dornbush 86a54feb41 1.1.7 2011-06-21 21:02:57 -07:00
Rodrigo Damazio 2c923470f8 Removing service calls which were just delegates to the provider utils.
These weren't used anywhere, and this change makes a more clear separation between dealing with track data and dealing with the recording service.
2011-06-17 14:04:56 -03:00
Sandor Dornbush 5d26250b45 Revert overzealous argument checking. 2011-06-15 21:48:28 -07:00
Sandor Dornbush 6d90e0bf51 Minor fixes. 2011-06-14 21:43:06 -07:00
Rodrigo Damazio 51df795a8c Fixing leftovers from the merge 2011-06-14 20:48:00 -03:00
Rodrigo Damazio 9ee053e4f9 Merge to head (non-trivial merge) 2011-06-14 20:42:57 -03:00
Sandor Dornbush 4044185ab3 Set product version. 2011-06-14 10:32:37 -07:00
Sandor Dornbush f4fe825162 Fixed analytics. 2011-06-14 10:09:14 -07:00
Sandor Dornbush cb785b89f0 Add simple analytics. 2011-06-13 21:15:37 -07:00
JohnG 8289128399 String array sensor_type_options fix
Reverted .classpath.  (Oops)
Moved move the old strings from arrays.xml to strings.xml.
Created sensor_type_options string for "None" for language support.
2011-06-13 23:09:20 -04:00
Sandor Dornbush e9146f5fc1 Merge. 2011-06-12 22:34:18 -07:00
Sandor Dornbush bc7de458d3 Cap at 254. 2011-06-12 22:28:48 -07:00
Rodrigo Damazio 4aa44331f0 Adding new activity types, contributed by Marius F. 2011-06-10 20:00:47 -03:00
Rodrigo Damazio eada19f516 Addressing review suggestions and fixing text-to-speech initialization. 2011-06-10 19:52:18 -03:00
Sandor Dornbush 63677b1451 Merged widget. 2011-06-09 20:57:48 -07:00
Sandor Dornbush 5789d96a3d Cap cadence in TCX files. 2011-06-09 20:32:24 -07:00
Rodrigo Damazio 0afdeb9bcc Fixing a few less common issues from the Market console. 2011-06-09 22:22:57 -03:00
Rodrigo Damazio 79dd8f4e49 Fixing some of the top issues from the Market console:
- Not trying to show dialogs if activity is going away
- Properly handling when the user doesn't select an account
- Handling unwritable database (due to memory full?)
- Handling NPE from fusion tables upload
- Not trying to touch dialogs when we're about to restart the whole app
2011-06-09 22:07:25 -03:00
Rodrigo Damazio 93f204ba22 Uniformly handling id == 0 (it's not valid, but everywhere we only assume < 0 is invalid, so do the same here) 2011-06-09 19:45:08 -03:00
Rodrigo Damazio 98ad96115a Properly handling invalid track/point/waypoint IDs.
This makes the provider utils implementation return null for those cases, and fixes all callers which didn't check for that.
2011-06-09 19:12:51 -03:00
Rodrigo Damazio ae4ce12c17 Added tag v1.1.6 for changeset 43a7a27cd4f0 2011-06-03 19:23:24 -03:00
Rodrigo Damazio b8767042b4 Released version 1.1.6 2011-06-03 19:23:01 -03:00
Rodrigo Damazio 200e5f3373 Addressing review suggestion. 2011-06-03 11:19:24 -03:00
Rodrigo Damazio ebb68cccfe Fixing imports 2011-06-03 01:26:22 -03:00
Rodrigo Damazio cc4be23802 Fixing Toast calls outside the UI thread. 2011-06-03 01:24:42 -03:00
JohnG 9f44b1695d Merge error fix.
String polar_sensor_type was left out of Sensor Type array.
2011-06-02 20:58:27 -04:00
JohnG 94344deff3 Change sensor_type_options array to support different languages.
Moved sensor_type_options from arrays.xml to arrays_do_not_translate.xml.
Added strings to strings.xml.
2011-06-01 23:20:00 -04:00
Rodrigo Damazio a41994cb41 Review suggestions 2011-06-01 17:34:44 -03:00
Rodrigo Damazio eee6a713fa Clean-up of issues found by static analysis. 2011-06-01 05:23:25 -03:00
Rodrigo Damazio aed28fe503 Cosmetic and unused method changes. 2011-06-01 04:58:34 -03:00
Rodrigo Damazio 7bc72e683b Merging to head. 2011-06-01 02:45:41 -03:00
Rodrigo Damazio 31e386de44 Optimization: getting rid of some objects when the hub is stopped. 2011-06-01 02:02:49 -03:00
Rodrigo Damazio 31737efd87 And the moment we've been all waiting for....MyTracks is no longer a singleton. 2011-06-01 01:44:07 -03:00
Rodrigo Damazio be096b9657 Removing no-longer-necessary methods from the platform adapters. 2011-06-01 01:40:12 -03:00
Rodrigo Damazio 3e773ef94b Making TrackDataHub an application singleton (using the application context to ensure we don't leak MyTracks). 2011-06-01 01:39:51 -03:00
Rodrigo Damazio 111adc917b Getting rid of insertWaypoint singleton dependency. 2011-05-31 03:16:14 -03:00
Rodrigo Damazio 6a1b2861f3 Getting rid of unused DialogManager calls. 2011-05-31 03:10:25 -03:00
Rodrigo Damazio ed3ff01c22 Freeing MyTracks from isRecording() calls. 2011-05-31 03:09:08 -03:00
Rodrigo Damazio 73e4af98cc Cutting service binding and preferences dependencies to the MyTracks singleton. 2011-05-31 02:35:05 -03:00
Rodrigo Damazio 84835428ba Merging to head 2011-05-26 10:01:44 -03:00
Rodrigo Damazio 9f3099ef2b Addressing review suggestions 2011-05-26 09:58:29 -03:00
Rodrigo Damazio 412eed51cd Removing DialogManager test which is no longer needed. 2011-05-25 21:26:07 -03:00
Rodrigo Damazio bd20d1af02 Addressing review suggestions 2011-05-25 21:25:46 -03:00
Rodrigo Damazio a15932cc7f Passing track IDs as URIs instead of extras. 2011-05-25 20:13:49 -03:00
Rodrigo Damazio 8942c31a5c Making the "Show track" button after an import clear the stack. 2011-05-25 19:21:56 -03:00
Rodrigo Damazio 90fe6921e2 Moving track importing out of MyTracks class. 2011-05-25 19:19:21 -03:00
Rodrigo Damazio e8a872d351 Improving intent handling so each activity receives its data type. 2011-05-25 19:17:34 -03:00
Rodrigo Damazio a16ae846ae Added tag v1.1.5 for changeset a34fd36dffc6 2011-05-25 16:20:22 -03:00
Rodrigo Damazio 38de0e352f Releasing 1.1.5 2011-05-25 16:19:54 -03:00
Rodrigo Damazio eeaa50ddcb Removing singleton usage: moving all send and save logic out of the MyTracks class.
This is a non-trivial step: I decentralized dialog creation (since it made no sense to have a single place creating a lot of completely unrelated dialogs), made invisible activities just for sending/saving, and changed menu handling a bit, all to decentralize those functions from MyTracks.

There's still a TODO to handle GET_LOGIN more nicely instead of returning from the depths of auth management into the current activity.
2011-05-25 04:50:21 -03:00
Rodrigo Damazio 16b0d4eb24 Removing singleton usage: chart settings dialog 2011-05-25 02:13:38 -03:00
Rodrigo Damazio 053fb403c5 Merging 2011-05-24 14:19:12 -03:00
Rodrigo Damazio 1d70d4bca0 Merging 2011-05-24 14:18:57 -03:00
Rodrigo Damazio bba04ba1bd If the only listener is a new one (and since for optimization we keep its state as the global state), we want to reset the global state before loading points onto it. 2011-05-24 13:53:26 -03:00
nic e926180605 Updated tests for Zephyr HxM message parsing to check signed/unsigned conversion 2011-05-24 17:35:12 +02:00
nic 958b62f8c7 Reverting change that was proposed in review comments of revision 3dfdbcf78de0 for Line 39: the 0xFF bit mask is necessary as Java byte is -128 to 127, not 0 to 255. 2011-05-24 09:45:06 +02:00
JohnG d238a9e9dd Polar HRM cleanup, take III
Code review of May 20 comments addressed.
2011-05-21 09:01:41 -04:00
Rodrigo Damazio 1588c25fba Merging to head 2011-05-20 14:42:10 -03:00
JohnG fb993a7060 Polar HRM parser tests. 2011-05-20 00:38:39 -04:00
JohnG 6b375614ca Fixes for Polar HRM code review of May 1.
Addressed all comments.  Cleaned up Polar parser mostly.
Added decaying heart rate algo for now.

Tried to reach out to joni to work on merging projects.  No response yet.
2011-05-19 23:00:22 -04:00
Rodrigo Damazio da928fb549 Making data hub tests run considerably faster. 2011-05-19 21:42:40 -03:00
Rodrigo Damazio f657c2f1d1 Adding tests and making minor reorg changes. 2011-05-19 20:59:40 -03:00
nic 594cc0f06d Merge with a128c27963002c1d46170696e1c1045db4e1de87 2011-05-19 16:39:51 +02:00
nic d712bb1988 Updated tests for revisions d6fb857fb559 (Zephyr HxM message parsing) 2011-05-19 16:38:26 +02:00
Rodrigo Damazio d00c92ef99 Fixing incremental loading when there's only a single listener. 2011-05-18 17:55:39 -03:00
Rodrigo Damazio 59a30238eb Merging to head 2011-05-17 01:19:58 -03:00
Rodrigo Damazio cb75c6fbe6 Fixing eclipse warnings all over the project. 2011-05-17 00:15:02 -03:00
Rodrigo Damazio 8056b66714 Fixing sampling frequency calculation. 2011-05-16 23:43:24 -03:00
Rodrigo Damazio e09501d779 Minor reorg in sampling code. 2011-05-16 23:42:49 -03:00
nic 70192222ad - comment from http://code.google.com/r/nic-sensors/source/detail?r=116bf0d1136edaa75c6bb5609b3c16e99ecb1ad8 2011-05-13 08:49:20 +02:00
bartn cc253d4b33 Removed untranslated strings. 2011-05-12 14:51:13 -07:00
bartn 7d3918a1c6 Fix typos in Polish translations and a few missing translations. 2011-05-12 12:25:02 -07:00
nic e759a14909 -comments from http://code.google.com/r/nic-sensors/source/detail?r=7fd41979e22a99d8173fe91df25124e85c1766e9 2011-05-12 09:57:29 +02:00
nic fd5a1c5b4b - integrating comments from code review proposals http://code.google.com/r/sandordornbush-patches/source/detail?r=3dfdbcf78de082edb66a8994ffb604c84945df0d 2011-05-11 11:34:47 +02:00
nic c95dc12a96 Merge with 3dfdbcf78de082edb66a8994ffb604c84945df0d 2011-05-10 10:09:04 +02:00
Nico Laum 70ef5912c2 - new method to calculate an Int from Little Endian data (according to the HxM documentation the data is Little Endian)
- new methods to calculate the CRC8 checksum
- in ZephyrMessageParser the CRC8 now is used in isValid() and the cadence and power values are written to the SensorData objects
2011-05-09 09:53:59 +02:00
Rodrigo Damazio 79bb9db3b9 Backing out changeset f35dbbe86d616e41561839a2316867b8e7e68d88 (broke gmail sharing). 2011-05-06 15:51:46 -03:00
Rodrigo Damazio d3791ea99b Providing network or null locations to activities, in the appropriate situations, and addressing minor style suggestions. 2011-05-06 15:45:35 -03:00
Rodrigo Damazio 5982fed0b8 Fixing sampling for re-registered listeners. 2011-05-04 22:52:34 -03:00
Rodrigo Damazio 1254df2db1 We were already assuming that the sampled-out listeners are a subset of sampled listeners, so optimize state update. 2011-05-04 22:44:36 -03:00
Rodrigo Damazio 8a23af8581 Merge to head. 2011-05-04 22:06:16 -03:00
Rodrigo Damazio 9cabb27c39 Filtering out non-GPS updates 2011-05-04 22:03:20 -03:00
Rodrigo Damazio 5c17437ba6 Assuming that we have a GPS provider until we're told otherwise
(this avoid a startup toast saying we have no GPS).
2011-05-04 21:50:16 -03:00
Rodrigo Damazio 520c3659d2 Fixing clearing of stats at the start of recording. 2011-05-04 21:45:23 -03:00
Rodrigo Damazio 962374b765 Optimizing re-registration of listeners so they receive updates since they were unregistered instead of a full reload. 2011-05-04 20:48:52 -03:00
Rodrigo Damazio 8fcc809299 Standardizing the creator string across exported file formats. 2011-05-04 18:21:49 -03:00
Sandor Dornbush 8eac101082 Fix-up Zephyr
- Add cadence
- Add power
- Check crc
2011-05-03 21:27:45 -07:00
JohnG b1605ac44e Polar parser 2011-05-01 15:15:13 -04:00
JohnG 90afc1e221 Polar parser 2011-05-01 15:14:41 -04:00
JohnG adeba81340 Polar parser 2011-05-01 15:13:55 -04:00
JohnG 8c10b7ba04 Polar parser 2011-05-01 15:13:34 -04:00
JohnG 8aae77ff70 Polar parser 2011-05-01 15:13:06 -04:00
JohnG 7eeacc6268 Polar parser 2011-05-01 15:12:33 -04:00
JohnG 06e02781d2 Polar parser 2011-05-01 15:11:53 -04:00
Rodrigo Damazio 3b5625c663 Adding javadoc to ChartView. 2011-04-30 22:35:59 -03:00
Rodrigo Damazio ea47f93bc1 Breaking down chart drawing methods as suggested by Sandor. 2011-04-30 19:16:13 -03:00
Rodrigo Damazio c33c2de18b Adding missing return 2011-04-30 18:42:18 -03:00
Rodrigo Damazio f125a798bf Fixing a few of the issues in chart drawing. 2011-04-30 04:37:59 -03:00
Rodrigo Damazio 84d7281002 Test fix: Moving tests after the tested classes have moved. 2011-04-30 02:58:44 -03:00
Rodrigo Damazio d98a53ec43 Merging to head. 2011-04-30 02:42:35 -03:00
Rodrigo Damazio ee3026233e Fixing handling of no loaded track. 2011-04-30 02:40:46 -03:00
Rodrigo Damazio 8fb0b69a79 Further splitting the data hub. 2011-04-30 02:39:56 -03:00
Benjamin Hardill b hardill 03ce6c05a9 Remove extra MyTracksProviderUtils instance 2011-04-26 01:10:01 +01:00
Benjamin Hardill b hardill 1d3a03909b Added Track as an extra to the Intent used with Intent.ACTION_SEND
Also removed the Locations ArrayList from the Track writeToParcel and createFromParcel as it's no longer populated
2011-04-26 00:43:20 +01:00
saxman 7020b78faa Removed mytracks prefix from files and variables.
Moved colors to colors.xml.
Code clean-up and more documentation.
2011-04-25 09:00:39 -07:00
saxman f1746b41a2 Added widget for displaying track stats and starting/stopping tracks.
Added track update broadcast to TrackRecordingService.
Added start and end track actions to TrackRecordingService.
2011-04-23 23:59:47 -07:00
Rodrigo Damazio 22b96e4b24 Moving data hub and related classes to content package. 2011-04-23 04:05:58 -03:00
Rodrigo Damazio ddf684f6c6 Removing duplicate import_done string. 2011-04-23 03:00:37 -03:00
Sandor Dornbush cc9d327ea0 Kill second head. 2011-04-21 16:01:08 -07:00
Sandor Dornbush 47e23e3463 Make the empty chart slightly less ugly. 2011-04-21 15:57:59 -07:00
Sandor Dornbush 8feb903021 Fix minor bug in send to fusion tables. 2011-04-19 21:04:29 -07:00
Sandor Dornbush 124172e4d7 Disable import and export while recording. 2011-04-19 20:57:50 -07:00
Sandor Dornbush 9d4367cfac Fix waypoint selection. 2011-04-19 20:43:28 -07:00
Matthew Simmons 6cd9dfce8c Constants.TAG -> TAG 2011-04-12 17:37:10 -04:00
Matthew Simmons 4a3dbe4d60 Move ANT Sensor classes into the ANT subdirectory 2011-04-12 17:32:49 -04:00
Matthew Simmons 062ab5045a Add an enum which stores static data about ANT sensors. 2011-04-12 17:13:11 -04:00
Matthew Simmons ba472d3b7b Allow cancellation of track write 2011-04-12 15:43:54 -04:00
Rodrigo Damazio 82adcf37f4 Fixing stats screen registration. 2011-04-12 15:58:58 -03:00
Rodrigo Damazio 4f23690ab4 Fixing stats screen registration. 2011-04-12 15:22:23 -03:00
Rodrigo Damazio 17481aeb38 French string fix 2011-04-12 15:05:01 -03:00
Matthew Simmons 26adbb1717 code review comments 2011-04-12 13:14:05 -04:00
Matthew Simmons ffd2785499 merge 2011-04-12 12:49:17 -04:00
Rodrigo Damazio 5c6d160cbf Minor cleanup. 2011-04-12 02:00:18 -03:00
Rodrigo Damazio 28a5c5b343 Merging to head. 2011-04-12 01:42:27 -03:00
Rodrigo Damazio 3501fff7fc Fixing first-startup NPE. 2011-04-12 01:23:36 -03:00
Rodrigo Damazio 1988337598 Multiple improvements to the data hub:
* Making registration finer-grained so we only listen to the data we really need.
* Moving the system listener registration to an external class (for testability and readability)
* Adding a unit test (not yet complete)
* Adding documention and cleaning up comments

Still many things TODO:
* Allow pausing of registrations
* Add pause/resume to onPause/onResume of activities
* Move sampling logic out of the hub
* Optimize data reloading when display preferences change
* (maybe) move the data hub and related classes to the "content" package
2011-04-12 01:22:57 -03:00
Sandor Dornbush be2fdd5cfa Merge with ru. 2011-04-11 19:57:51 -07:00
Sandor Dornbush ef0837c514 Address comments. Merge in Rodrigo's Changes. 2011-04-11 19:26:52 -07:00
Sandor Dornbush 252f88e362 Address comments. Merge in Rodrigo's Changes. 2011-04-11 19:24:36 -07:00
Sandor Dornbush 8ba9b47141 Address comments. Add periodic task factories. 2011-04-07 11:55:36 -07:00
Matthew Simmons f984339b13 code review comments 2011-04-06 18:46:14 -04:00
Matthew Simmons a1ff1d2585 Add file export progress 2011-04-06 17:31:48 -04:00
Matthew Simmons 3bbe7d0322 add javadoc 2011-04-06 14:06:19 -04:00
Matthew Simmons 3fd729f1a2 Extract an interface from TrackWriter to ease testing. 2011-04-06 13:49:31 -04:00
Matthew Simmons 375b75c422 merge russian messages 2011-04-06 11:30:15 -04:00
Matthew Simmons 340a1e3e3a merge messages 2011-04-06 11:29:07 -04:00
Sandor Dornbush 8d3ab8f93b Refactor periodic tasks. 2011-04-05 21:34:47 -07:00
Sandor Dornbush 8dc52de871 Merging 2011-04-05 21:21:55 -07:00
Rodrigo Damazio 6ff39be4bf Allowing certain data hub operations to work even if not started yet. 2011-03-26 03:26:57 -07:00
Rodrigo Damazio e2548ac9e2 Merging 2011-03-26 03:03:06 -07:00
Rodrigo Damazio 0ce94ada82 Removing unpopulated comment 2011-03-26 01:54:28 -07:00
Chihau Chau 77a4c4be70 This patch fix some spelling and badly-written issues of the Spanish translation 2011-03-25 10:09:29 -03:00
Sandor Dornbush 9616084769 Merge with head. 2011-03-24 23:05:02 -07:00
Sandor Dornbush 163a246c58 New executers. 2011-03-24 23:00:34 -07:00
Chihau Chau 31efcb4a86 Automated merge with http://mytracks.googlecode.com/hg/ 2011-03-24 10:34:14 -03:00
Chihau Chau 1faea596f8 This patch fix some spelling and badly-written issues in the Spanish translation strings file. 2011-03-24 10:19:32 -03:00
Rodrigo Damazio cd5cb9093c Adding first version of My Tracks i18n tool.
Since this is a first proposal, I'm not yet modifying the xml files to pass validation, except for a small example.
Also keep in mind that the annotations in the XML (rev in a string tag, or KEEP_PARENT) would be inserted automatically by the "translate" module.
2011-03-23 22:07:21 -07:00
Matthew Simmons 9f1bd89a0c Add Russian translation 2011-03-23 19:48:59 -04:00
Matthew Simmons 0908053881 merge 2011-03-23 18:47:38 -04:00
Matthew Simmons 910068bcf5 Move file I/O classes into their own package 2011-03-22 19:43:15 -04:00
Chihau Chau d9ae0ff1bf Fixing some error messages strings for the Spanish translation 2011-03-22 10:56:07 -03:00
Matthew Simmons 4bea1a6e70 merge 1.1.4 release 2011-03-21 20:08:16 -04:00
Matthew Simmons e7873b0fa0 Added tag v1.1.4 for changeset b3ade8b2a8cd 2011-03-21 19:10:00 -04:00
Matthew Simmons c892704ee3 update for 1.1.4 2011-03-21 19:09:13 -04:00
Rodrigo Damazio 7cd44c853a Review suggestions. 2011-03-21 13:43:34 -07:00
Rodrigo Damazio 818b42b97e Finishing Sandor's renaming. 2011-03-21 02:19:06 -07:00
Rodrigo Damazio 5870ba98b4 Review suggestions. 2011-03-21 01:54:39 -07:00
Rodrigo Damazio 19939c985a Merging to Sandor's renaming. 2011-03-21 01:10:26 -07:00
Matthew Simmons 7d65a9ef22 merge 2011-03-18 19:35:53 -04:00
Matthew Simmons eb45f7c3bc 1.1.4 RC1 2011-03-18 19:35:14 -04:00
Sandor Dornbush 90a89c9224 Static import TAG. 2011-03-17 22:43:26 -07:00
Sandor Dornbush e59b52dcac Merge with head. 2011-03-17 21:57:27 -07:00
Matthew Simmons 07d4edef4e add script to find messages in strings files 2011-03-17 19:17:39 -04:00
Matthew Simmons b76c2f7b8d Fix German translation for send_track_body_format. While the name implies
that it's a format string, it isn't.  A subsequent change will rename the
string.
2011-03-17 18:26:55 -04:00
Rodrigo Damazio be414510a4 Merging Matthew's change. 2011-03-16 15:11:39 -07:00
Rodrigo Damazio e4b2052231 Merging my maps code to head. 2011-03-16 14:23:19 -07:00
Matthew Simmons 5066b23603 Increment the TCX author minor version number if the MyTracks which generated it
is a development build.
2011-03-16 16:42:51 -04:00
Rodrigo Damazio 86de9830b4 Merging MapsFacadeImpl into MapsFacade 2011-03-16 13:06:53 -07:00
Rodrigo Damazio 758b5e4810 Referencing Waypoint directly again. 2011-03-16 13:00:11 -07:00
Matthew Simmons 79e2c55c34 Code review comments 2011-03-16 15:59:21 -04:00
Rodrigo Damazio 802cf51cf9 Removing many indirections I had introduced. 2011-03-16 12:58:41 -07:00
Rodrigo Damazio 55d4a90041 Getting rid of the authentication refresher (we can now reference AuthManager) 2011-03-16 12:48:37 -07:00
Rodrigo Damazio cf535a2f8f Getting rid of the strings provider (we can now reference string resources again) 2011-03-16 12:42:20 -07:00
Rodrigo Damazio ba38964e8a Bringing My Maps code back. 2011-03-16 12:38:10 -07:00
Matthew Simmons c943e5dd43 Fix TCX export 2011-03-16 14:04:53 -04:00
Matthew Simmons 65f44da4c9 merge with 1.1.3 release 2011-03-15 12:13:19 -04:00
Matthew Simmons 24c51afa40 Added tag v1.1.3 for changeset 62821d45032d 2011-03-14 16:54:16 -04:00
Matthew Simmons e6739adb35 Update version to 1.1.3 2011-03-14 16:53:17 -04:00
Rodrigo Damazio 06fceb07cc Merging to head 2011-03-11 23:55:53 -03:00
Rodrigo Damazio c87029254c Merging to head 2011-03-11 23:54:30 -03:00
Rodrigo Damazio d52aca1d3d Fixing preference keys. 2011-03-11 23:38:31 -03:00
Rodrigo Damazio 26af05cd01 Merging to head. 2011-03-11 23:14:52 -03:00
Rodrigo Damazio f7750f2a2c Minor style clean-up 2011-03-11 22:56:25 -03:00
Rodrigo Damazio 675b4f55c1 First step of data flow refactoring.
This moves all data source connections into the TrackDataHub.

There are still many things to (re)do here:
- Optimizations about when the listeners are registered
- Optimizations about what data each TrackDataListener is interested in
- When activities are restarting, send new data since they were stopped (instead of doing a full reload)
- Proper double-buffering of Location objects (some listeners are interested in double-buffering all points, while others are only interested in double-buffering sampled points)
- etc.
2011-03-11 22:26:05 -03:00
Matthew Simmons a322439a83 Release 1.1.3 RC1 2011-03-11 18:15:29 -05:00
Matthew Simmons f7a1046c67 Make the impossible null location slightly less impossible so Location doesn't throw an
exception anymore.
2011-03-11 17:37:50 -05:00
Matthew Simmons c17593d932 merge 2011-03-11 17:20:13 -05:00
Matthew Simmons 109d2969a5 Fix test failures by removing the need to mock TrackRecordingService. Android mock appears
to have a problem with TRS and Context.  When it tries to mock either class, it ends up trying
(and failing) to mock DatabaseErrorHandler, which for some reason always fails.
2011-03-11 16:55:10 -05:00
Matthew Simmons 2d3c463bf3 Don't mock MockContext. For some reason Android Mock is unable to do it. As it happens, we
don't really need to mock it anyway.
2011-03-11 16:07:34 -05:00
Matthew Simmons 74073b641f Check for null preferences before trying to use them 2011-03-11 16:06:30 -05:00
boiledorange73 426033f835 Some of words are changed. 2011-03-10 00:42:43 +09:00
boiledorange73 a9ad1e22d6 Trans #2 strings.xml 2011-03-09 01:12:49 +09:00
boiledorange73 903aa014e4 Translation 2011-03-09 00:17:33 +09:00
Sandor Dornbush e058854c3f Stripping MyTracks from class names. 2011-03-07 22:12:52 -08:00
Matthew Simmons c16ce866dc code review comments 2011-03-07 13:54:45 -05:00
Matthew Simmons f9eba950e0 code review comments 2011-03-04 19:23:37 -05:00
Matthew Simmons 3eb53d3195 Rework send-to-google result dialog
Fix Fusion Tables success determination
2011-03-04 08:51:52 -05:00
Rodrigo Damazio 2a5921d3d0 Merging Marian's change to German translation. 2011-03-02 14:20:59 -03:00
Rodrigo Damazio 440c711335 Review suggestions:
- Standard style in XML
- Fixing strict mode violation
2011-03-02 14:03:27 -03:00
Rodrigo Damazio 7ea573123b Adding vacuum call for when a track is deleted (helps reclaim storage space). 2011-03-02 13:48:57 -03:00
Rodrigo Damazio 7f5ce45fad "Fixing" translations after adding preference reset option. 2011-03-02 13:35:56 -03:00
Rodrigo Damazio bd16542e25 Adding option to reset to default settings. 2011-03-02 13:35:39 -03:00
Matthew Simmons b95a696a5a Fix NPE in test execution. 2011-02-28 17:17:35 -05:00
Matthew Simmons b8f40e8314 import static MyTracksConstants.TAG 2011-02-28 16:59:52 -05:00
Matthew Simmons 0bbeff0b5b Use locale-insensitive formatting for GPX files 2011-02-27 20:40:14 -05:00
Rodrigo Damazio 5828e16421 Disabling strict mode death for cursors since the Honeycomb emulator system image triggers it in MapView. 2011-02-25 01:13:13 -03:00
Rodrigo Damazio 8497d2efba Making My Tracks honeycomb-compatible. 2011-02-25 00:45:07 -03:00
Rodrigo Damazio b578d2ced0 Merging to head. 2011-02-24 20:48:45 -03:00
Rodrigo Damazio 239b461f75 Added tag v1.1.2 for changeset e3c158b73e59 2011-02-24 20:23:24 -03:00
Rodrigo Damazio c7db7c0926 Releasing version 1.1.2 2011-02-24 20:22:46 -03:00
Rodrigo Damazio e107766a61 Updating Maps library to fix cupcake/donut issues. 2011-02-24 15:19:38 -03:00
Rodrigo Damazio 05a0b6c615 Fixing app and uploading on Cupcake/Donut. 2011-02-24 14:46:24 -03:00
Sandor Dornbush 7ada8f18fb Fix chart image axis. 2011-02-23 18:56:53 -08:00
Rodrigo Damazio 887a77f4a3 Merging Bart's changes 2011-02-23 19:39:11 -03:00
Rodrigo Damazio 97bde67b1d Merging to head 2011-02-23 19:37:59 -03:00
Matthew Simmons 33c3668175 Disable debugging 2011-02-23 15:38:27 -05:00
Matthew Simmons 0158fc3a7a merge 2011-02-23 15:39:24 -05:00
Sandor Dornbush 72bb2ddb08 Address comments. 2011-02-23 12:32:07 -08:00
Sandor Dornbush 01c1a37fa2 Address comments. 2011-02-23 09:50:31 -08:00
Sandor Dornbush 35aa51d6a9 Request audio focus. 2011-02-22 22:13:44 -08:00
Sandor Dornbush ada42ee57d Request audio focus. 2011-02-22 22:10:03 -08:00
Matthew Simmons fe9b27ecf2 fix method name 2011-02-23 00:07:29 -05:00
Matthew Simmons e03f120a00 Remove ANT entries from preferences if the device does not support ANT. 2011-02-23 00:03:39 -05:00
Sandor Dornbush 59344f540d Tabs->spaces. 2011-02-22 19:06:49 -08:00
Sandor Dornbush e829f1fc1b Hide the first stats waypoint. 2011-02-22 16:52:22 -08:00
Rodrigo Damazio d9904eb5f1 Bring My Maps back 2011-02-22 19:55:27 -03:00
Matthew Simmons 10cd26af5e Upgrade ANT support libraries
Rework AntSensorManager (and subclasses) to use asynchronous ANT interfaces
Encapsulate message byte arrays with per-message classes
Add tests
2011-02-21 19:49:43 -05:00
Sandor Dornbush c1f649fc83 Remove strict mode violation from onLocationChanged 2011-02-18 16:12:49 -08:00
Rodrigo Damazio a4865f860d Adding missing fusion tables permission. 2011-02-18 14:07:59 -02:00
Sandor Dornbush 14fce8edfe Merge. 2011-02-17 22:09:47 -08:00
Sandor Dornbush 6826e3567d Fix build breakage. 2011-02-17 22:01:46 -08:00
Sandor Dornbush 250e8625a7 Shorten some strings in csv. 2011-02-17 21:33:47 -08:00
Sandor Dornbush 58530d6f72 Catalan update. 2011-02-17 21:02:35 -08:00
Sandor Dornbush 823fb3fca7 Merge. 2011-02-17 20:13:51 -08:00
Sandor Dornbush 29302c0891 Try to fix moving time. 2011-02-17 07:55:19 -08:00
Matthew Simmons 03570ebd43 merge 2011-02-16 11:35:41 -05:00
Sandor Dornbush 2a4a0d38e3 Merge import changes. 2011-02-16 07:42:25 -08:00
David Piggott 9be9127ad1 Tiny style improvement in ImportAllTracks 2011-02-16 08:19:57 +00:00
David Piggott 66dd1c01f0 Improve style and external storage access methods of ImportAllTracks 2011-02-16 01:29:20 +00:00
Matthew Simmons d8dce7938d Format the Fusion Tables URL locale-insensitively 2011-02-15 07:20:58 -05:00
Rodrigo Damazio 0701f5885e Merging Jared's heads. 2011-02-14 15:01:41 -02:00
Rodrigo Damazio ea3f660999 Merging Jared's heads. 2011-02-14 14:54:31 -02:00
Rodrigo Damazio 95a21ffe8a Merging Jared's heads 2011-02-14 14:51:38 -02:00
David Piggott 89d2cf8340 Tidy up incorrect indentation resulting from Eclipse misconfiguration 2011-02-14 11:17:14 +00:00
David Piggott 0eb676d3cd Improve style and usability of ImportAllTracks
Fix style issues pointed out in code review. Move acquireWakeLock method into
MyTracksUtils and call that from ImportAllTracks and ExportAllTracks. Replace
important Toast messages with dialogs.
2011-02-14 10:53:37 +00:00
Jared Casper ac1a762fa8 Make GPX importer more robust.
Handle the case where the first track point does not have a time
without segfaulting. (issue #316, #192)

Don't throw an exception on a negative time change. It isn't the end
of the world, just put a warning in the log and move on (without
updating the speed, since we really don't have a clue now). (issue #186)

Reset the element content even when we aren't in a track element.  GPX
can have elements outside of the <trk>.  This was causing problems
such as content in a <metadata> element before the <trk> being
included in the track name.

There could still be weirdness in the stats if some of the points have
a time element while others don't.  Hard to say what the best course
of action is in that case though, and may involve changes to the
TripStatisticsBuilder.
2011-02-13 21:33:31 -08:00
David Piggott 59a05262a1 Issue 45: Add ImportAllTracks to import GPX files from /sdcard/MyTracks/gpx
ImportAllTracks is essentially just a modification of ExportAllTracks that
uses the existing GpxImporter to import all GPX files found in
/sdcard/MyTracks/gpx. So that the import functionality can always be accessed,
the MyTracks Activity's MenuManager is altered so that the Tracks button shows
regardless of whether there are any tracks in the database (ImportAllTracks is
launched by a button in the lower right of the MyTracksList activity).

A Toast message shows if no GPX files are found; this serves as a hint to
users on where to put GPX files for import so that this addition should be
discoverable and useable without documentation.

Im
2011-02-13 22:15:48 +00:00
Jared Casper 5f91d187c8 Merge upstream. 2011-02-12 15:49:23 -08:00
Matthew Simmons 8d8bf311ed Added tag v1.1.1 for changeset 98c38ee0ac32 2011-02-10 23:33:29 -05:00
Matthew Simmons 69545c8a56 Update for 1.1.1 release. 2011-02-10 19:05:52 -05:00
Matthew Simmons a1868c0205 Move drawable-mdpi/* to drawable so Cupcake can see them 2011-02-10 17:48:44 -05:00
Matthew Simmons 12bc4f0da8 Rename API feature check method 2011-02-10 16:29:00 -05:00
Matthew Simmons 510b887042 Issue 311: Don't reuse the SQLiteQueryBuilder on Cupcake or Donut
due to Android issue 1587
2011-02-10 15:58:01 -05:00
Matthew Simmons ff7171daa2 Parse the HTTP status code correctly 2011-02-09 21:06:20 -05:00
Jared Casper 5b0dbd5d30 Be more explicit in testing the XML output of GpxTrackWriter.
Instead of producing the comparison strings in the tester just as they
are produced in the tested code, use string literals, thus actually
testing that the formatting code is working as expected.
2011-02-09 16:23:55 -08:00
Jared Casper 9c7fb25a94 Be more explicit in testing the XML output of GpxTrackWriter.
Instead of producing the comparison strings in the tester just as they
are produced in the tested code, use string literals, thus actually
testing that the formatting code is working as expected.
2011-02-09 16:23:55 -08:00
Jared Casper 2e24eab5ad Addressing review comments. 2011-02-09 15:13:54 -08:00
Jared Casper 8135ad4424 Addressing review comments. 2011-02-09 15:13:54 -08:00
Jared Casper 6ffa40e40d Export GPX 1.1 instead of 1.0.
The only thing not allowed in 1.1 currently used is the track color
tag, which is moved into the "<extensions>" tag to make it conform to
the 1.1 schema.
2011-02-09 10:54:13 -08:00
Jared Casper bc120176ca Export GPX 1.1 instead of 1.0.
The only thing not allowed in 1.1 currently used is the track color
tag, which is moved into the "<extensions>" tag to make it conform to
the 1.1 schema.
2011-02-09 10:54:13 -08:00
Jared Casper d50d4ae1c9 Export GPX 1.1 instead of 1.0.
The only thing not allowed in 1.1 currently used is the track color
tag, which is moved into the "<extensions>" tag to make it conform to
the 1.1 schema.
2011-02-09 10:54:13 -08:00
Jared Casper d34aa61e95 Export GPX 1.1 instead of 1.0.
The only thing not allowed in 1.1 currently used is the track color
tag, which is moved into the "<extensions>" tag to make it conform to
the 1.1 schema.
2011-02-09 10:54:13 -08:00
Jared Casper 04578a4ed1 Reorder waypoint and track writing on export.
The GPX schema requires waypoints to come before the track.

Waypoints are not currently used in TCX export, so there are no
changes there.

In KML files, both tracks and waypoints are "Placemark"s, so it
doesn't matter what order they come in there.

This does change the order they appear in CSV files, which could
potentially invalidate some assumptions made in downstream tools.
2011-02-09 10:42:34 -08:00
Jared Casper 3e5282a06d Reorder waypoint and track writing on export.
The GPX schema requires waypoints to come before the track.

Waypoints are not currently used in TCX export, so there are no
changes there.

In KML files, both tracks and waypoints are "Placemark"s, so it
doesn't matter what order they come in there.

This does change the order they appear in CSV files, which could
potentially invalidate some assumptions made in downstream tools.
2011-02-09 10:42:34 -08:00
Jared Casper f86cadb802 Reorder waypoint and track writing on export.
The GPX schema requires waypoints to come before the track.

Waypoints are not currently used in TCX export, so there are no
changes there.

In KML files, both tracks and waypoints are "Placemark"s, so it
doesn't matter what order they come in there.

This does change the order they appear in CSV files, which could
potentially invalidate some assumptions made in downstream tools.
2011-02-09 10:42:34 -08:00
Jared Casper c4fe4d87db Reorder waypoint and track writing on export.
The GPX schema requires waypoints to come before the track.

Waypoints are not currently used in TCX export, so there are no
changes there.

In KML files, both tracks and waypoints are "Placemark"s, so it
doesn't matter what order they come in there.

This does change the order they appear in CSV files, which could
potentially invalidate some assumptions made in downstream tools.
2011-02-09 10:42:34 -08:00
Matthew Simmons 7e5deeaab3 merge 2011-02-09 13:41:15 -05:00
Matthew Simmons 36c425d699 Add HTTP status code to the error message 2011-02-09 13:27:20 -05:00
Jared Casper a2c69c6144 Clean up formatting of numbers in gpx export.
Addresses issue #299 and ensures Latitude and Longitude are formatted
correctly as well.

Also orders the elements in the waypoint correctly according to the
schema: <ele> and <time> need to come before <name> and <desc>.
2011-02-09 10:25:28 -08:00
Jared Casper 58e3c0604d Clean up formatting of numbers in gpx export.
Addresses issue #299 and ensures Latitude and Longitude are formatted
correctly as well.
2011-02-09 10:25:28 -08:00
Jared Casper 7408849eb5 Clean up formatting of numbers in gpx export.
Addresses issue #299 and ensures Latitude and Longitude are formatted
correctly as well.

Also orders the elements in the waypoint correctly according to the
schema: <ele> and <time> need to come before <name> and <desc>.
2011-02-09 10:25:28 -08:00
Jared Casper b42142f692 Clean up formatting of numbers in gpx export.
Addresses issue #299 and ensures Latitude and Longitude are formatted
correctly as well.

Also orders the elements in the waypoint correctly according to the
schema: <ele> and <time> need to come before <name> and <desc>.
2011-02-09 10:25:28 -08:00
Rodrigo Damazio ddafdcf392 Merging proguard changes. 2011-02-09 15:40:18 -02:00
Matthew Simmons 95cbaf1993 Add a better status message to the exception wrapper.
Be more paranoid about exception messages.
2011-02-09 11:34:46 -05:00
Sandor Dornbush 43aa3c857d Added tag v1.1.0 for changeset b5645347b00e 2011-02-08 20:05:33 -08:00
Sandor Dornbush 964e0d6f41 Update for 1.1.0 release. 2011-02-08 20:03:18 -08:00
Matthew Simmons 5a1c52d3b5 Code review fix 2011-02-08 17:32:19 -05:00
Matthew Simmons 02c374b61e Map Fusion Tables uploading failures to the HTTP Exception that GData expects.
Fix typo in proguard disabling comment.
2011-02-08 17:23:39 -05:00
Matthew Simmons f2094e049a Disable proguard 2011-02-08 17:10:59 -05:00
Sandor Dornbush 8ff2b3b090 Merge chart changes. 2011-02-08 07:28:23 -08:00
Sandor Dornbush eeaa363132 Minor chart fixes. 2011-02-07 21:50:12 -08:00
Sandor Dornbush 43e51848fc Don't trap runtime exceptions. 2011-02-07 17:03:06 -08:00
Sandor Dornbush 8b17117220 Unify chart display code. 2011-02-06 19:37:43 -08:00
Sandor Dornbush a4e06a4ce0 Merge Matthew's changes. 2011-02-04 15:35:16 -08:00
Sandor Dornbush 4d55f5ebdb Merge Matthew's changes. 2011-02-04 15:34:22 -08:00
Sandor Dornbush 268f3c77c2 Merge FR translations. 2011-02-04 15:32:28 -08:00
Sandor Dornbush ce73718620 Fine tune JA translation. 2011-02-04 15:28:23 -08:00
Sandor Dornbush d307c58f87 Fine tune JA translation. 2011-02-04 15:23:20 -08:00
Sandor Dornbush e7ec021da8 Address comments. 2011-02-04 15:13:33 -08:00
Matthew Simmons ca94fc7a96 Reuse existing messages 2011-02-04 17:15:34 -05:00
Matthew Simmons 9d650c4885 Rearrange Fusion Tables upload progress reporting 2011-02-04 16:21:20 -05:00
Sandor Dornbush c6d9be499c Merge heads. 2011-02-04 12:16:36 -08:00
Matthew Simmons 0e78e8b3f9 Remove unused imports 2011-02-04 15:09:03 -05:00
Matthew Simmons 2a99278b52 SQL-escape the track name
Don't catch HTTPException in runUpdate/query -- let GDataWrapper do that for us
2011-02-04 15:01:21 -05:00
Sandor Dornbush 4a47c096f7 Possible fix for chart view. 2011-02-04 10:41:17 -08:00
Olivier Beyssac bd961be055 Updating French translations. 2011-02-04 16:25:54 +00:00
boiledorange73 525fea80b8 One entry went back... Corrects it. 2011-02-04 10:44:18 +09:00
boiledorange73 6f92ae6a59 JP translate : Deleted duplicated entries in strings.xml 2011-02-04 10:40:56 +09:00
marian.steinbach 8bad6c0f54 Changed references to 'Docs' to 'Text & Tabellen'; Added non-translated lines as comments for easier file comparison; Removed trailing white spaces 2011-02-04 00:39:44 +01:00
boiledorange73-201102 91cca16f40 JP trans: small change (LAST) 2011-02-03 00:18:52 +09:00
boiledorange73 a0697a048d JP translate: small changes 2011-02-02 16:48:38 +09:00
boiledorange73 d22c6aae79 JP translate 2011-02-02 15:15:48 +09:00
Rodrigo Damazio 83997980ba Merging German translation 2011-02-02 01:19:40 -02:00
Rodrigo Damazio 4d9bdd1c12 Fixing typo in Proguard config. 2011-02-01 21:46:45 -02:00
Rodrigo Damazio 163a73722e Fixing translation leftovers from Fusion Tables and other changes.
The strings that need updating are commented-out, as a reference to translators.
(many other strings are simply missing, I didn't do anything about those)
2011-02-01 21:39:26 -02:00
marian.steinbach 65d17decb8 Added missing labels 2011-02-01 09:06:29 +01:00
Sandor Dornbush 1aa300f97e Merge in Rodrigo's changes. 2011-01-31 20:39:15 -08:00
marian.steinbach 8fbb30bded Added some missing ANT-related labels, deleted obsolete sensor labels, changed 'Energie' (power) to 'Kraft' 2011-01-31 23:37:04 +01:00
Rodrigo Damazio 6b0f1a0c10 Merging 2011-01-31 14:57:22 -02:00
Rodrigo Damazio 1cee590eca Adding some debugging information back 2011-01-31 14:56:54 -02:00
Sandor Dornbush 9ff370ee27 Clean up zh-cn strings.xml 2011-01-30 21:49:43 -08:00
Sandor Dornbush cd0057ea5a A bunch of fusion tables fixes. 2011-01-30 21:39:43 -08:00
Sandor Dornbush 2c0a294b6a A bunch of fusion tables fixes. 2011-01-30 21:39:27 -08:00
Rodrigo Damazio 3e09bd5c60 Fixing ProGuard support by removing usage of reflection and ignoring a few unused classes. 2011-01-30 01:20:37 -02:00
Rodrigo Damazio 0a99d7cebb Changing AndroidMock config to look for API level 9 classes. 2011-01-29 22:26:26 -02:00
Sandor Dornbush 3138e3edc7 Remove reference to old string. 2011-01-27 23:11:15 -08:00
Sandor Dornbush 99ab34ad0b Merge spanish update. 2011-01-23 21:38:56 -08:00
Sandor Dornbush 9b7923f8f5 Merge Matthew's changes. 2011-01-21 22:21:39 -08:00
Matthew Simmons cfcbe7f107 Refactor platform adapter logic 2011-01-21 18:22:41 -05:00
Matthew Simmons 5fb27ab186 Bump the database version, update the migration code 2011-01-21 17:54:37 -05:00
Matthew Simmons 36b1a3c020 Rename locatePlatformAdapter to createPlatformAdapter 2011-01-21 17:22:30 -05:00
Matthew Simmons baccb5d12e Use reflection to find the platform adapters 2011-01-21 17:09:25 -05:00
Matthew Simmons adc4621711 self-review 2011-01-21 16:32:27 -05:00
Matthew Simmons a8d78664e9 Added support for backing up sensors 2011-01-21 16:28:04 -05:00
Sandor Dornbush 9fab4eb088 Update spanish translation. 2011-01-19 22:41:50 -08:00
Sandor Dornbush 0d0f1315ff Add spain spanish translation. 2011-01-19 22:28:46 -08:00
Sandor Dornbush 555598c155 Only show sensor options for the right sensor type. 2011-01-13 21:28:10 -08:00
Sandor Dornbush f49fa23f69 Merge from head. 2011-01-13 21:07:15 -08:00
Rodrigo Damazio b732064f88 Moving assets to their own repository. 2011-01-13 22:26:44 -02:00
Rodrigo Damazio 1f99a381eb Merging Fusion Tables changes. 2011-01-13 22:23:51 -02:00
Sandor Dornbush 81b610cc4c Change the code to use the new icons + delete the old icon files. 2011-01-13 15:17:20 -08:00
marian.steinbach b0a0bfc888 Simplified icons for Record Track and Stop Recording, both drawable and assets 2011-01-12 19:53:52 +01:00
marian.steinbach 6221ccb53b Merging changes from main repository 2011-01-12 19:17:47 +01:00
leifhendrik cbe1da2d68 Keeping db version 18. Bug fixes. 2011-01-11 15:01:44 -08:00
Sandor Dornbush 24297e373c Merging to head + return early to fully ignore close locations. 2011-01-11 14:06:06 -08:00
leifhendrik 99d14a559c Synced with head. Resolved conflicts. 2011-01-11 13:30:03 -08:00
leifhendrik 08339a1f65 String cleanups and responded to most comments. 2011-01-11 12:29:22 -08:00
Rodrigo Damazio 4e3ad38087 Merging Matthew's changes. 2011-01-10 15:41:41 -02:00
Sandor Dornbush 63c97fadc6 Merge in SendToDocs changes. 2011-01-09 22:21:03 -08:00
Matthew Simmons 45633ad7e8 Code review comments 2011-01-07 14:43:25 -05:00
Matthew Simmons 8508decd5c fix url 2011-01-07 14:04:59 -05:00
Matthew Simmons 315f47bf30 Add License button to the About dialog box.
Add link to privacy policy to the About dialog box.
2011-01-07 13:22:30 -05:00
Matthew Simmons 12f8d79d84 unconcatenate constant 2011-01-06 15:42:05 -05:00
Rodrigo Damazio 710690e2d2 Merging to head. 2011-01-06 18:00:11 -02:00
Rodrigo Damazio 03bfbe81d0 Merging Sandor's change. 2011-01-06 15:08:42 -02:00
Matthew Simmons c990fb6fe7 don't hardcode the encoding in the tcx writer either 2011-01-06 11:53:10 -05:00
Sandor Dornbush 9b31cd63a4 Fix overcounting distance. 2011-01-05 22:58:53 -08:00
Rodrigo Damazio dee3ccdf77 Cleaning up deps 2011-01-05 23:09:16 -02:00
Matthew Simmons de23a32c96 Write the VM's charset in the GPX file's XML header, rather than using a
hard-coded value.  Per the Android docs, the default charset for Android is
UTF-8.
2011-01-05 19:54:49 -05:00
Matthew Simmons 2beb840a5c Code review 2011-01-05 18:26:01 -05:00
Matthew Simmons f748d76549 Move the methods which initiate the SendToDocs GData calls into their own class.
This makes SendToDocs easier to understand and easier to test.
2011-01-05 17:16:01 -05:00
Rodrigo Damazio 9d9a326c2b Merging Bart's fix. 2011-01-05 17:00:12 -02:00
marian.steinbach 9184827195 Pre-production files for menu icons (second attempt) 2011-01-05 09:08:51 +01:00
marian.steinbach cb533c954b Merged remote changes 2011-01-05 09:00:36 +01:00
marian.steinbach ead876036d Removing icons from /MyTracks/assets 2011-01-05 08:48:12 +01:00
Sandor Dornbush cfa25eccb1 Fix export all TCX. 2011-01-04 21:57:49 -08:00
Sandor Dornbush b0d6233de6 Merge from head and address comment. 2011-01-04 21:00:12 -08:00
bartn b07b8a1aaa Fix broken test and avoid mocking provider. 2011-01-04 16:19:32 -08:00
leifhendrik a68cdaf2ba More cleanups. Towards a working solution. 2011-01-04 10:11:03 -08:00
marian.steinbach 16641b9193 Pre-production files for menu icons 2011-01-04 09:10:30 +01:00
Sandor Dornbush 0469a90992 Merging from head. 2011-01-03 16:47:35 -08:00
Sandor Dornbush 6dc3e5ab7a Remove trailing white space. 2011-01-03 16:44:34 -08:00
Rodrigo Damazio 82012fa623 Merging from head. 2011-01-03 13:05:30 -02:00
marian.steinbach 7ddd254bb1 Added various missing strings, modified some existing translations 2011-01-03 00:37:56 +01:00
marian.steinbach 464858cfdf Slight comment clean-up 2011-01-03 00:37:12 +01:00
marian.steinbach 30db23255d New menu icons (according to pre-2.3-guidelines) 2011-01-02 22:50:02 +01:00
Sandor Dornbush 868c1ef891 Merge from head. 2010-12-31 09:14:09 -08:00
Sandor Dornbush b961356b7b Addressed comments.
Merge from head.
2010-12-31 09:11:22 -08:00
bartn 2e32d6c574 Address comments and fix broken test. 2010-12-31 00:15:12 -08:00
bartn a31e5aab79 Address comments. 2010-12-30 19:46:14 -08:00
bartn ae4f9565bd Chart drawing refactoring, part 1. Better handle label drawings for multiple data series, fix a few bugs and introduce fine grained zoom settings. 2010-12-29 17:52:23 -08:00
bartn f33ba10b96 Merge with 5ad4c64449adf707f3a0619d568deac185e7ff05 2010-12-28 17:14:37 -08:00
Sandor Dornbush 904c519091 Move untranslated strings to a new resources file. 2010-12-28 17:01:23 -08:00
bartn a0db837910 Merge with 0d6e42a25349b4c1099e8a03a37e22cc559da048 2010-12-28 16:58:56 -08:00
Sandor Dornbush 51cb5db8b4 Add ANT+ sensor support. 2010-12-28 16:29:26 -08:00
bartn c328728e0c Use LocationIterator for scalability and instantiate MyTracksLocation to make sure that sensor data is properly read. 2010-12-28 16:19:34 -08:00
Sandor Dornbush 3384ef67a6 Addressed comments. 2010-12-28 14:39:26 -08:00
bartn e89c549706 Merge with 6f18dfaa4b33c178829a3cdfa374f0ac6a55d5c7 2010-12-28 11:17:43 -08:00
leifhendrik 3c67ac73da Support uploading of tracks to fusion tables. Remove support for maps data api. 2010-12-28 10:40:49 -08:00
Sandor Dornbush 656349e6c5 Use scaled pixels for chart view.
Use better colors for sensor data.
2010-12-27 09:06:08 -08:00
Rodrigo Damazio df2af0185c Using preferences' apply() instead of commit() on Gingerbread. 2010-12-24 05:41:03 -02:00
Rodrigo Damazio 913d30f2de Merge from head 2010-12-24 05:27:56 -02:00
Hauke Ingmar Schmidt e96172b698 * Fixed some typos. 2010-12-23 16:25:34 +01:00
Hauke Ingmar Schmidt 0c241f683d * Did a cross check with current english file, added keys
* Stoppen->Anhalten
*
2010-12-23 15:04:10 +01:00
bartn a19097de2b Get rid of unused getTrackPoints(...). 2010-12-22 16:54:13 -08:00
bartn f6feeb9d1e Fix a typo. 2010-12-22 16:03:10 -08:00
bartn f205e6f9cc Make sure we don't upgrade twice on newer DBs. Prepare for upcoming DB changes v19. 2010-12-22 16:02:05 -08:00
bartn 4e543e6068 Merge with f31f08b12616cde71b9f6df34a92a66c35140d92 2010-12-22 15:30:47 -08:00
bartn 176062f11c Address comments (round #2). 2010-12-22 14:39:04 -08:00
bartn 4d88191171 Address comments. Use bulkInsert to improve performace (2min for 20K points before vs. 10 sec now). 2010-12-22 14:24:26 -08:00
Sandor Dornbush 025ea1d094 Address comments. 2010-12-21 09:31:54 -08:00
bartn a4283d545a Add missing Java class with unit tests. 2010-12-20 14:51:00 -08:00
bartn 52fa2aace9 Finalize the new interface, fix bugs and add unit tests. 2010-12-20 14:50:27 -08:00
Sandor Dornbush fa711cf142 Address comments + add more tests. 2010-12-19 22:11:41 -08:00
bartn 70bc7e53fe Fix a bug in getLocationIterator 2010-12-17 15:09:58 -08:00
bartn 56f22aa073 Addressed comments + new method getLocationId() 2010-12-17 13:57:51 -08:00
Sandor Dornbush 878a87278d Address comments. 2010-12-17 06:59:43 -08:00
bartn c4a539d2ba Initial implementation of getLocationIterator 2010-12-16 21:09:12 -08:00
bartn 4225e81080 Added missing change. 2010-12-16 17:58:28 -08:00
bartn 8fd4887f10 Merge with c31ef4ac66823a80d02265da7810432b51ce01ed 2010-12-16 17:49:01 -08:00
bartn 0e397797b4 Addressed Rodrigo's comments. 2010-12-16 17:46:27 -08:00
bartn e6c8458ce7 Initial draft of the upcoming changes to simplify track points management. 2010-12-16 14:13:09 -08:00
bartn 50ea9919af Add myself to the About box, as suggested by Rodrigo. 2010-12-16 12:31:35 -08:00
Sandor Dornbush 67f62df894 Fix a few bad characters in Catalan files. 2010-12-16 08:35:16 -08:00
Sandor Dornbush 0da0280156 Address one last comment. 2010-12-15 16:53:38 -08:00
Sandor Dornbush fa713eac4a Address comments. 2010-12-15 16:49:37 -08:00
Sandor Dornbush 2c7d56ab34 Adding Catalan translation. 2010-12-15 08:49:02 -08:00
Sandor Dornbush e340268dd0 Minor fixes and respond to comments. 2010-12-13 22:34:58 -08:00
Sandor Dornbush affec6720b Update tests.
Lazily allocate stats objects on waypoints.
2010-12-12 20:02:12 -08:00
Sandor Dornbush 5047826a74 Minor fixes. 2010-12-11 22:06:55 -08:00
Sandor Dornbush 33d9230442 Refactor the waypoint insertion code. 2010-12-11 19:14:47 -08:00
Rodrigo Damazio 607b174c5f Fixing some StrictMode violations, making it softer for others which the Android runtime itself triggers. 2010-12-10 16:40:22 -02:00
Rodrigo Damazio 6b4ea71404 Enabling Proguard to reduce APK size. 2010-12-10 15:39:48 -02:00
Rodrigo Damazio 014322c240 Updating new projects to API level 9 and adding xlarge screen size support. 2010-12-10 14:41:21 -02:00
Rodrigo Damazio b789f84151 Adding new method required in Gingerbread. 2010-12-10 14:36:24 -02:00
Rodrigo Damazio 19d5fe1ba6 Merging gingerbread changes to head. 2010-12-10 14:30:29 -02:00
Rodrigo Damazio 93b95954c4 Updating to API level 9 2010-12-10 14:28:25 -02:00
Rodrigo Damazio fb7a2aaa32 Enabling strict mode in non-release builds 2010-12-10 14:28:11 -02:00
Rodrigo Damazio 3105eacd4d Adding Gingerbread platform adapter 2010-12-10 14:26:14 -02:00
Rodrigo Damazio 215893214f Merging sensor and library changes together. 2010-12-07 18:04:28 -02:00
Bartlomiej Niechwiej 30e01d6700 Revert back local changes. 2010-12-04 23:54:53 -08:00
Bartlomiej Niechwiej 94cfc5d7d6 Merge with 3af20c63ed16c56b6e5e3d854272ec1fb8074570 2010-12-04 23:50:16 -08:00
Sandor Dornbush 471b32cce1 Fix announcement available setting. 2010-12-03 13:11:56 -08:00
Bartlomiej Niechwiej 036b34e91d Fix upgrade SQL. 2010-12-03 00:43:00 -08:00
Bartlomiej Niechwiej 77f7f8c1ed Merge with c6c03f517e6dc6d0da60ace9bd21311c9b20f4dc 2010-12-03 00:35:44 -08:00
Bartlomiej Niechwiej e6fc991d2a DO NOT PULL (local changes) 2010-12-03 00:35:25 -08:00
Sandor Dornbush 060881777d A few more minor fixes. 2010-12-01 20:37:11 -08:00
Sandor Dornbush 6e567fa725 Fix broken build and add icon for sensor state. 2010-12-01 17:56:28 -08:00
Sandor Dornbush 7e4c01937f Minor fixes. 2010-12-01 17:28:22 -08:00
Sandor Dornbush 06a00e6482 Merge from head + bug fixes. 2010-12-01 14:24:47 -08:00
Bartlomiej Niechwiej 242df42f55 Fixed a few NumberFormatExceptions as found in the market reports. 2010-11-28 17:44:37 -08:00
Rodrigo Damazio 8d78c16c8a Adding more tests and other minor fixes. 2010-11-28 03:37:27 -08:00
Rodrigo Damazio db2b05eb7f Moving more constants to the library. 2010-11-28 03:17:24 -08:00
Rodrigo Damazio 282b1090ba Merging from head 2010-11-28 03:00:51 -08:00
Rodrigo Damazio 4f6c9fa866 Creating a library to hold code and resources common to both My Tracks and third-party apps. 2010-11-28 02:35:30 -08:00
Rodrigo Damazio 9375842c71 Moving intent constants to XML file. 2010-11-28 00:48:05 -08:00
Rodrigo Damazio ea3fca0f1b Addressing review suggestions for third-party apps. 2010-11-27 02:52:04 -08:00
Rodrigo Damazio 5971d67a66 Moving signal strength sampling into a separate app. 2010-11-26 23:51:32 -08:00
Rodrigo Damazio 9f5fa880d6 Closing branch v1.0.20-bugfix 2010-11-26 15:01:06 -08:00
Rodrigo Damazio 357b68dd4f Merging 1.0.21 changes back to the default branch 2010-11-26 15:00:41 -08:00
Rodrigo Damazio 384f3f5698 Added tag v1.0.21 for changeset f9230d18271a 2010-11-26 14:57:35 -08:00
Rodrigo Damazio 4577ff9628 Releasing 1.0.21 2010-11-26 14:57:03 -08:00
Rodrigo Damazio e6cd9f524d Replacing tabs with spaces 2010-11-24 19:21:29 -08:00
Rodrigo Damazio 3dad56621f Transplanting Sandor's bugfix change for dialogs in old devices. 2010-11-24 18:57:40 -08:00
Rodrigo Damazio 6c9a225b64 Merging Bart's changes into the bugfix branch. 2010-11-24 18:27:40 -08:00
Rodrigo Damazio 3bbb9bd95d Making a 1.0.20 bugfix branch 2010-11-24 18:26:30 -08:00
Bartlomiej Niechwiej a4f855ccd8 Addressed Rodrigo's comments. 2010-11-24 16:26:12 -08:00
Bartlomiej Niechwiej 4d80af4e06 An emergency fix for a NPE in the service. 2010-11-24 15:46:57 -08:00
Rodrigo Damazio 7abce12499 Merging from head. 2010-11-23 22:13:01 -08:00
Rodrigo Damazio 7b1302c011 Adding broadcasts for when we start/stop recording.
Pause/resume constants are there so apps consider them, but not yet implemented.
2010-11-23 22:12:16 -08:00
Rodrigo Damazio 66d23b7eac Fixing permission descriptions so they show up properly in application manager 2010-11-23 22:11:04 -08:00
Rodrigo Damazio dc0255509b Adding permissions for third-party apps. 2010-11-23 21:53:59 -08:00
Rodrigo Damazio 6661f91eb5 Added tag v1.0.20 for changeset b259d09396e5 2010-11-23 15:20:15 -08:00
Rodrigo Damazio 2eb36aedeb Releasing version 1.0.20. 2010-11-23 15:18:39 -08:00
Bartlomiej Niechwiej 0e623ebfeb Fix a memory leak that was observed each time a recording session was stopped. 2010-11-21 23:49:17 -08:00
Rodrigo Damazio ffb73569e9 Merging Bart's fixes. 2010-11-21 21:11:35 -08:00
Bartlomiej Niechwiej 713cda9455 Addressed Rodrigo's comment. 2010-11-21 21:07:59 -08:00
Bartlomiej Niechwiej 223721cca8 Nullify bineder/checkListener on destroy. 2010-11-21 20:55:44 -08:00
Rodrigo Damazio e7479c8a93 Fixing periodic task restarting. 2010-11-21 20:45:25 -08:00
Bartlomiej Niechwiej 224fe0069b Make sure there is only one instance of TrackRecordingService at a time. 2010-11-21 19:33:14 -08:00
Rodrigo Damazio cb97847392 Addressing comments from a475cd4d33. 2010-11-21 00:44:34 -08:00
Rodrigo Damazio 6a29531467 Second attempt at proper task startup. 2010-11-20 16:21:59 -08:00
Rodrigo Damazio 262e249d2c Also fixing splitter initialization, just for completeness. 2010-11-20 05:46:38 -08:00
Rodrigo Damazio 77479efaef Fixing TTS initialization. 2010-11-20 05:43:09 -08:00
Rodrigo Damazio 898863a8d9 Merging Sandor's second head by ignoring it 2010-11-19 18:37:27 -08:00
Sandor Dornbush 05d555f98d Fix the end track confirmation dialog. 2010-11-19 17:23:27 -08:00
Rodrigo Damazio 868092db10 Fixing intiialization before context is available. 2010-11-19 14:26:11 -08:00
Rodrigo Damazio 7a738c2eca Moving the end recording method to more reasonable location. 2010-11-18 17:14:56 -08:00
Rodrigo Damazio b304dbcba6 Fixing wake lock being held for too long in the service. 2010-11-18 17:13:20 -08:00
Rodrigo Damazio 6e28a5daa4 Merging Matthew's fix for issue 137. 2010-11-18 16:41:21 -08:00
Bartlomiej Niechwiej 8f4f9660ed Addressed Sandor's comments. 2010-11-18 15:42:02 -08:00
Bartlomiej Niechwiej 2d01535651 Fixed a NPE introduced after refactoring dialogManager. 2010-11-17 22:39:50 -08:00
Bartlomiej Niechwiej e57d4669fc Revert API key changes. 2010-11-17 22:25:20 -08:00
Bartlomiej Niechwiej f47c599dea Merge with 63eb7915dafe329e8f06cc33c56122ee15ea6df7 2010-11-17 22:20:15 -08:00
Bartlomiej Niechwiej 7a693a90f7 Make the app single process only, including the following fixes:
1) Simplify SharedPreferences management
2) Shut down signalManager/splitManager to avoid random crashes
3) Get rid of sharedPreferencesChanged from the service interface

All tests pass.
2010-11-17 22:18:50 -08:00
Bartlomiej Niechwiej 9cf51de3f7 Fix a typo in onDestroy. 2010-11-17 20:07:34 -08:00
Matthew Simmons 5089c20cd6 Code review fixes 2010-11-16 11:39:08 -05:00
Bartlomiej Niechwiej a0da23f86a Various fixes to shared preferences. 2010-11-15 23:09:18 -08:00
Rodrigo Damazio 44d24b57c6 Making telephony support optional. 2010-11-15 22:04:48 -08:00
Rodrigo Damazio c143d774d4 Merging Aaron's changes. 2010-11-15 21:50:46 -08:00
Matthew Simmons 9e92240dd0 More self-review 2010-11-15 21:46:19 -05:00
Sandor Dornbush d2c586b096 Fix StatusAnnouncer thread for initialization and prefs in service. 2010-11-15 18:20:10 -08:00
Matthew Simmons fbfbb9408a Self-review 2010-11-15 18:46:23 -05:00
Matthew Simmons fb56665dec Rework authorization failure retry. The retry needs to be synchronous with
the original runone.
2010-11-15 18:37:42 -05:00
Bartlomiej Niechwiej 5b65c216b6 More tests. 2010-11-12 22:18:38 -08:00
Rodrigo Damazio 9ad98c5970 Merging Sandor's changes 2010-11-12 14:37:04 -08:00
Aaron Brown cae9d0f2e5 updated MyTracks/AndroidManifest.xml for inclusion of uses-feature 2010-11-12 17:11:56 +10:00
Sandor Dornbush c0d267c63e Minor formating fixes. 2010-11-11 21:41:39 -08:00
Sandor Dornbush 70704b0a5e Move navcontrols icon decleration to xml. 2010-11-11 21:38:24 -08:00
Sandor Dornbush b135275201 Minor fix for dialog manager. 2010-11-11 16:15:11 -08:00
Bartlomiej Niechwiej 7e1eae6681 Addressed Sandor's comments and added more unit tests and fixed 2 NPEs. 2010-11-11 10:55:15 -08:00
Bartlomiej Niechwiej 30f5d6dc85 Fix two NPEs and add more test coverage. 2010-11-11 00:31:56 -08:00
Sandor Dornbush a50dd1168b Fix format error. 2010-11-09 13:57:19 -08:00
Sandor Dornbush 62fa1620aa Actually add the dialog tests. 2010-11-08 11:31:14 -08:00
Sandor Dornbush a0d42c8b59 Add basic tests to the DialogManager. 2010-11-08 11:28:39 -08:00
Bartlomiej Niechwiej a21663da61 Fix a NPE (replace MyTracks.getInstance() with the parent activity). 2010-11-06 23:37:14 -07:00
Bartlomiej Niechwiej 67a0382942 Fixed another bug reported by users (division by zero).
The issue was most likely related to a race condition (selectedTrackId can change in the UI thread, while the track is being processed in the handler thread).

Simulated slow drawing by adding 50ms, works pretty cool :)
2010-11-06 00:31:52 -07:00
Bartlomiej Niechwiej f5c2467d01 Fix StringIndexOutOfBoundsException in ChartsExtendedEncoder.getEncodedValue().
Found in user error reports (3rd top issue):
java.lang.StringIndexOutOfBoundsException
at com.google.android.apps.mytracks.util.ChartsExtendedEncoder.getEncodedValue(ChartsExtendedEncoder.java:45)
at com.google.android.apps.mytracks.util.ChartURLGenerator.getChartUrl(ChartURLGenerator.java:162)
at com.google.android.apps.mytracks.util.ChartURLGenerator.getChartUrl(ChartURLGenerator.java:60)
at com.google.android.apps.mytracks.util.StringUtils.generateTrackDescription(StringUtils.java:366)
at com.google.android.apps.mytracks.io.SendToMyMaps.doUpload(SendToMyMaps.java:581)
at com.google.android.apps.mytracks.io.SendToMyMaps.access$10(SendToMyMaps.java:538)
at com.google.android.apps.mytracks.io.SendToMyMaps$5.run(SendToMyMaps.java:517)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.os.HandlerThread.run(HandlerThread.java:60)
2010-11-05 22:52:42 -07:00
Bartlomiej Niechwiej a3abcc8094 Provide a workaround for binding to the service once it has been started. It fixes the failing tests (4). 2010-11-05 20:45:06 -07:00
Sandor Dornbush edf439f301 Merge Bart's bug fixes and tests. 2010-11-05 15:37:20 -07:00
Sandor Dornbush 2245563250 Fix broken build. 2010-11-05 14:51:06 -07:00
Bartlomiej Niechwiej bca21d5515 Addressed Rodrigo's comments. 2010-11-05 10:11:55 -07:00
Bartlomiej Niechwiej 89cae2e7c9 Fix a regression related refactoring recordingTrackId management.
In particular:
1) Add a workaround to {start/end}Recording to update recordingTrackId to trigger a notification
2) Add a bunch of unit tests for MyTracks
3) Clear minor style issues in a few classes
2010-11-04 23:32:31 -07:00
Sandor Dornbush 26c381a4c4 Address Bart's comments and more dialog clean up. 2010-11-04 17:44:08 -07:00
Sandor Dornbush 4bc5aa050c Add tests for the TempFileCleaner. 2010-11-04 17:07:59 -07:00
Rodrigo Damazio cd44b0d180 Merging Sandor's changes. 2010-11-03 21:08:50 -02:00
Rodrigo Damazio 59ee91ca5d Merging my own changes. 2010-11-03 20:59:32 -02:00
Rodrigo Damazio 59165a7033 Ignoring Matthew's second head by no-op merging it. 2010-11-03 20:53:50 -02:00
Rodrigo Damazio 93d242c05f Merging Matthew's first head. 2010-11-03 20:42:35 -02:00
Rodrigo Damazio 4bbb6591e3 Merging Bart's changes. 2010-11-03 19:59:35 -02:00
Sandor Dornbush 7df8025f6a Merge with head and address comments. 2010-11-03 12:53:12 -07:00
Bartlomiej Niechwiej f19c52f40e Addressed Sandor's comments. 2010-11-02 08:31:21 -07:00
Bartlomiej Niechwiej b7840779fe Revert API Key Change. 2010-11-02 08:26:31 -07:00
Rodrigo Damazio 28042a8cc9 Adding tests to voice announcements.
If anyone asks, I didn't write this code.
2010-11-02 02:19:43 -02:00
Matthew Simmons b2907226bf Code review comments 2010-11-01 15:21:33 -04:00
Matthew Simmons a2f46821f5 Fix author line 2010-11-01 14:32:19 -04:00
Matthew Simmons b7385cd4cc Combine b2f2f9e9e9 and 8774b3663c
Allow users to choose the default track name policy.  By default, we'll switch
to a new, timestamp-based name.  If they change the pref, they'll get the
old-style 'track n' style.
2010-11-01 13:48:33 -04:00
Matthew Simmons 718c65818c Allow users to choose the track name policy. 2010-11-01 12:59:56 -04:00
Rodrigo Damazio 91e2293606 Adding proper AndroidMock configuration - requires setting eclipse variables 2010-11-01 05:30:16 -02:00
Rodrigo Damazio 3c4a921f9a Addressing review suggestions 2010-11-01 05:27:04 -02:00
Rodrigo Damazio d04b333126 Merging 2010-11-01 02:05:42 -02:00
Rodrigo Damazio 0a4bef4d9a Fixing concurrent access to the content provider by making it have a single instance in the same process as the service. 2010-10-29 17:35:54 -02:00
Bartlomiej Niechwiej a0f090a83a Bug fixing and refactoring:
1) Make sure no one but service changes recordingTrackId (which is owned by it)
2) Cache sharedPreferences
3) Clear recordingTrackId if it doesn't correspond to a valid track or the service is not recording
4) More unit tests
2010-10-28 22:49:01 -07:00
Bartlomiej Niechwiej dc8ee5943c Merge with c10bc69662325f00bf166b783cc3ab1b78ccfed9 2010-10-28 20:48:01 -07:00
Bartlomiej Niechwiej 9132c36aa7 Use a test android:apiKey instead of the official one. 2010-10-28 20:47:42 -07:00
Sandor Dornbush 224c0d759f Minor fixes noticed on first review. 2010-10-28 17:13:59 -07:00
Sandor Dornbush ffcaca2db1 Refactor a few 100 lines of code out of the main Activity. 2010-10-28 17:08:59 -07:00
Sandor Dornbush 409fc4a43b Address Bart's comments. 2010-10-28 15:07:01 -07:00
Sandor Dornbush 16968f3f2b Fix copyright notice. 2010-10-28 14:50:03 -07:00
Sandor Dornbush e3fd0dce21 Undo changes to the eclipse prefs. 2010-10-28 14:47:00 -07:00
Sandor Dornbush 53b6b6deca Add tests to ChartValueSeries.
Also other minor fixes.
2010-10-28 14:43:31 -07:00
Rodrigo Damazio 26f47a50d0 Fixing issue 34: Not making voice announcements during a phone call 2010-10-27 03:07:17 -02:00
Bartlomiej Niechwiej 3cf77374c4 Fix merge. 2010-10-26 20:19:54 -07:00
Bartlomiej Niechwiej a1129c3f0f Merge with c58e4b8519d3ed6959a96192286b83aa1b77f6f3 2010-10-26 20:17:15 -07:00
Bartlomiej Niechwiej 2fe74603a3 Merge with 96ee47b2d8639a0cf62a387f3360640643fbeb0a 2010-10-26 20:14:41 -07:00
Bartlomiej Niechwiej 54d517363d Merge with e34329d612571554d6424d5941dfad57e35612a0 2010-10-26 19:39:46 -07:00
Bartlomiej Niechwiej 948fe0c0e6 Merge with 68eb8dff3a87698ace057447dff40a07cf673f2e 2010-10-26 19:39:20 -07:00
Bartlomiej Niechwiej dbd8e6c0e9 Merge with 5ed61c63ba59f4748231ea14bbbc222423d0b08a 2010-10-26 19:38:51 -07:00
Bartlomiej Niechwiej 02b5601933 Remove unnecessary log. 2010-10-26 19:32:24 -07:00
Sandor Dornbush 3ed40608a2 Merging from head. 2010-10-26 14:44:31 -07:00
Bartlomiej Niechwiej 36d7c2dd91 Allow to move the app to SD card (by default goes to internal storage). This is a frequently requested feature (based on market feedback). 2010-10-26 00:33:38 -07:00
Bartlomiej Niechwiej fa7ef68851 Addressed Sandor's comments. 2010-10-25 22:35:38 -07:00
Matthew Simmons f84877a4fc Issue 86: Remove - from the list of disallowed characters for filenames. 2010-10-25 14:59:20 -04:00
Matthew Simmons 261fb62e24 Changed the default new track name from "track %d" to "date time", where "date"
is a short, locale-aware version of the track's start date, and "time" is the
track's start time.
2010-10-25 14:15:16 -04:00
Bartlomiej Niechwiej 48d8aa4cd8 Introduce an interface to decouple platform specific API from the classes that require it. Also:
1) Put the service into foreground to prevent from being killed by the system
2) Fix a bug the prevented MyTracks from running on pre-Eclair devices
2010-10-24 21:24:11 -07:00
Bartlomiej Niechwiej 95ff0d3db6 Fix a typo in shared preferences and minor cleanup. 2010-10-24 18:55:35 -07:00
Bartlomiej Niechwiej 2dc1d914c0 Several fixes to the service and more test coverage.
Notably:
1) Fixed isRecording to not return false if service is down (for instance, it may be being restarted)
2) Added more checks to prevent from invalid starting/stopping (if in already in progress/not started).
2010-10-24 14:16:43 -07:00
Bartlomiej Niechwiej fc06701009 Fix several bugs and clean up statistics management.
1) Decouple clock from TripStatisticsBuilder.
2) Introduce a new param to constructor to automatically resume at given time
3) Fix various statsbuilder initialization issues in the service (wrong order, missing initialization)
2010-10-24 03:30:58 -07:00
Bartlomiej Niechwiej ee4f334296 Fixed a NPE under certain circumstances (move initialization to onCreate()). 2010-10-24 03:26:32 -07:00
Bartlomiej Niechwiej cac2395237 More unit tests for TracksRecordingService and fix a few bugs. Made the service less forgiving rather than silently ignoring invalid state. 2010-10-24 00:48:53 -07:00
Bartlomiej Niechwiej 5afc3f13cf Minor refactoring: remove dependency on Context and replace it with ContentResolver. 2010-10-23 19:04:57 -07:00
Rodrigo Damazio 9030917c14 Merging Bart's changes. 2010-10-22 15:34:24 -02:00
Bartlomiej Niechwiej 9905def352 Terminate tracker update thread on destroy. 2010-10-22 10:14:36 -07:00
Bartlomiej Niechwiej a3793aa92b Minor updates. 2010-10-22 10:00:15 -07:00
Nulled 76c8498956 updated zh-cn translation 2010-10-21 17:51:40 +08:00
Nulled 75bd8ea5a2 Updated zh-cn translation. fixed some errors. 2010-10-15 18:15:43 +08:00
Nulled 50a5e864ac updated zh-cn translation 2010-10-15 18:04:56 +08:00
Rodrigo Damazio 352fc26f7e Fixing tests 2010-10-14 23:25:42 -03:00
Rodrigo Damazio 44afa1623e Making locations be reused when writing tracks. 2010-10-14 21:06:59 -03:00
Rodrigo Damazio 14acafabfc Getting rid of TrackBuffer. 2010-10-14 20:42:02 -03:00
Rodrigo Damazio 773af58d03 Fixing issue 190 (third step: reordering methods in execution order - no other changes) 2010-10-14 18:44:55 -03:00
Rodrigo Damazio 352b851e9c Fixing issue 190 (second step: refactoring mymaps uploading) 2010-10-14 18:35:51 -03:00
Rodrigo Damazio 8353a01082 Addressing review suggestions. 2010-10-14 16:41:20 -03:00
Bartlomiej Niechwiej b70e001206 Addressed Rodrigo's comments. 2010-10-13 21:58:26 -07:00
Rodrigo Damazio a741bb4d55 Fixing issue 190 (first step: dirty hack) 2010-10-13 22:03:31 -03:00
Rodrigo Damazio 24adee3d54 Addressing review suggestions and adding tests. 2010-10-13 21:53:16 -03:00
Bartlomiej Niechwiej 09203ffb95 Improved test coverage and minor refactoring/improvements. 2010-10-13 12:29:00 -07:00
Bartlomiej Niechwiej e94338f4c6 Fix a drawing lag during track recording.
For a track with ~2,500 points, the average drawign would take ~30-50ms, now it takes about 20ms (21ms if software clipping is enabled).

Removed all possible congestion points by introducing a blocking queue.

This change includes many fixes, including:
1) Major refactoring and clean up of the overlay, sped up drawing by a factor of 2x
2) Disable software clipping as it was slower by about 5% than w/o clipping and would trigger a bug related to map view spanning
3) Add waypoints synchronization  and fixed a bug related to skipping the first wpt
4) Add a simple unit test
2010-10-11 21:55:12 -07:00
Rodrigo Damazio dd9dd8ee81 Refactoring API level detection. 2010-10-11 22:28:02 -03:00
Rodrigo Damazio 01d6dcac59 Merging Bart's Polish fix. 2010-10-07 21:59:11 -03:00
Rodrigo Damazio ad0ee6b0d6 Merging Bart's Polish fix. 2010-10-07 21:58:07 -03:00
Rodrigo Damazio 769c8c228e Added tag v1.0.19 for changeset b096086934d6 2010-10-07 21:21:52 -03:00
Rodrigo Damazio 50fcd67085 Releasing version 1.0.19 (bugfix release) 2010-10-07 21:21:23 -03:00
Sandor Dornbush 52d03e6b7d Address Rodrigo's comments. 2010-10-07 16:28:42 -07:00
Sandor Dornbush b949cd0039 Really fix bug. 2010-10-07 12:39:05 -07:00
Sandor Dornbush e527170315 Fix recording error. 2010-10-07 12:01:32 -07:00
Sandor Dornbush ec7d210c36 Fix recording error. 2010-10-07 11:51:54 -07:00
Bartlomiej Niechwiej 74a4089464 Fix incorrect Polish translation related to delete track(s)/marker confirmation dialog (Issue 176). 2010-10-07 11:36:39 -07:00
Rodrigo Damazio fa9e14f574 Added tag v1.0.18 for changeset 7c67cd917be3 2010-10-05 17:12:20 -03:00
Rodrigo Damazio cdbeefcd16 Releasing version 1.0.18 2010-10-05 17:11:52 -03:00
Rodrigo Damazio ffdd5f4091 Merging Bart's changes 2010-10-05 14:48:43 -03:00
Bartlomiej Niechwiej bb60525780 Rename intent name to be uppercase. 2010-10-05 10:39:07 -07:00
Bartlomiej Niechwiej 82634af649 Minor refactoring. 2010-10-05 09:47:15 -07:00
Bartlomiej Niechwiej 3643ed9f13 Add missing Polish translations. 2010-10-04 23:07:38 -07:00
Bartlomiej Niechwiej fac59ab705 Partially fix a nasty bug related to losing a tracking session on service crash. 2010-10-04 21:53:34 -07:00
Bartlomiej Niechwiej 1e343b0d12 Limit the maximum number of auto-resume retry attempts to 3. 2010-10-04 21:17:56 -07:00
Bartlomiej Niechwiej 34bb467b97 Merge with 25704964a526fcfe09919af8f29c1e526b5409ec 2010-10-04 16:34:38 -07:00
Sandor Dornbush b092525c10 More swedish fixes. 2010-10-04 16:33:25 -07:00
Bartlomiej Niechwiej 256dac3a82 Moved showNotification() outside if clause. 2010-10-03 23:34:19 -07:00
Bartlomiej Niechwiej dfe947f54d Fixed an exception in MyTracks (added isBound), moved resumeState from onStart to onCreate in TrackRecordingService and some minor refactoring. 2010-10-03 23:28:12 -07:00
Andreas Bockert ce09407816 Fixed a number incorrect translation in Swedish language. 2010-10-01 22:33:16 +02:00
Bartlomiej Niechwiej beee6af79d Apply review feedback. 2010-09-30 23:46:47 -07:00
Bartlomiej Niechwiej c282562867 Introduce getLastModified() in Tracks class and fixe a NullPointerException in service if null intent is passed by the system. 2010-09-30 21:54:07 -07:00
Rodrigo Damazio 2aed9b3a33 Fixing track writer test after memory changes 2010-09-29 18:49:13 -03:00
Rodrigo Damazio 210910f21e Merging aggregated statistics change 2010-09-29 18:46:45 -03:00
Bartlomiej Niechwiej 1d666318ae Fix a bug in maybeResumeTrack. Still not sure if it works correctly (need to verify on real device). 2010-09-29 00:33:28 -07:00
Bartlomiej Niechwiej 4df6095089 Implement automatic restart of MyTracks on phone reboot.
In addition fix the following issues/add functionality:
0) Introduce MyTracksReceiver for listening on broadcast messages
1) Remove unnecessary call to VerifyChecker to avoid 403.
2) Clean up TrackRecordingService by adding private methods for common functionality
3) Fix a bug related to not canceling a timer after service was stopped
4) Add a new preference item to control behavior of new functionality
5) Add a unit test for the service (still need to figure out one issue with mocking content resolver).
2010-09-28 22:46:24 -07:00
Rodrigo Damazio d4edcce224 Uncommenting overlooked XML. 2010-09-27 21:42:59 -03:00
Rodrigo Damazio d7c6761841 Addressing comments I originally made on Sandor's change. 2010-09-27 21:02:52 -03:00
Rodrigo Damazio 5733224f8d Merging Sandor's memory footprint improvement 2010-09-27 17:41:34 -03:00
Rodrigo Damazio 22fd5042bc Merging Sandor's memory footprint improvement 2010-09-27 17:37:20 -03:00
Rodrigo Damazio 44a6f2d448 Further improving/fixing drawing, and adding a bounding box for debugging. 2010-09-27 16:14:04 -03:00
Rodrigo Damazio cd9c17f9b3 Fixing leftover from another commit - commenting out testing method. 2010-09-27 16:11:17 -03:00
Rodrigo Damazio dc07bcf0fa Fixing call to HandlerThread.quit() which only exists in API level 5+. 2010-09-27 14:54:36 -03:00
Rodrigo Damazio 248b8fb4fd Fixing bad resource in preferences (only used in 1.5). 2010-09-27 14:53:30 -03:00
Hauke Ingmar Schmidt d5ec7c3001 * Fixed some translation flaws
* Converted usages of formal language into informal language
2010-09-25 16:19:03 +02:00
Sandor Dornbush 35182a1483 Merge changes. 2010-09-23 14:30:44 -07:00
Sandor Dornbush 21b0a517a9 Merged Rodrigo's changes. 2010-09-23 11:07:31 -07:00
Sandor Dornbush 19a770445e Submit my changes before merging. 2010-09-23 11:02:45 -07:00
Rodrigo Damazio c6512f1376 Preparing to further isolate non-UI code from map drawing. 2010-09-22 22:10:36 -03:00
Rodrigo Damazio 2cb3963138 Refactoring track drawing 2010-09-22 22:04:07 -03:00
Sandor Dornbush d05c394c68 Trying to track down the missing end of track bug. 2010-09-21 15:10:56 -07:00
Sandor Dornbush 797de31960 Merging fixes. 2010-09-14 10:52:55 -07:00
Rodrigo Damazio a0af1a811a Added tag v1.0.17 for changeset 4181d0daba76 2010-09-09 20:07:21 -03:00
Rodrigo Damazio 4933b9ce54 Releasing version 1.0.17 2010-09-09 20:06:58 -03:00
Rodrigo Damazio e81c4eb155 Clearly marking the backup feature as a beta. 2010-09-09 20:06:44 -03:00
Rodrigo Damazio b284c8bc56 Fixing Sandor's fix :) 2010-09-08 22:36:59 -03:00
Sandor Dornbush 872d2d4337 Correctly take preference as a long and stop dividing bounds by E6. 2010-09-08 17:36:58 -07:00
Sandor Dornbush 525f1b7781 Fix restarting recording. 2010-09-07 17:18:06 -07:00
Rodrigo Damazio 2f99d8ca62 Fixing GPX importer tests to work on any timezone. 2010-09-07 17:39:38 -03:00
Rodrigo Damazio 7781014cf7 Fixing issue 148 - properly loading bounding boxes, and adding regression tests. 2010-09-07 16:32:46 -03:00
Rodrigo Damazio 2432b36f5d Minor javadoc style fix 2010-09-07 15:47:07 -03:00
Rodrigo Damazio 288aa015fa Merging GPX import fix 2010-09-07 15:08:54 -03:00
Rodrigo Damazio 1cb8b922c3 Fixing GPX import (issue 150) by properly parsing timestamps according to XML spec. 2010-09-06 23:05:09 -03:00
Rodrigo Damazio 41cec64bf6 Translating overlooked strings to Chinese 2010-09-02 21:06:37 -03:00
Rodrigo Damazio d82bda9d00 Merging Chinese translation 2010-09-02 20:56:31 -03:00
FNelson b84da40365 Merge with 28a6c6c0e8f12e489fa501609be4b564eb822f55
(Merge to Head)
2010-09-02 12:23:32 +01:00
Rodrigo Damazio d02c947b84 Style fixing 2010-09-01 17:46:36 -03:00
Rodrigo Damazio 7167a5a71e Final touches to cloud backup: being future-compatible by not using the agent helpers (those manage the backup state themselves, and we don't want to have to follow their format) 2010-09-01 17:42:14 -03:00
Rodrigo Damazio f13c2455ea Not overwriting files during export, and instead adding a suffix to them.
Also greatly simplifying name sanitization.
2010-09-01 00:03:34 -03:00
Rodrigo Damazio b200b66612 Fixing volume control - making the main activities control the text-to-speech volume. 2010-08-31 18:55:12 -03:00
Rodrigo Damazio b811df8cda Fixing indentation 2010-08-31 17:38:05 -03:00
Rodrigo Damazio 1e239b78c3 Fixing crash seen on developer console.
Basically, if the screen space gets really constrained, we would get a negative dimension for an image.
2010-08-31 17:35:38 -03:00
Rodrigo Damazio 3a8daadd92 Fixing NPE seen on developer console.
Apparently this happens when the activity was previously showing the chart settings dialog, and was paused then restarted - in that case we'll just keep the default chart settings.
2010-08-31 17:31:54 -03:00
Rodrigo Damazio f605d6fca5 Fixing issue 35 - detecting errors during "export all". 2010-08-31 17:14:46 -03:00
Rodrigo Damazio cd85e43624 Merging from head 2010-08-31 16:48:37 -03:00
Nulled 2b94d09539 removed file format array.
minor change to the strings.xml
2010-08-31 09:03:44 +08:00
Nulled ab82da5c75 removed colors.xml 2010-08-31 08:40:40 +08:00
Nulled 8a467aa537 updated chinese translation 2010-08-31 08:39:20 +08:00
Rodrigo Damazio 742e6b1e3e Added tag v1.0.16 for changeset 35854d46e6e4 2010-08-30 18:54:39 -03:00
Rodrigo Damazio e35e8bcdce Updating version number to 1.0.16 in preparation for release. 2010-08-30 18:42:48 -03:00
Rodrigo Damazio 5f953aa47f Fixing version display (missed merge). 2010-08-30 18:36:16 -03:00
Rodrigo Damazio e550e9aa1d Merge 2010-08-30 17:41:35 -03:00
Rodrigo Damazio 26e2defd9e Import cleanup 2010-08-30 17:39:16 -03:00
Sandor Dornbush 3b3641c69e Merging changes from head. 2010-08-27 17:21:33 -07:00
Rodrigo Damazio 56ccd518d6 Adding missing Eclipse configuration files for developers - these have to be manually imported 2010-08-24 22:48:49 -03:00
Rodrigo Damazio 59846280a8 Adding compression to the backup: assuming that backups/restore are infrequent, the added CPU/battery usage is not an issue 2010-08-24 22:39:29 -03:00
Rodrigo Damazio aa95e3abcd Minor leftover cleanup 2010-08-24 21:49:42 -03:00
Rodrigo Damazio ad6340c1a7 BackupActivity doesn't need to be an activity anymore, it has no own content 2010-08-24 21:41:40 -03:00
Rodrigo Damazio 62a54aab58 Style cleanup 2010-08-24 21:34:28 -03:00
Rodrigo Damazio 23f1e81cf0 A lot of cleanup:
* Splitting ExternalFileBackup into UI and non-UI parts
* Disabling backups while recording
* Triggering cloud backups when preferences are changed
2010-08-24 21:27:43 -03:00
Rodrigo Damazio d014f422d2 Ensuring the rest of the app can deal with preferences being restored from the backup 2010-08-24 21:17:55 -03:00
Rodrigo Damazio 68a9f1bc46 Clearing more leftovers from cloud backup. 2010-08-24 20:07:12 -03:00
Rodrigo Damazio 798637d465 Getting rid of full cloud backup for now - the backup service has a small size limit (1MB) which wouldn't be enough for us 2010-08-24 17:38:35 -03:00
Rodrigo Damazio 60ea4c5f77 Merging Sandor's changes with backup (non-trivial merge) 2010-08-24 17:25:50 -03:00
Rodrigo Damazio 0e119950c2 Merging Sandor's changes 2010-08-24 17:02:36 -03:00
Sandor Dornbush 4be4467fc6 Fix NPE. 2010-08-24 12:20:18 -07:00
Sandor Dornbush 06636b2a28 Fix test access modifier. 2010-08-23 09:12:12 -07:00
Sandor Dornbush 71a36d1b25 Address Rodrigo's comments. 2010-08-23 09:05:55 -07:00
Sandor Dornbush 9ba93ff8d2 Fix javadoc. 2010-08-23 08:03:54 -07:00
Sandor Dornbush 4059308dd7 Added comments and license to pref mgr.
Removed sampling from track overlay.
2010-08-22 12:51:40 -07:00
Rodrigo Damazio 9befe8ae5f Reversing backup order 2010-08-20 23:42:51 -03:00
Rodrigo Damazio 20e01f3b2c Storing files in UTC timezone 2010-08-20 23:31:17 -03:00
Rodrigo Damazio 98b894ed8e Adding SD card backup option to the preferences 2010-08-20 23:26:38 -03:00
Rodrigo Damazio ac8b7264b3 Minor initialization fixes 2010-08-20 23:13:05 -03:00
Rodrigo Damazio bf7b24ecc0 Isolating file utilities 2010-08-20 23:10:09 -03:00
sandordornbush 9f43dd2db5 Reverting classpath changes. 2010-08-20 16:11:36 -07:00
sandordornbush 28d868985e One more minor bug fix for a NPE. 2010-08-20 13:32:53 -07:00
sandordornbush cf1be26da2 Two minor bug fixes from the developer console. 2010-08-20 10:51:09 -07:00
Sandor Dornbush 1de9b73aa0 Address Rodrigo's comments.
Add service preference manager.
2010-08-18 22:05:01 -07:00
Rodrigo Damazio 3532a6360b Adding backup facilities. TODO: some tests, calling to trigger new automatic backup on Froyo, manual backup to SD option 2010-08-16 22:22:14 -03:00
Sandor Dornbush beddc8e1ea Add Track Writer test.
Fix total time bug in stats activity.
Fix track segments on the map overlay.
2010-08-16 17:16:43 -07:00
Rodrigo Damazio df81fba565 Fixing directory used in sharing as well 2010-08-16 18:17:14 -03:00
Rodrigo Damazio 25da0d26ef Changing exporters to use a subdirectory of the SD card 2010-08-16 18:14:33 -03:00
Rodrigo Damazio e0c34d20a8 Removing DO NOT TRANSLATE values from Japanese translation 2010-08-16 00:57:03 -03:00
Rodrigo Damazio cc6db5b5cc Merging japanese translation 2010-08-16 00:54:44 -03:00
Rodrigo Damazio c38df03add Ignoring eclipse workspace metadata if present 2010-08-13 13:03:58 -03:00
Rodrigo Damazio 63402358d1 Fixing empty method comment 2010-08-13 04:53:07 -03:00
Rodrigo Damazio 3ae1de735e Removing overlooked debug lines 2010-08-13 04:52:14 -03:00
Rodrigo Damazio a701eb0e4f Fixing 24-hour format mistake 2010-08-13 04:37:37 -03:00
Rodrigo Damazio 09caf017a9 Adding support for segments 2010-08-13 04:37:14 -03:00
Rodrigo Damazio 32b8b2093d REAL performance improvement in importer - using a bulk insertion 2010-08-13 03:50:55 -03:00
Rodrigo Damazio c84a4f1aa8 Moving androidmock to the right directory and making eclipse use it properly 2010-08-12 22:16:38 -03:00
Rodrigo Damazio d90c0b5431 Optimizing the importer a little 2010-08-12 22:14:47 -03:00
Rodrigo Damazio 94f6785f0d Removing no longer used provider utility methods 2010-08-12 22:06:58 -03:00
Rodrigo Damazio f01c382807 Style fixing SAX importer contribution 2010-08-12 20:22:54 -03:00
Rodrigo Damazio 6d42803dd8 Updating statistics object usage in SAX importer 2010-08-12 19:43:27 -03:00
Rodrigo Damazio 61e908ccb5 Merge SAX GPX importer contribution 2010-08-12 18:37:38 -03:00
FNelson 236bcba2bd Changing retrieveAllTracks to getAllTracks 2010-08-12 14:31:03 +01:00
Sandor Dornbush 7bae8c34a7 Integrate most of Rodrigo's comments. 2010-08-11 22:02:49 -07:00
Sandor Dornbush 3960341640 Revert classpath 2010-08-09 16:45:36 -07:00
Sandor Dornbush 06e453dd05 Merging changes from realtime branch into mainline. 2010-08-07 10:38:41 -07:00
FNelson 0347877290 Tidy up to adhere to style guidlines 2010-08-05 12:51:46 +01:00
FNelson b464526d5e Aggregated stats in first working state. 2010-08-04 11:58:43 +01:00
boiledorange73 361b1cbad4 Reverted "DO NOT TRANSLATE" entries 2010-08-04 19:51:00 +09:00
boiledorange73 56a866fca7 Modified bits of values-ja files. 2010-08-04 17:13:35 +09:00
boiledorange73 49e0d68374 res/values-ja added 2010-08-04 14:35:30 +09:00
FNelson 0ccd05e605 First stab at aggregated stats. Still needs work. Check in to work on home computer 2010-07-30 15:04:35 +01:00
FNelson 916e4586c5 First HG commit test. 2010-07-28 10:38:26 +01:00
Sandor Dornbush c9ffd0b4bb Exporting the TrackRecordingService. 2010-07-27 16:34:13 -07:00
Nulled 1d2f6f46a4 Fixed Chinese Simplified translation folder name 2010-06-12 08:09:49 +08:00
Nulled 4af6d856b9 Added Chinese Simplified translation 2010-06-11 08:50:23 +08:00
Steffen Horlacher 6fd4294391 Bugfix for empty total time in trip statistics and missing first location in exported files 2010-06-06 23:31:03 +02:00
Rodrigo Damazio 88b2b85f2a Making Track and Waypoint use the TripStatisticsData class.
This grealy simplifies those classes since the fields are the same.
There's certainly more cleanup to do on top of this, but I thought this
was already more than enough for a single change.

The only *functional* change expected from this is that the average
speed is now calculated over the time until the last known position,
which IMHO makes sense since the distance used in that calculation only
includes up to that position. The visible effect is that having no GPS
signal doesn't make the speed decrease.

This was imported from perforce CL 15953263.
2010-06-04 14:59:09 -03:00
Rodrigo Damazio 2c1dff6ac8 Adding test project files (TODO: replace easymock with android mock) 2010-06-02 19:26:31 -03:00
Rodrigo Damazio 481b42f563 Auto-merge 2010-06-02 16:58:49 -03:00
Rodrigo Damazio 597c321009 Added tag v1.0.15 for changeset e774d13e5b6a 2010-06-02 16:57:46 -03:00
Rodrigo Damazio 76651f75d8 Automated merge with https://tnapierala-mytracks.googlecode.com/hg/ 2010-06-02 16:22:24 -03:00
t napierala 3d8bae55a1 pl_PL - removed some non-translatable strings 2010-06-01 10:00:28 +02:00
Steffen Horlacher 4b6869e367 Added check for negative time changes and bugfix for files with multiple tracks 2010-05-30 20:06:22 +02:00
Steffen Horlacher 477ba7c081 Changes according to comments 2010-05-30 18:10:56 +02:00
johan helin 5b6d9725b8 Removed all strings that should not be translated in the swedish translation of arrays.xml 2010-05-30 14:01:26 +02:00
t napierala 25c3cea115 pl_PL removed colors.xml, removed non-translatable strings as per Issue 68, comment 2 2010-05-30 13:20:08 +02:00
johan helin d90601276f Finnished translating my tracks to swedish 2010-05-29 13:30:20 +02:00
johan helin 4f692bc698 Finnished translating strings.xml and did some more of the strings in arrays.xml 2010-05-29 12:44:30 +02:00
johan helin d8dd02eef0 Further strings translated 2010-05-28 22:38:04 +02:00
johan helin 8ad65ae233 First commit with cleanup from english and some strings translated 2010-05-28 22:22:39 +02:00
t napierala eabbb4569b final translation 2010-05-26 16:34:26 +02:00
t napierala 49888b771d first part of changes 2010-05-26 14:29:40 +02:00
ob 2b1c1cd052 Add a missing string for "Elevation" to the French strings.xml file. 2010-05-24 18:23:39 +01:00
Steffen Horlacher 61884e67ec track rollback: javadoc and some minor other corrections 2010-05-23 12:58:50 +02:00
Steffen Horlacher 9a2f028843 code format 2010-05-23 11:26:41 +02:00
Steffen Horlacher 2b56acf164 code format 2010-05-23 11:21:27 +02:00
Steffen 98b67dcc28 Sax style GPX file importer and tests 2010-05-23 11:08:51 +02:00
Rodrigo Damazio 500dfa3107 Releasing mytracks 1.0.15 2010-05-23 00:00:00 -03:00
Rodrigo Damazio c4efcfd2db Fixing bug in GPX import - we were reading the last point time too soon 2010-05-22 01:17:59 -07:00
Rodrigo Damazio 81ee6bbcf6 Add a few calls back into SendToMyMaps which actually add the stats to the ending waypoint. (imported from perforce) 2010-05-22 00:41:40 -07:00
Rodrigo Damazio e4e2e76e06 Added tag v1.0.14 for changeset 4c02a4515632 2010-05-20 16:53:43 -07:00
Rodrigo Damazio f847862e84 Releasing 1.0.14 (no code changes, just a release mistake) 2010-05-20 16:53:40 -07:00
Rodrigo Damazio 427dbeafde Added tag v1.0.13 for changeset 84cce31f6b83 2010-05-20 12:18:35 -07:00
Rodrigo Damazio 99ac85b40e Releasing 1.0.13 2010-05-20 12:18:29 -07:00
Rodrigo Damazio 020388baed Fixing uploading bug which happened in gzipped responses 2010-05-20 11:21:46 -07:00
Rodrigo Damazio 4ade79de4f Added tag v1.0.12 for changeset 51aa4e7cf7d8 2010-05-20 05:14:00 -03:00
Rodrigo Damazio 870dda9b8b Importing tests source 2010-05-19 17:35:08 -07:00
Rodrigo Damazio 27dd5298f7 Importing all the source code :) 2010-05-19 17:32:31 -07:00
Rodrigo Damazio 6d5d406ce9 Importing external libraries 2010-05-19 17:31:41 -07:00
Rodrigo Damazio ffb5e7e6f7 Importing project files 2010-05-19 17:31:20 -07:00
Rodrigo Damazio 0de101c89f Updating resources to the latest version 2010-05-19 17:30:26 -07:00
Rodrigo Damazio bd3a0766e1 Adding service definition 2010-05-07 17:58:54 -03:00
Rodrigo Damazio f536cc8f8a Adding hgignore for bin and gen dirs 2010-05-07 15:59:52 -03:00
Rodrigo Damazio 826c0495fc Initial import of MyTracks content files and their dependencies.
MyTracksUtils and MyTracksConstants are cut-down versions of the original files
which contain only what's used by the content package, we'll later post the rest
of them.
2010-05-07 15:59:33 -03:00
Rodrigo Damazio 9eac541ce5 Initial import of MyTracks resources and assets 2010-05-07 15:57:42 -03:00
160 changed files with 1915 additions and 5123 deletions
+2 -3
View File
@@ -17,8 +17,8 @@ limitations under the License.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.maps.mytracks"
android:installLocation="auto"
android:versionCode="39"
android:versionName="1.1.16">
android:versionCode="38"
android:versionName="1.1.15">
<!-- Permissions to initialize service -->
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
@@ -293,7 +293,6 @@ limitations under the License.
<service android:name="com.google.android.apps.mytracks.services.ControlRecordingService"
android:exported="false" />
<service android:name="com.google.android.apps.mytracks.services.RemoveTempFilesService"/>
<receiver android:name="com.google.android.apps.mytracks.BootReceiver">
<intent-filter>
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
+2 -2
View File
@@ -35,12 +35,12 @@ limitations under the License.
http://maps.google.com/mapfiles/ms/micons/blue-pushpin.png
</string>
<string name="my_tracks_analytics_id">UA-7222692-2</string>
<string name="my_tracks_privacy_url">www.google.com/policies/privacy/</string>
<string name="my_tracks_privacy_url">m.google.com/privacy</string>
<string name="my_tracks_recording_service_name">My Tracks Recording Service</string>
<string name="my_tracks_support_url">
groups.google.com/a/googleproductforums.com/forum/#!categories/maps/mytracks
</string>
<string name="my_tracks_web_url">www.google.com/mobile/mytracks</string>
<string name="my_tracks_web_url">mytracks.appspot.com</string>
<string name="permission_notification_value">
com.google.android.apps.mytracks.MYTRACKS_NOTIFICATIONS
</string>
+11 -216
View File
@@ -465,166 +465,6 @@ limitations under the License.
Y axis
</string>
<!-- Description -->
<string name="description_activity_type"
translation_description="Activity type description.
%1$s activity type. E.g., 'hiking'">
Activity type: %1$s
</string>
<string name="description_average_moving_pace"
translation_description="Average moving pace description.
%1$.2f pace in minutes per kilometer
%2$.1f pace in minutes per mile">
Average moving pace: %1$.2f min/km (%2$.1f min/mi)
</string>
<string name="description_average_moving_speed"
translation_description="Average moving speed description.
%1$.2f speed in kilometers per hour
%2$.1f speed in miles per hour">
Average moving speed: %1$.2f km/h (%2$.1f mi/h)
</string>
<string name="description_average_pace"
translation_description="Average pace description.
%1$.2f pace in minutes per kilometer
%2$.1f pace in minutes per mile">
Average pace: %1$.2f min/km (%2$.1f min/mi)
</string>
<string name="description_average_speed"
translation_description="Average speed description.
%1$.2f speed in kilometers per hour
%2$.1f speed in miles per hour">
Average speed: %1$.2f km/h (%2$.1f mi/h)
</string>
<string name="description_elevation_gain"
translation_description="Elevation gain description.
%1$d elevation in meters
%2$d elevation in feet">
Elevation gain: %1$d m (%2$d ft)
</string>
<string name="description_location_accuracy"
translation_description="Label for location accuracy in meters.">
Accuracy (m)
</string>
<string name="description_location_altitude"
translation_description="Label for location altitude in degrees.">
Altitude (m)
</string>
<string name="description_location_bearing"
translation_description="Label for location bearing in degrees.">
Bearing (deg)
</string>
<string name="description_location_latitude"
translation_description="Label for location latitude in degrees.">
Latitude (deg)
</string>
<string name="description_location_longitude"
translation_description="Label for location longitude in degrees.">
Longitude (deg)
</string>
<string name="description_location_speed"
translation_description="Label for location speed in meters per second.">
Speed (m/s)
</string>
<string name="description_location_time"
translation_description="Label for location time.">
Time
</string>
<string name="description_max_elevation"
translation_description="Max elevation description.
%1$d elevation in meters
%2$d elevation in feet">
Max elevation: %1$d m (%2$d ft)
</string>
<string name="description_max_grade"
translation_description="Max grade description.
%1$d grade in percentage">
Max grade: %1$d %%
</string>
<string name="description_max_speed"
translation_description="Max speed description.
%1$.2f speed in kilometers per hour
%2$.1f speed in miles per hour">
Max speed: %1$.2f km/h (%2$.1f mi/h)
</string>
<string name="description_min_elevation"
translation_description="Min elevation description.
%1$d elevation in meters
%2$d elevation in feet">
Min elevation: %1$d m (%2$d ft)
</string>
<string name="description_min_grade"
translation_description="Min grade description.
%1$d grade in percentage">
Min grade: %1$d %%
</string>
<string name="description_min_pace"
translation_description="Min pace description.
%1$.2f pace in minutes per kilometer
%2$.1f pace in minutes per mile">
Min pace: %1$.2f min/km (%2$.1f min/mi)
</string>
<string name="description_moving_time"
translation_description="Moving time description.
%1$s time. E.g., '1:08:59'">
Moving time: %1$s
</string>
<string name="description_recorded_time"
translation_description="Recorded time description.
%1$s time. E.g, '2/15/2012 1:40 PM'">
Recorded: %1$s
</string>
<string name="description_sensor_battery_level"
translation_description="Label for battery level with its unit percentage (%).">
Battery level (%)
</string>
<string name="description_sensor_cadence"
translation_description="Label for cadence with its unit revolutions per minute (rpm).">
Cadence (rpm)
</string>
<string name="description_sensor_heart_rate"
translation_description="Label for heart rate with its unit beats per minute (bpm).">
Heart rate (bpm)
</string>
<string name="description_sensor_power"
translation_description="Label for power with its unit watt (W).">
Power (W)
</string>
<string name="description_track_point"
translation_description="Label for a track point">
Point
</string>
<string name="description_track_segment"
translation_description="Label for a track segment">
Segment
</string>
<string name="description_total_distance"
translation_description="Total distance description.
%1$.2f distance in kilometers
%2$.1f distance in miles">
Total distance: %1$.2f km (%2$.1f mi)
</string>
<string name="description_total_time"
translation_description="Total time description.
%1$s time. E.g., '1:08:59'">
Total time: %1$s
</string>
<!-- EULA -->
<string name="eula_accept"
translation_description="In the 'Terms of service' dialog, the button to accept.
@@ -1259,7 +1099,7 @@ limitations under the License.
<string name="search_global_description"
translation_description="Description of what is searched in My Tracks, to be displayed in the
global system search settings.">
Tracks and waypoints
My Tracks tracks and waypoints
</string>
<string name="search_hint"
translation_description="The hint shown on the search box until the user types a search query.
@@ -1350,6 +1190,11 @@ limitations under the License.
%1$s: service name. 'Google Maps', 'Google Fusion Tables', or 'Google Docs'.">
Sending to %1$s. Please wait...
</string>
<string name="send_google_recorded"
translation_description="When sending a track to Google, in the track description, a tag
for the track recorded date. E.g., 'Recorded: Tue Sep 06 15:08:30 PDT 2011'.">
Recorded
</string>
<string name="send_google_result_header"
translation_description="When sending a track to Google, the header on the top of the result
page.
@@ -2429,16 +2274,6 @@ limitations under the License.
Screenshot: track_list.png">
Pick a track. Press &amp; hold for more options.
</string>
<string name="track_list_play"
translation_description="In the context menu for a track, the menu option to play the track.">
Play
</string>
<string name="track_list_play_install_earth_message"
translation_description="After pressing the menu option to play a track, the message informing
the user that he needs Google Earth to play the track and asking him if he wants to install
Google Earth from the Android Market.">
You need Google Earth to play the track. Do you want to install from the Market?
</string>
<string name="track_list_save_file"
translation_description="In the context menu for a track, under the 'Save to SD card...'
option, the menu option to save the track as a certain file format.
@@ -2596,53 +2431,13 @@ limitations under the License.
Screenshot: value_auto_resume.png">
Always
</string>
<string name="value_float_feet"
translation_description="Display a float value in feet (ft).
%1$.2f: a float number. E.g., '2.22'">
%1$.2f ft
</string>
<string name="value_float_kilometer"
translation_description="Display a float value in kilometers (km).
%1$.2f: a float number. E.g., '2.22'">
%1$.2f km
</string>
<string name="value_float_kilometer_hour"
translation_description="Display a float value in kilometers per hour (km/h).
%1$.2f: a float number. E.g., '2.22'">
%1$.2f km/h
</string>
<string name="value_float_meter"
translation_description="Display a float value in meters (m).
%1$.2f: a float number. E.g., '2.22'">
%1$.2f m
</string>
<string name="value_float_mile"
translation_description="Display a float value in miles (mi).
translation_description="In a setting picker, the string format to display a float value in
miles (mi).
%1$.2f: a float number. E.g., '2.22'">
%1$.2f mi
</string>
<string name="value_float_mile_hour"
translation_description="Display a float value in miles per hour (mi/h).
%1$.2f: a float number. E.g., '2.22'">
%1$.2f mi/h
</string>
<string name="value_float_minute_kilometer"
translation_description="Display a float value in minutes per kilometer (min/km).
%1$.2f: a float number. E.g., '2.22'">
%1$.2f min/km
</string>
<string name="value_float_minute_mile"
translation_description="Display a float value in minutes per mile (min/mi).
%1$.2f: a float number. E.g., '2.22'">
%1$.2f min/mi
%1$.1f: a float number. E.g., '2.2'
Screenshot: value_gps_accuracy_mile_poor_gps.png">
%1$.1f mi
</string>
<string name="value_float_mile_poor_gps"
translation_description="In a setting picker, the string format to display a float value in
+7 -3
View File
@@ -79,8 +79,10 @@ public class AntInterface {
private static boolean mAntSupported = false;
/**
* An interface for notifying AntInterface IPC clients when they have been
* connected to the ANT service.
* An interface for notifying AntInterface IPC clients when they have
* been connected to the ANT service.
*
* @see ServiceEvent
*/
public interface ServiceListener
{
@@ -1044,6 +1046,8 @@ public class AntInterface {
*
* @param channelNumber Which channel to transmit on.
* @param txBuffer The data to send.
* @param initialPacket Which packet in the burst sequence does the data begin in, 1 is the first.
* @param containsEndOfBurst Is this the last of the data to be sent in burst.
* @return The number of bytes still to be sent (approximately). 0 if success.
* @throws AntInterfaceException
* @throws AntServiceNotConnectedException
@@ -1209,7 +1213,7 @@ public class AntInterface {
* Claims the interface if it is available. If not the user will be prompted (on the notification bar) if a force claim should be done.
* If the ANT Interface is claimed, an AntInterfaceIntent.ANT_INTERFACE_CLAIMED_ACTION intent will be sent, with the current applications pid.
*
* @param appName The name if this application, to show to the user.
* @param String appName The name if this application, to show to the user.
* @returns false if a claim interface request notification already exists.
* @throws IllegalArgumentException
* @throws AntInterfaceException
@@ -19,7 +19,6 @@ import static android.content.Intent.ACTION_BOOT_COMPLETED;
import static com.google.android.apps.mytracks.Constants.RESUME_TRACK_EXTRA_NAME;
import static com.google.android.apps.mytracks.Constants.TAG;
import com.google.android.apps.mytracks.services.RemoveTempFilesService;
import com.google.android.apps.mytracks.services.TrackRecordingService;
import android.content.BroadcastReceiver;
@@ -51,9 +50,6 @@ public class BootReceiver extends BroadcastReceiver {
Intent startIntent = new Intent(context, TrackRecordingService.class);
startIntent.putExtra(RESUME_TRACK_EXTRA_NAME, true);
context.startService(startIntent);
Intent removeTempFilesIntent = new Intent(context, RemoveTempFilesService.class);
context.startService(removeTempFilesIntent);
} else {
Log.w(TAG, "BootReceiver: unsupported action");
}
@@ -31,7 +31,6 @@ import com.google.android.apps.mytracks.stats.TripStatisticsBuilder;
import com.google.android.apps.mytracks.util.LocationUtils;
import com.google.android.apps.mytracks.util.UnitConversions;
import com.google.android.maps.mytracks.R;
import com.google.common.annotations.VisibleForTesting;
import android.app.Activity;
import android.app.Dialog;
@@ -259,8 +258,7 @@ public class ChartActivity extends Activity implements TrackDataListener {
* @param location the location to get data for (this method takes ownership of that location)
* @param result the resulting point to fill out
*/
@VisibleForTesting
void fillDataPoint(Location location, double result[]) {
private void fillDataPoint(Location location, double result[]) {
double timeOrDistance = Double.NaN,
elevation = Double.NaN,
speed = Double.NaN,
@@ -292,6 +290,7 @@ public class ChartActivity extends Activity implements TrackDataListener {
Mode mode = chartView.getMode();
switch (mode) {
case BY_DISTANCE:
timeOrDistance = profileLength / 1000.0;
if (lastLocation != null) {
double d = lastLocation.distanceTo(location);
if (metricUnits) {
@@ -300,7 +299,6 @@ public class ChartActivity extends Activity implements TrackDataListener {
profileLength += d * UnitConversions.KM_TO_MI;
}
}
timeOrDistance = profileLength * UnitConversions.M_TO_KM;
break;
case BY_TIME:
if (startTime == -1) {
@@ -328,7 +326,7 @@ public class ChartActivity extends Activity implements TrackDataListener {
&& (location.getSpeed() <= trackMaxSpeed)) {
speedBuffer.setNext(location.getSpeed());
}
speed = speedBuffer.getAverage() * UnitConversions.MS_TO_KMH;
speed = speedBuffer.getAverage() * 3.6;
if (!metricUnits) {
speed *= UnitConversions.KM_TO_MI;
}
@@ -480,19 +478,4 @@ public class ChartActivity extends Activity implements TrackDataListener {
});
return true;
}
@VisibleForTesting
ChartView getChartView() {
return chartView;
}
@VisibleForTesting
MenuItem getChartSettingsMenuItem() {
return chartSettingsMenuItem;
}
@VisibleForTesting
void setTrackMaxSpeed(double maxSpeed) {
trackMaxSpeed = maxSpeed;
}
}
@@ -21,7 +21,6 @@ import com.google.android.apps.mytracks.stats.ExtremityMonitor;
import com.google.android.apps.mytracks.util.StringUtils;
import com.google.android.apps.mytracks.util.UnitConversions;
import com.google.android.maps.mytracks.R;
import com.google.common.annotations.VisibleForTesting;
import android.content.Context;
import android.content.Intent;
@@ -408,12 +407,11 @@ public class ChartView extends View {
}
private int getWaypointX(Waypoint waypoint) {
if (mode == Mode.BY_DISTANCE) {
double lenghtInKm = waypoint.getLength() * UnitConversions.M_TO_KM;
return getX(metricUnits ? lenghtInKm : lenghtInKm * UnitConversions.KM_TO_MI);
} else {
return getX(waypoint.getDuration());
}
return (mode == Mode.BY_DISTANCE)
? getX(metricUnits
? waypoint.getLength() / 1000.0
: waypoint.getLength() * UnitConversions.KM_TO_MI / 1000.0)
: getX(waypoint.getDuration());
}
/**
@@ -886,14 +884,4 @@ public class ChartView extends View {
public void setChartValueSeriesEnabled(int index, boolean enabled) {
series[index].setEnabled(enabled);
}
@VisibleForTesting
int getZoomLevel() {
return zoomLevel;
}
@VisibleForTesting
int getMaxZoomLevel() {
return maxZoomLevel;
}
}
@@ -57,26 +57,26 @@ public abstract class Constants {
public static final int MENU_CHART_SETTINGS = 3;
/*
* Context menu ids. Sorted alphabetically.
* Context menu ids:
*/
public static final int MENU_CLEAR_MAP = 100;
public static final int MENU_EDIT = 100;
public static final int MENU_DELETE = 101;
public static final int MENU_EDIT = 102;
public static final int MENU_PLAY = 103;
public static final int MENU_SAVE_CSV_FILE = 104;
public static final int MENU_SAVE_GPX_FILE = 105;
public static final int MENU_SAVE_KML_FILE = 106;
public static final int MENU_SAVE_TCX_FILE = 107;
public static final int MENU_SEND_TO_GOOGLE = 108;
public static final int MENU_SHARE = 109;
public static final int MENU_SHARE_CSV_FILE = 110;
public static final int MENU_SHARE_FUSION_TABLE = 111;
public static final int MENU_SHARE_GPX_FILE = 112;
public static final int MENU_SHARE_KML_FILE = 113;
public static final int MENU_SHARE_MAP = 114;
public static final int MENU_SHARE_TCX_FILE = 115;
public static final int MENU_SHOW = 116;
public static final int MENU_WRITE_TO_SD_CARD = 117;
public static final int MENU_SEND_TO_GOOGLE = 102;
public static final int MENU_SHARE = 103;
public static final int MENU_SHOW = 104;
public static final int MENU_SHARE_MAP = 200;
public static final int MENU_SHARE_FUSION_TABLE = 201;
public static final int MENU_SHARE_GPX_FILE = 202;
public static final int MENU_SHARE_KML_FILE = 203;
public static final int MENU_SHARE_CSV_FILE = 204;
public static final int MENU_SHARE_TCX_FILE = 205;
public static final int MENU_WRITE_TO_SD_CARD = 206;
public static final int MENU_SAVE_GPX_FILE = 207;
public static final int MENU_SAVE_KML_FILE = 208;
public static final int MENU_SAVE_CSV_FILE = 209;
public static final int MENU_SAVE_TCX_FILE = 210;
public static final int MENU_CLEAR_MAP = 211;
/**
* The number of distance readings to smooth to get a stable signal.
@@ -30,13 +30,11 @@ import com.google.android.apps.mytracks.io.sendtogoogle.UploadServiceChooserActi
import com.google.android.apps.mytracks.stats.TripStatistics;
import com.google.android.apps.mytracks.util.GeoRect;
import com.google.android.apps.mytracks.util.LocationUtils;
import com.google.android.apps.mytracks.util.PlayTrackUtils;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;
import com.google.android.maps.mytracks.R;
import android.app.Dialog;
import android.content.ContentUris;
import android.content.Intent;
import android.location.Location;
@@ -72,8 +70,6 @@ public class MapActivity extends com.google.android.maps.MapActivity
implements View.OnTouchListener, View.OnClickListener,
TrackDataListener {
private static final int DIALOG_INSTALL_EARTH = 0;
// Saved instance state keys:
// ---------------------------
@@ -235,16 +231,6 @@ public class MapActivity extends com.google.android.maps.MapActivity
super.onPause();
}
@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case DIALOG_INSTALL_EARTH:
return PlayTrackUtils.createInstallEarthDialog(this);
default:
return null;
}
}
// Utility functions:
// -------------------
@@ -441,7 +427,6 @@ public class MapActivity extends com.google.android.maps.MapActivity
String shareFileFormat = getString(R.string.track_list_share_file);
String fileTypes[] = getResources().getStringArray(R.array.file_types);
menu.add(Menu.NONE, Constants.MENU_PLAY, Menu.NONE, R.string.track_list_play);
menu.add(Menu.NONE, Constants.MENU_SEND_TO_GOOGLE, Menu.NONE,
R.string.track_list_send_google);
SubMenu share = menu.addSubMenu(
@@ -479,18 +464,6 @@ public class MapActivity extends com.google.android.maps.MapActivity
Intent intent;
long trackId = dataHub.getSelectedTrackId();
switch (item.getItemId()) {
case Constants.MENU_EDIT:
intent = new Intent(this, TrackDetail.class).putExtra(TrackDetail.TRACK_ID, trackId);
startActivity(intent);
return true;
case Constants.MENU_PLAY:
if (PlayTrackUtils.isEarthInstalled(this)) {
PlayTrackUtils.playTrack(this, trackId);
return true;
} else {
showDialog(DIALOG_INSTALL_EARTH);
return true;
}
case Constants.MENU_SEND_TO_GOOGLE:
intent = new Intent(this, UploadServiceChooserActivity.class)
.putExtra(SendRequest.SEND_REQUEST_KEY, new SendRequest(trackId, true, true, true));
@@ -506,25 +479,32 @@ public class MapActivity extends com.google.android.maps.MapActivity
.putExtra(SendRequest.SEND_REQUEST_KEY, new SendRequest(trackId, false, true, false));
startActivity(intent);
return true;
case Constants.MENU_SHARE_GPX_FILE:
case Constants.MENU_SHARE_KML_FILE:
case Constants.MENU_SHARE_CSV_FILE:
case Constants.MENU_SHARE_TCX_FILE:
case Constants.MENU_SAVE_GPX_FILE:
case Constants.MENU_SAVE_KML_FILE:
case Constants.MENU_SAVE_CSV_FILE:
case Constants.MENU_SAVE_TCX_FILE:
case Constants.MENU_SHARE_GPX_FILE:
case Constants.MENU_SHARE_KML_FILE:
case Constants.MENU_SHARE_CSV_FILE:
case Constants.MENU_SHARE_TCX_FILE:
SaveActivity.handleExportTrackAction(
this, trackId, Constants.getActionFromMenuId(item.getItemId()));
return true;
case Constants.MENU_CLEAR_MAP:
dataHub.unloadCurrentTrack();
case Constants.MENU_EDIT: {
intent = new Intent(this, TrackDetail.class);
intent.putExtra(TrackDetail.TRACK_ID, trackId);
startActivity(intent);
return true;
case Constants.MENU_DELETE:
}
case Constants.MENU_DELETE: {
Uri uri = ContentUris.withAppendedId(TracksColumns.CONTENT_URI, trackId);
intent = new Intent(Intent.ACTION_DELETE, uri);
startActivity(intent);
return true;
}
case Constants.MENU_CLEAR_MAP:
dataHub.unloadCurrentTrack();
return true;
default:
return super.onMenuItemSelected(featureId, item);
}
@@ -22,7 +22,6 @@ import com.google.android.apps.mytracks.maps.TrackPathPainter;
import com.google.android.apps.mytracks.maps.TrackPathPainterFactory;
import com.google.android.apps.mytracks.maps.TrackPathUtilities;
import com.google.android.apps.mytracks.util.LocationUtils;
import com.google.android.apps.mytracks.util.UnitConversions;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
@@ -104,7 +103,7 @@ public class MapOverlay extends Overlay implements OnSharedPreferenceChangeListe
public CachedLocation(Location location) {
this.valid = LocationUtils.isValidLocation(location);
this.geoPoint = valid ? LocationUtils.getGeoPoint(location) : null;
this.speed = (int) Math.floor(location.getSpeed() * UnitConversions.MS_TO_KMH);
this.speed = (int) Math.floor(location.getSpeed() * 3.6);
}
};
@@ -17,16 +17,17 @@ package com.google.android.apps.mytracks;
import static com.google.android.apps.mytracks.Constants.TAG;
import com.google.android.apps.analytics.GoogleAnalyticsTracker;
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
import com.google.android.apps.mytracks.content.TrackDataHub;
import com.google.android.apps.mytracks.content.TracksColumns;
import com.google.android.apps.mytracks.content.Waypoint;
import com.google.android.apps.mytracks.content.WaypointCreationRequest;
import com.google.android.apps.mytracks.content.WaypointsColumns;
import com.google.android.apps.mytracks.io.file.TempFileCleaner;
import com.google.android.apps.mytracks.services.ITrackRecordingService;
import com.google.android.apps.mytracks.services.ServiceUtils;
import com.google.android.apps.mytracks.services.TrackRecordingServiceConnection;
import com.google.android.apps.mytracks.util.AnalyticsUtils;
import com.google.android.apps.mytracks.util.ApiAdapterFactory;
import com.google.android.apps.mytracks.util.EulaUtils;
import com.google.android.apps.mytracks.util.SystemUtils;
@@ -92,6 +93,11 @@ public class MyTracks extends TabActivity implements OnTouchListener {
*/
private MyTracksProviderUtils providerUtils;
/**
* Google Analytics tracker
*/
private GoogleAnalyticsTracker tracker;
/*
* Tabs/View navigation:
*/
@@ -139,7 +145,12 @@ public class MyTracks extends TabActivity implements OnTouchListener {
ApiAdapterFactory.getApiAdapter().enableStrictMode();
}
AnalyticsUtils.sendPageViews(this, "/appstart");
tracker = GoogleAnalyticsTracker.getInstance();
// Start the tracker in manual dispatch mode...
tracker.start(getString(R.string.my_tracks_analytics_id), getApplicationContext());
tracker.setProductVersion("android-mytracks", SystemUtils.getMyTracksVersion(this));
tracker.trackPageView("/appstart");
tracker.dispatch();
providerUtils = MyTracksProviderUtils.Factory.get(this);
preferences = getSharedPreferences(Constants.SETTINGS_NAME, Context.MODE_PRIVATE);
@@ -245,7 +256,14 @@ public class MyTracks extends TabActivity implements OnTouchListener {
@Override
protected void onStop() {
Log.d(TAG, "MyTracks.onStop");
dataHub.stop();
tracker.dispatch();
tracker.stop();
// Clean up any temporary track files.
TempFileCleaner.clean();
super.onStop();
}
@@ -16,10 +16,8 @@
package com.google.android.apps.mytracks;
import com.google.android.apps.mytracks.content.TrackDataHub;
import com.google.android.apps.mytracks.services.RemoveTempFilesService;
import android.app.Application;
import android.content.Intent;
/**
* MyTracksApplication for keeping global state.
@@ -30,11 +28,6 @@ public class MyTracksApplication extends Application {
private TrackDataHub trackDataHub;
@Override
public void onCreate() {
startService(new Intent(this, RemoveTempFilesService.class));
}
/**
* Gets the application's TrackDataHub.
*
@@ -207,8 +207,9 @@ public class SearchActivity extends ListActivity {
resultMap.put(DESCRIPTION_FIELD, track.getDescription());
resultMap.put(CATEGORY_FIELD, track.getCategory());
resultMap.put(TIME_FIELD, StringUtils.formatDateTime(this, stats.getStartTime()));
resultMap.put(STATS_FIELD, StringUtils.formatTimeDistance(
this, stats.getTotalTime(), stats.getTotalDistance(), metricUnits));
resultMap.put(STATS_FIELD,
StringUtils.formatTimeDistance(this, stats.getTotalDistance(), stats.getTotalTime(),
metricUnits));
resultMap.put(TRACK_ID_FIELD, track.getId());
}
@@ -502,7 +502,7 @@ public class SettingsActivity extends PreferenceActivity {
format = getString(stringId);
options[i] = String.format(format, value);
} else {
double mile = value * UnitConversions.FT_TO_MI;
double mile = value / UnitConversions.MI_TO_FEET;
format = getString(R.string.value_float_mile);
options[i] = String.format(format, mile);
}
@@ -545,7 +545,7 @@ public class SettingsActivity extends PreferenceActivity {
}
options[i] = String.format(format, value);
} else {
double mile = value * UnitConversions.FT_TO_MI;
double mile = value / UnitConversions.MI_TO_FEET;
if (values[i].equals(GPS_ACCURACY_POOR)) {
format = getString(R.string.value_float_mile_poor_gps);
} else {
@@ -644,7 +644,7 @@ public class SettingsActivity extends PreferenceActivity {
String metricspeed = prefs.getString(getString(id), null);
int englishspeed;
try {
englishspeed = (int) (Double.parseDouble(metricspeed) * UnitConversions.KM_TO_MI);
englishspeed = (int) (Double.parseDouble(metricspeed) * UnitConversions.KMH_TO_MPH);
} catch (NumberFormatException e) {
englishspeed = 0;
}
@@ -663,7 +663,7 @@ public class SettingsActivity extends PreferenceActivity {
// Convert miles/h to km/h
try {
metricspeed = String.valueOf(
(int) (Double.parseDouble(newValue) * UnitConversions.MI_TO_KM));
(int) (Double.parseDouble(newValue) * UnitConversions.MPH_TO_KMH) + 1);
} catch (NumberFormatException e) {
metricspeed = "0";
}
@@ -23,7 +23,6 @@ import com.google.android.apps.mytracks.content.TrackDataHub.ListenerDataType;
import com.google.android.apps.mytracks.content.TrackDataListener;
import com.google.android.apps.mytracks.content.Waypoint;
import com.google.android.apps.mytracks.services.ServiceUtils;
import com.google.android.apps.mytracks.util.UnitConversions;
import com.google.android.maps.mytracks.R;
import android.app.Activity;
@@ -191,7 +190,7 @@ public class StatsActivity extends Activity implements TrackDataListener {
utils.setAltitude(R.id.elevation_register, l.getAltitude());
utils.setLatLong(R.id.latitude_register, l.getLatitude());
utils.setLatLong(R.id.longitude_register, l.getLongitude());
utils.setSpeed(R.id.speed_register, l.getSpeed() * UnitConversions.MS_TO_KMH);
utils.setSpeed(R.id.speed_register, l.getSpeed() * 3.6);
}
private void showUnknownLocation() {
@@ -213,10 +213,10 @@ public class StatsUtilities {
double minElevation, double maxElevation, double elevationGain,
double minGrade, double maxGrade) {
setTime(R.id.moving_time_register, movingTime);
setDistance(R.id.total_distance_register, totalDistance * UnitConversions.M_TO_KM);
setSpeed(R.id.average_speed_register, averageSpeed * UnitConversions.MS_TO_KMH);
setSpeed(R.id.average_moving_speed_register, averageMovingSpeed * UnitConversions.MS_TO_KMH);
setSpeed(R.id.max_speed_register, maxSpeed * UnitConversions.MS_TO_KMH);
setDistance(R.id.total_distance_register, totalDistance / 1000.0);
setSpeed(R.id.average_speed_register, averageSpeed * 3.6);
setSpeed(R.id.average_moving_speed_register, averageMovingSpeed * 3.6);
setSpeed(R.id.max_speed_register, maxSpeed * 3.6);
setAltitude(R.id.min_elevation_register, minElevation);
setAltitude(R.id.max_elevation_register, maxElevation);
setAltitude(R.id.elevation_gain_register, elevationGain);
@@ -226,11 +226,11 @@ public class StatsUtilities {
public void setAllStats(TripStatistics stats) {
setTime(R.id.moving_time_register, stats.getMovingTime());
setDistance(R.id.total_distance_register, stats.getTotalDistance() * UnitConversions.M_TO_KM);
setSpeed(R.id.average_speed_register, stats.getAverageSpeed() * UnitConversions.MS_TO_KMH);
setDistance(R.id.total_distance_register, stats.getTotalDistance() / 1000.0);
setSpeed(R.id.average_speed_register, stats.getAverageSpeed() * 3.6);
setSpeed(R.id.average_moving_speed_register,
stats.getAverageMovingSpeed() * UnitConversions.MS_TO_KMH);
setSpeed(R.id.max_speed_register, stats.getMaxSpeed() * UnitConversions.MS_TO_KMH);
stats.getAverageMovingSpeed() * 3.6);
setSpeed(R.id.max_speed_register, stats.getMaxSpeed() * 3.6);
setAltitude(R.id.min_elevation_register, stats.getMinElevation());
setAltitude(R.id.max_elevation_register, stats.getMaxElevation());
setAltitude(R.id.elevation_gain_register, stats.getTotalElevationGain());
@@ -23,11 +23,9 @@ import com.google.android.apps.mytracks.io.sendtogoogle.SendRequest;
import com.google.android.apps.mytracks.io.sendtogoogle.UploadServiceChooserActivity;
import com.google.android.apps.mytracks.services.ServiceUtils;
import com.google.android.apps.mytracks.services.TrackRecordingServiceConnection;
import com.google.android.apps.mytracks.util.PlayTrackUtils;
import com.google.android.apps.mytracks.util.StringUtils;
import com.google.android.maps.mytracks.R;
import android.app.Dialog;
import android.app.ListActivity;
import android.content.ContentUris;
import android.content.Context;
@@ -62,8 +60,6 @@ public class TrackList extends ListActivity
implements SharedPreferences.OnSharedPreferenceChangeListener,
View.OnClickListener {
private static final int DIALOG_INSTALL_EARTH = 0;
private int contextPosition = -1;
private long trackId = -1;
private ListView listView = null;
@@ -91,7 +87,6 @@ public class TrackList extends ListActivity
String shareFileFormat = getString(R.string.track_list_share_file);
String fileTypes[] = getResources().getStringArray(R.array.file_types);
menu.add(Menu.NONE, Constants.MENU_PLAY, Menu.NONE, R.string.track_list_play);
menu.add(Menu.NONE, Constants.MENU_SEND_TO_GOOGLE, Menu.NONE,
R.string.track_list_send_google);
SubMenu share = menu.addSubMenu(
@@ -169,18 +164,14 @@ public class TrackList extends ListActivity
return true;
}
case Constants.MENU_EDIT: {
intent = new Intent(this, TrackDetail.class).putExtra(TrackDetail.TRACK_ID, trackId);
intent = new Intent(this, TrackDetail.class);
intent.putExtra(TrackDetail.TRACK_ID, trackId);
startActivity(intent);
return true;
}
case Constants.MENU_PLAY:
if (PlayTrackUtils.isEarthInstalled(this)) {
PlayTrackUtils.playTrack(this, trackId);
return true;
} else {
showDialog(DIALOG_INSTALL_EARTH);
return true;
}
case Constants.MENU_SHARE:
case Constants.MENU_WRITE_TO_SD_CARD:
return false;
case Constants.MENU_SEND_TO_GOOGLE:
intent = new Intent(this, UploadServiceChooserActivity.class)
.putExtra(SendRequest.SEND_REQUEST_KEY, new SendRequest(trackId, true, true, true));
@@ -196,23 +187,24 @@ public class TrackList extends ListActivity
.putExtra(SendRequest.SEND_REQUEST_KEY, new SendRequest(trackId, false, true, false));
startActivity(intent);
return true;
case Constants.MENU_SHARE_GPX_FILE:
case Constants.MENU_SHARE_KML_FILE:
case Constants.MENU_SHARE_CSV_FILE:
case Constants.MENU_SHARE_TCX_FILE:
case Constants.MENU_SAVE_GPX_FILE:
case Constants.MENU_SAVE_KML_FILE:
case Constants.MENU_SAVE_CSV_FILE:
case Constants.MENU_SAVE_TCX_FILE:
SaveActivity.handleExportTrackAction(
this, trackId, Constants.getActionFromMenuId(item.getItemId()));
case Constants.MENU_SHARE_GPX_FILE:
case Constants.MENU_SHARE_KML_FILE:
case Constants.MENU_SHARE_CSV_FILE:
case Constants.MENU_SHARE_TCX_FILE:
SaveActivity.handleExportTrackAction(this, trackId,
Constants.getActionFromMenuId(item.getItemId()));
return true;
case Constants.MENU_DELETE:
case Constants.MENU_DELETE: {
intent = new Intent(Intent.ACTION_DELETE);
Uri uri = ContentUris.withAppendedId(TracksColumns.CONTENT_URI, trackId);
intent = new Intent(Intent.ACTION_DELETE)
.setDataAndType(uri, TracksColumns.CONTENT_ITEMTYPE);
intent.setDataAndType(uri, TracksColumns.CONTENT_ITEMTYPE);
startActivity(intent);
return true;
}
default:
Log.w(TAG, "Unknown menu item: " + item.getItemId() + "(" + item.getTitle() + ")");
return super.onMenuItemSelected(featureId, item);
@@ -295,16 +287,6 @@ public class TrackList extends ListActivity
return true;
}
@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case DIALOG_INSTALL_EARTH:
return PlayTrackUtils.createInstallEarthDialog(this);
default:
return null;
}
}
/* Callback from menu/search_only.xml */
public void onSearch(@SuppressWarnings("unused") MenuItem i) {
onSearchRequested();
@@ -349,8 +331,7 @@ public class TrackList extends ListActivity
} else if (columnIndex == totalDistanceIdx) {
double totalDistance = cursor.getDouble(totalDistanceIdx);
long totalTime = cursor.getLong(totalTimeIdx);
String totalDistanceStr = StringUtils.formatTimeDistance(
TrackList.this, totalTime, totalDistance, metricUnits);
String totalDistanceStr = StringUtils.formatTimeDistance(TrackList.this, totalDistance, totalTime, metricUnits);
textView.setText(totalDistanceStr);
} else {
textView.setText(cursor.getString(columnIndex));
@@ -17,7 +17,6 @@ package com.google.android.apps.mytracks;
import static com.google.android.apps.mytracks.Constants.TAG;
import com.google.android.apps.mytracks.content.DescriptionGeneratorImpl;
import com.google.android.apps.mytracks.content.MyTracksProviderUtils;
import com.google.android.apps.mytracks.content.Waypoint;
import com.google.android.apps.mytracks.content.WaypointCreationRequest;
@@ -320,7 +319,7 @@ public class WaypointsList extends ListActivity
public void onClick(DialogInterface dialogInterface, int i) {
dialogInterface.dismiss();
providerUtils.deleteWaypoint(waypointId,
new DescriptionGeneratorImpl(WaypointsList.this));
new StringUtils(WaypointsList.this));
}
});
builder.setNegativeButton(getString(R.string.generic_no),
@@ -1,257 +0,0 @@
/*
* Copyright 2012 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.content;
import com.google.android.apps.mytracks.stats.TripStatistics;
import com.google.android.apps.mytracks.util.ChartURLGenerator;
import com.google.android.apps.mytracks.util.StringUtils;
import com.google.android.apps.mytracks.util.UnitConversions;
import com.google.android.maps.mytracks.R;
import com.google.common.annotations.VisibleForTesting;
import android.content.Context;
import android.util.Pair;
import java.util.Vector;
/**
* An implementation of {@link DescriptionGenerator} for My Tracks.
*
* @author Jimmy Shih
*/
public class DescriptionGeneratorImpl implements DescriptionGenerator {
private static final String HTML_LINE_BREAK = "<br>";
private static final String TEXT_LINE_BREAK = "\n";
private Context context;
public DescriptionGeneratorImpl(Context context) {
this.context = context;
}
@Override
public String generateTrackDescription(
Track track, Vector<Double> distances, Vector<Double> elevations) {
StringBuilder builder = new StringBuilder();
// Created by
String url = context.getString(R.string.my_tracks_web_url);
builder.append(context.getString(
R.string.send_google_by_my_tracks, "<a href='http://" + url + "'>", "</a>"));
builder.append("<p>");
builder.append(generateTripStatisticsDescription(track.getStatistics(), true));
// Activity type
String trackCategory = track.getCategory();
String category = trackCategory != null && trackCategory.length() > 0 ? trackCategory
: context.getString(R.string.value_unknown);
builder.append(context.getString(R.string.description_activity_type, category));
builder.append(HTML_LINE_BREAK);
// Elevation chart
if (distances != null && elevations != null) {
builder.append("<img border=\"0\" src=\""
+ ChartURLGenerator.getChartUrl(distances, elevations, track, context) + "\"/>");
builder.append(HTML_LINE_BREAK);
}
return builder.toString();
}
@Override
public String generateWaypointDescription(Waypoint waypoint) {
return generateTripStatisticsDescription(waypoint.getStatistics(), false);
}
/**
* Generates a description for a {@link TripStatistics}.
*
* @param stats the trip statistics
* @param html true to use "<br>" for line break instead of "\n"
*/
private String generateTripStatisticsDescription(TripStatistics stats, boolean html) {
String lineBreak = html ? HTML_LINE_BREAK : TEXT_LINE_BREAK;
StringBuilder builder = new StringBuilder();
// Total distance
writeDistance(
stats.getTotalDistance(), builder, R.string.description_total_distance, lineBreak);
// Total time
writeTime(stats.getTotalTime(), builder, R.string.description_total_time, lineBreak);
// Moving time
writeTime(stats.getMovingTime(), builder, R.string.description_moving_time, lineBreak);
// Average speed
Pair<Double, Double> averageSpeed = writeSpeed(
stats.getAverageSpeed(), builder, R.string.description_average_speed, lineBreak);
// Average moving speed
Pair<Double, Double> averageMovingSpeed = writeSpeed(stats.getAverageMovingSpeed(), builder,
R.string.description_average_moving_speed, lineBreak);
// Max speed
Pair<Double, Double> maxSpeed = writeSpeed(
stats.getMaxSpeed(), builder, R.string.description_max_speed, lineBreak);
// Average pace
writePace(averageSpeed, builder, R.string.description_average_pace, lineBreak);
// Average moving pace
writePace(averageMovingSpeed, builder, R.string.description_average_moving_pace, lineBreak);
// Min pace
writePace(maxSpeed, builder, R.string.description_min_pace, lineBreak);
// Max elevation
writeElevation(stats.getMaxElevation(), builder, R.string.description_max_elevation, lineBreak);
// Min elevation
writeElevation(stats.getMinElevation(), builder, R.string.description_min_elevation, lineBreak);
// Elevation gain
writeElevation(
stats.getTotalElevationGain(), builder, R.string.description_elevation_gain, lineBreak);
// Max grade
writeGrade(stats.getMaxGrade(), builder, R.string.description_max_grade, lineBreak);
// Min grade
writeGrade(stats.getMinGrade(), builder, R.string.description_min_grade, lineBreak);
// Recorded time
builder.append(
context.getString(R.string.description_recorded_time,
StringUtils.formatDateTime(context, stats.getStartTime())));
builder.append(lineBreak);
return builder.toString();
}
/**
* Writes distance.
*
* @param distance distance in meters
* @param builder StringBuilder to append distance
* @param resId resource id of distance string
* @param lineBreak line break string
*/
@VisibleForTesting
void writeDistance(double distance, StringBuilder builder, int resId, String lineBreak) {
double distanceInKm = distance * UnitConversions.M_TO_KM;
double distanceInMi = distanceInKm * UnitConversions.KM_TO_MI;
builder.append(context.getString(resId, distanceInKm, distanceInMi));
builder.append(lineBreak);
}
/**
* Writes time.
*
* @param time time in milliseconds.
* @param builder StringBuilder to append time
* @param resId resource id of time string
* @param lineBreak line break string
*/
@VisibleForTesting
void writeTime(long time, StringBuilder builder, int resId, String lineBreak) {
builder.append(context.getString(resId, StringUtils.formatElapsedTime(time)));
builder.append(lineBreak);
}
/**
* Writes speed.
*
* @param speed speed in meters per second
* @param builder StringBuilder to append speed
* @param resId resource id of speed string
* @param lineBreak line break string
* @return a pair of speed, first in kilometers per hour, second in miles per
* hour.
*/
@VisibleForTesting
Pair<Double, Double> writeSpeed(
double speed, StringBuilder builder, int resId, String lineBreak) {
double speedInKmHr = speed * UnitConversions.MS_TO_KMH;
double speedInMiHr = speedInKmHr * UnitConversions.KM_TO_MI;
builder.append(context.getString(resId, speedInKmHr, speedInMiHr));
builder.append(lineBreak);
return Pair.create(speedInKmHr, speedInMiHr);
}
/**
* Writes pace.
*
* @param speed a pair of speed, first in kilometers per hour, second in miles
* per hour
* @param builder StringBuilder to append pace
* @param resId resource id of pace string
* @param lineBreak line break string
*/
@VisibleForTesting
void writePace(
Pair<Double, Double> speed, StringBuilder builder, int resId, String lineBreak) {
double paceInMinKm = getPace(speed.first);
double paceInMinMi = getPace(speed.second);
builder.append(context.getString(resId, paceInMinKm, paceInMinMi));
builder.append(lineBreak);
}
/**
* Writes elevation.
*
* @param elevation elevation in meters
* @param builder StringBuilder to append elevation
* @param resId resource id of elevation string
* @param lineBreak line break string
*/
@VisibleForTesting
void writeElevation(
double elevation, StringBuilder builder, int resId, String lineBreak) {
long elevationInM = Math.round(elevation);
long elevationInFt = Math.round(elevation * UnitConversions.M_TO_FT);
builder.append(context.getString(resId, elevationInM, elevationInFt));
builder.append(lineBreak);
}
/**
* Writes grade.
*
* @param grade grade in fraction
* @param builder StringBuilder to append grade
* @param resId resource id grade string
* @param lineBreak line break string
*/
@VisibleForTesting
void writeGrade(double grade, StringBuilder builder, int resId, String lineBreak) {
long gradeInPercent = Double.isNaN(grade) || Double.isInfinite(grade) ? 0L
: Math.round(grade * 100);
builder.append(context.getString(resId, gradeInPercent));
builder.append(lineBreak);
}
/**
* Gets pace (in minutes) from speed.
*
* @param speed speed in hours
*/
@VisibleForTesting
double getPace(double speed) {
return speed == 0 ? 0.0 : 60.0 / speed; // convert from hours to minutes
}
}
@@ -17,7 +17,6 @@ package com.google.android.apps.mytracks.content;
import com.google.android.apps.mytracks.stats.TripStatistics;
import com.google.android.apps.mytracks.util.LocationUtils;
import com.google.android.apps.mytracks.util.UnitConversions;
import android.database.Cursor;
import android.location.Location;
@@ -386,7 +385,7 @@ public class SearchEngine {
distanceResults);
// Score tracks close to the current location higher.
double distanceKm = distanceResults[0] * UnitConversions.M_TO_KM;
double distanceKm = distanceResults[0] / 1000.0;
if (distanceKm > 0.0) {
// Use the inverse of the amortized distance.
return squash(distanceKm);
@@ -300,8 +300,8 @@ public class SendDocsUtils {
appendTag(builder, "name", track.getName());
appendTag(builder, "description", track.getDescription());
appendTag(builder, "date", StringUtils.formatDateTime(context, stats.getStartTime()));
appendTag(builder, "totaltime", StringUtils.formatElapsedTimeWithHour(stats.getTotalTime()));
appendTag(builder, "movingtime", StringUtils.formatElapsedTimeWithHour(stats.getMovingTime()));
appendTag(builder, "totaltime", StringUtils.formatElapsedTime(stats.getTotalTime()));
appendTag(builder, "movingtime", StringUtils.formatElapsedTime(stats.getMovingTime()));
appendTag(builder, "distance", getDistance(stats.getTotalDistance(), metricUnits));
appendTag(builder, "distanceunit", distanceUnit);
appendTag(builder, "averagespeed", getSpeed(stats.getAverageSpeed(), metricUnits));
@@ -335,7 +335,7 @@ public class SendDocsUtils {
.append("<gsx:")
.append(name)
.append(">")
.append(StringUtils.formatCData(value))
.append(StringUtils.stringAsCData(value))
.append("</gsx:")
.append(name)
.append(">");
@@ -349,7 +349,7 @@ public class SendDocsUtils {
*/
@VisibleForTesting
static final String getDistance(double distanceInMeter, boolean metricUnits) {
double distanceInKilometer = distanceInMeter * UnitConversions.M_TO_KM;
double distanceInKilometer = distanceInMeter / 1000.0;
double distance = metricUnits ? distanceInKilometer
: distanceInKilometer * UnitConversions.KM_TO_MI;
return NUMBER_FORMAT.format(distance);
@@ -363,9 +363,9 @@ public class SendDocsUtils {
*/
@VisibleForTesting
static final String getSpeed(double speedInMeterPerSecond, boolean metricUnits) {
double speedInKilometerPerHour = speedInMeterPerSecond * UnitConversions.MS_TO_KMH;
double speedInKilometerPerHour = speedInMeterPerSecond * 3.6;
double speed = metricUnits ? speedInKilometerPerHour
: speedInKilometerPerHour * UnitConversions.KM_TO_MI;
: speedInKilometerPerHour * UnitConversions.KMH_TO_MPH;
return NUMBER_FORMAT.format(speed);
}

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