forked from upstream-mirrors/OpenTracks
Merging from head
This commit is contained in:
@@ -1,8 +1,8 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
package="com.google.android.maps.mytracks"
|
package="com.google.android.maps.mytracks"
|
||||||
android:versionCode="16"
|
android:versionCode="17"
|
||||||
android:versionName="1.0.15">
|
android:versionName="1.0.16">
|
||||||
<application android:icon="@drawable/arrow_icon"
|
<application android:icon="@drawable/arrow_icon"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:backupAgent="com.google.android.apps.mytracks.io.backup.MyTracksBackupAgentHelper">
|
android:backupAgent="com.google.android.apps.mytracks.io.backup.MyTracksBackupAgentHelper">
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ public class MyMapsGDataWrapper {
|
|||||||
} catch (HttpException e) {
|
} catch (HttpException e) {
|
||||||
Log.e(MyTracksConstants.TAG, "HttpException", e);
|
Log.e(MyTracksConstants.TAG, "HttpException", e);
|
||||||
errorMessage = e.getMessage();
|
errorMessage = e.getMessage();
|
||||||
if (errorMessage.contains("401")) {
|
if (errorMessage != null && errorMessage.contains("401")) {
|
||||||
errorType = ERROR_AUTH;
|
errorType = ERROR_AUTH;
|
||||||
} else {
|
} else {
|
||||||
errorType = ERROR_CONNECTION;
|
errorType = ERROR_CONNECTION;
|
||||||
@@ -122,7 +122,7 @@ public class MyMapsGDataWrapper {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(MyTracksConstants.TAG, "Exception", e);
|
Log.e(MyTracksConstants.TAG, "Exception", e);
|
||||||
errorMessage = e.getMessage();
|
errorMessage = e.getMessage();
|
||||||
if (errorMessage.contains("503")) {
|
if (errorMessage != null && errorMessage.contains("503")) {
|
||||||
errorType = ERROR_INTERNAL;
|
errorType = ERROR_INTERNAL;
|
||||||
} else {
|
} else {
|
||||||
errorType = ERROR_CONNECTION;
|
errorType = ERROR_CONNECTION;
|
||||||
|
|||||||
@@ -170,6 +170,9 @@ public class MyTracksOverlay extends Overlay {
|
|||||||
ArrayList<Waypoint> currentWaypoints = waypoints;
|
ArrayList<Waypoint> currentWaypoints = waypoints;
|
||||||
for (int i = 1; i < currentWaypoints.size(); i++) {
|
for (int i = 1; i < currentWaypoints.size(); i++) {
|
||||||
Waypoint wpt = currentWaypoints.get(i);
|
Waypoint wpt = currentWaypoints.get(i);
|
||||||
|
if (wpt == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
Location loc = wpt.getLocation();
|
Location loc = wpt.getLocation();
|
||||||
if (loc == null) {
|
if (loc == null) {
|
||||||
continue;
|
continue;
|
||||||
|
|||||||
@@ -19,12 +19,17 @@ import com.google.android.maps.mytracks.R;
|
|||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
import android.app.AlertDialog;
|
import android.app.AlertDialog;
|
||||||
|
import android.content.pm.PackageInfo;
|
||||||
|
import android.content.pm.PackageManager;
|
||||||
|
import android.content.pm.PackageManager.NameNotFoundException;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.util.Log;
|
||||||
import android.view.LayoutInflater;
|
import android.view.LayoutInflater;
|
||||||
import android.view.View;
|
import android.view.View;
|
||||||
import android.view.View.OnClickListener;
|
import android.view.View.OnClickListener;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
import android.webkit.WebView;
|
import android.webkit.WebView;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An activity that displays a welcome screen.
|
* An activity that displays a welcome screen.
|
||||||
@@ -72,5 +77,16 @@ public class WelcomeActivity extends Activity {
|
|||||||
builder.setIcon(R.drawable.arrow_icon);
|
builder.setIcon(R.drawable.arrow_icon);
|
||||||
AlertDialog dialog = builder.create();
|
AlertDialog dialog = builder.create();
|
||||||
dialog.show();
|
dialog.show();
|
||||||
|
|
||||||
|
// Get the version from the manifest.
|
||||||
|
try {
|
||||||
|
PackageInfo pi =
|
||||||
|
getPackageManager().getPackageInfo("com.google.android.maps.mytracks",
|
||||||
|
PackageManager.GET_META_DATA);
|
||||||
|
((TextView) dialog.findViewById(R.id.about_version_register)).
|
||||||
|
setText(pi.versionName);
|
||||||
|
} catch (NameNotFoundException e) {
|
||||||
|
Log.w(MyTracksConstants.TAG, "Failed to get version info.", e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user