Merge with 3af20c63ed16c56b6e5e3d854272ec1fb8074570

This commit is contained in:
Bartlomiej Niechwiej
2010-12-04 23:50:16 -08:00
5 changed files with 57 additions and 16 deletions
+3 -1
View File
@@ -109,10 +109,12 @@
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<!-- Features required -->
<!--
<uses-feature android:name="android.hardware.location" android:required="true"/>
<uses-feature android:name="android.hardware.location.gps" android:required="true"/>
<uses-feature android:name="android.hardware.touchscreen" android:required="true"/>
-->
<!-- Features optional -->
<uses-feature android:name="android.hardware.bluetooth" android:required="false"/>
<uses-feature android:name="android.hardware.location.network" android:required="false"/>
+2 -2
View File
@@ -26,8 +26,8 @@ limitations under the License.
android:enabled="true"
android:focusable="true"
android:focusableInTouchMode="true"
android:apiKey="0TXoRmxTinrZKQ9JSazj-9A34XX6_lXsRvTpXWA"/>
<!-- corresponding certificate md5: 81:DF:A2:63:53:C7:6B:1E:6C:24:62:D4:91:1C:36:3A -->
android:apiKey="0y_T_wDlbgovCQMZX7ZClDeveHLLhczEyiUblvw"/>
<!-- corresponding certificate md5: 88:3B:2F:19:EC:0A:9D:E9:33:89:30:BE:94:D1:79:91 -->
<LinearLayout android:id="@+id/messagepane"
android:orientation="horizontal"
android:layout_width="fill_parent"
@@ -15,8 +15,6 @@
*/
package com.google.android.apps.mytracks.content;
import java.util.HashMap;
import com.google.android.apps.mytracks.MyTracksConstants;
import android.content.ContentProvider;
@@ -148,7 +146,7 @@ public class MyTracksProvider extends ContentProvider {
Log.w(TAG, "Upgrading database from version " + oldVersion + " to "
+ newVersion + ", adding sensor column.");
db.execSQL("ALTER TABLE " + TRACKPOINTS_TABLE
+ "ADD " + TrackPointsColumns.SENSOR + " BLOB);");
+ " ADD " + TrackPointsColumns.SENSOR + " BLOB");
}
}
}
@@ -342,8 +342,14 @@ public class GpxImporter extends DefaultHandler {
// create new location and set attributes
Location loc = new Location(LocationManager.GPS_PROVIDER);
loc.setLatitude(Double.parseDouble(latitude));
loc.setLongitude(Double.parseDouble(longitude));
try {
loc.setLatitude(Double.parseDouble(latitude));
loc.setLongitude(Double.parseDouble(longitude));
} catch (NumberFormatException e) {
String msg = createErrorMessage(
"Unable to parse lat/long: " + latitude + "/" + longitude);
throw new SAXException(msg, e);
}
return loc;
}
@@ -472,9 +478,14 @@ public class GpxImporter extends DefaultHandler {
}
}
private void onAltitudeElementEnd() {
private void onAltitudeElementEnd() throws SAXException {
if (location != null) {
location.setAltitude(Double.parseDouble(content));
try {
location.setAltitude(Double.parseDouble(content));
} catch (NumberFormatException e) {
String msg = createErrorMessage("Unable to parse altitude: " + content);
throw new SAXException(msg, e);
}
}
}