diff --git a/MyTracks/proguard.cfg b/MyTracks/proguard.cfg index 7a2867d7e..65fa34cbb 100644 --- a/MyTracks/proguard.cfg +++ b/MyTracks/proguard.cfg @@ -12,6 +12,8 @@ -dontwarn com.google.android.googleapps.** -dontwarn com.android.common.** -dontwarn com.google.android.gsf.** +-dontwarn org.codehaus.** +-dontwarn com.google.appengine.** # Keep everything android references from XMLs -keep public class * extends android.app.Activity @@ -20,6 +22,7 @@ -keep public class * extends android.app,backup.BackupAgent -keep public class * extends android.content.BroadcastReceiver -keep public class * extends android.content.ContentProvider +-keep public class * extends android.preference.Preference -keep public class com.android.vending.licensing.ILicensingService -keepclasseswithmembernames class * { diff --git a/MyTracks/res/values-de/strings.xml b/MyTracks/res/values-de/strings.xml index d57f702da..c742a76d8 100644 --- a/MyTracks/res/values-de/strings.xml +++ b/MyTracks/res/values-de/strings.xml @@ -15,14 +15,13 @@ See the License for the specific language governing permissions and limitations under the License. --> - Track aufzeichnen Aufzeichnung anhalten Satellitenansicht Kartenansicht Mein Aufenthaltsort - Wegpunkte + Wegpunkte Alle Tracks löschen Einstellungen Höhe @@ -82,7 +81,7 @@ limitations under the License. Erstellt von My Tracks für Android. - Erstellt von <a href=\'http://mytracks.appspot.com\'>My Tracks</a> für Android. + Erstellt von <a href=\'http://mytracks.appspot.com\'>My Tracks</a> für Android. Punkte @@ -92,7 +91,7 @@ limitations under the License. (Teil %d) - Dein Track wird aufgezeichnet… + Dein Track wird aufgezeichnet… Nein @@ -100,12 +99,13 @@ limitations under the License. Fehler Erfolgreich Wegpunkt + Lizenz Abbrechen + Schließen Bearbeiten Sichern - (Beginn) (Ende) @@ -212,11 +212,17 @@ limitations under the License. Wird nur unter Android 2.0 oder höher unterstützt Sensortyp - Der Typ des zu verbindenden Sensors + Der Typ des zu verbindenden Sensors + Verbindung mit ANT Herzqrequenzmesser aufheben + Verbindung mit ANT Kraftmesser aufheben + Verbindung mit ANT srm bridge aufheben + ANT-Sensor nicht verbunden + ANT-Sensor verbunden mit: %d Bluetooth-Sensor Der zu verbindende Bluetoothsensor Art der Datenanzeige + Datensicherung (BETA) SD-Karten-Sicherung Jetzt sichern @@ -225,7 +231,6 @@ limitations under the License. Alle Tracks und Einstellungen von der SD-Karte holen. Während ein Track aufgezeichnet wird, kann nicht mit der Datensicherung gearbeitet werden. - Eine Wiederherstellung von der SD-Karte ÜBERSCHREIBT alle vorhandenen Tracks und Einstellungen. Willst Du das wirklich? Wähle die wiederherzustellende Datensicherung aus Keine Datensicherungen gefunden. @@ -300,16 +305,16 @@ limitations under the License. Sekunden - Fuß - Kilometer + Kilometer + Fuß Meilen - - Kilometer pro Stunde + + Kilometer pro Stunde pro Kilometer - Meilen pro Stunde + Meilen pro Stunde pro Meile - + Zeit in Bewegung Gesamtzeit @@ -320,7 +325,7 @@ limitations under the License. Statistik Gesamtentfernung Entfernung - Energie + Kraft Kadenz Herzfrequenz Höchste Herzfrequenz @@ -334,10 +339,12 @@ limitations under the License. Über Hilfe - Unterstützung + Unterstützung: + Datenschutz: - - Senden an… + + Senden an… + Google Text & Tabellen Jetzt senden Trackstatistik senden Statistik und Punkte senden @@ -365,6 +372,7 @@ limitations under the License. Willkommen + OK Über My Tracks @@ -383,20 +391,20 @@ limitations under the License. Einheitenbenachrichtigung Voreingestellt sind metrische Einheiten. Willst Du diese Einstellung ändern? - - Bluetootheinstellungen + + Bluetooth-Einstellungen Geräteverbindung - Öffnet Androids Bluetootheinstellungen, um Geräte zu verbinden. - Sensoreinstellungen + Öffnet Androids Bluetooth-Einstellungen, um Geräte zu verbinden. + Sensor-Einstellungen Verbunden mit %s - Verbinde mit Bluetoothsensor ... - Bluetoothsensor nicht verbunden. + Verbinde mit Bluetooth-Sensor ... + Bluetooth-Sensor nicht verbunden. - Sensor Data Time - Energiemessung aktiviert + Uhrzeit + Kraftmesser aktiviert Herzfrequenzmessung aktiviert Keine Sensoren verfügbar Aktiviert diff --git a/MyTracks/res/values-ja/strings.xml b/MyTracks/res/values-ja/strings.xml index 732daae32..8895c3c22 100644 --- a/MyTracks/res/values-ja/strings.xml +++ b/MyTracks/res/values-ja/strings.xml @@ -98,7 +98,6 @@ limitations under the License. いいえ はい - OK エラー 成功 ウェイポイント @@ -311,29 +310,15 @@ limitations under the License. ミリ秒 - - キロメータ - - マイル - キロメータ毎時 - 毎キロメータ - マイル毎時 - 毎マイル - - - - - - 移動時間 合計時間 @@ -366,8 +351,7 @@ limitations under the License. 送信... - - + Googleマイマップ 今すぐ送信 トラック統計情報送信 統計情報とポイント送信 @@ -395,7 +379,6 @@ limitations under the License. ようこそ - My Tracksについて diff --git a/MyTracks/src/com/google/android/apps/mytracks/io/SendToFusionTables.java b/MyTracks/src/com/google/android/apps/mytracks/io/SendToFusionTables.java index edb36908b..dba669a9a 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/io/SendToFusionTables.java +++ b/MyTracks/src/com/google/android/apps/mytracks/io/SendToFusionTables.java @@ -30,13 +30,14 @@ 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.api.client.googleapis.GoogleHeaders; -import com.google.api.client.googleapis.GoogleTransport; +import com.google.api.client.googleapis.MethodOverrideIntercepter; import com.google.api.client.http.GenericUrl; import com.google.api.client.http.HttpRequest; import com.google.api.client.http.HttpResponse; import com.google.api.client.http.HttpResponseException; import com.google.api.client.http.HttpTransport; import com.google.api.client.http.InputStreamContent; +import com.google.api.client.javanet.NetHttpTransport; import com.google.api.client.util.Strings; import android.app.Activity; @@ -106,6 +107,12 @@ public class SendToFusionTables implements Runnable { private static String MARKER_TYPE_END = "large_red"; private static String MARKER_TYPE_WAYPOINT = "large_yellow"; + static { + // We manually assign the transport to avoid having HttpTransport try to + // load it via reflection (which breaks due to ProGuard). + HttpTransport.setLowLevelHttpTransport(new NetHttpTransport()); + } + public SendToFusionTables(Activity context, AuthManager auth, long trackId, ProgressIndicator progressIndicator, OnSendCompletedListener onCompletion) { @@ -116,10 +123,14 @@ public class SendToFusionTables implements Runnable { this.onCompletion = onCompletion; this.stringUtils = new StringUtils(context); this.providerUtils = MyTracksProviderUtils.Factory.get(context); - transport = GoogleTransport.create(); - GoogleHeaders headers = (GoogleHeaders) transport.defaultHeaders; + + GoogleHeaders headers = new GoogleHeaders(); headers.setApplicationName("Google-MyTracks-" + MyTracksUtils.getMyTracksVersion(context)); headers.gdataVersion = GDATA_VERSION; + + transport = new HttpTransport(); + MethodOverrideIntercepter.setAsFirstFor(transport); + transport.defaultHeaders = headers; } @Override diff --git a/MyTracks/src/com/google/android/apps/mytracks/util/ApiFeatures.java b/MyTracks/src/com/google/android/apps/mytracks/util/ApiFeatures.java index 0bdec6e81..c6dd60c75 100644 --- a/MyTracks/src/com/google/android/apps/mytracks/util/ApiFeatures.java +++ b/MyTracks/src/com/google/android/apps/mytracks/util/ApiFeatures.java @@ -33,12 +33,7 @@ public class ApiFeatures { */ public static final int ANDROID_API_LEVEL = Integer.parseInt( Build.VERSION.SDK); - - private static final String PLATFORM_ADAPTER_GINGERBREAD = - "com.google.android.apps.mytracks.util.GingerbreadPlatformAdapter"; - private static final String PLATFORM_ADAPTER_ECLAIR = - "com.google.android.apps.mytracks.util.EclairPlatformAdapter"; - + private static ApiFeatures instance; /** @@ -67,30 +62,18 @@ public class ApiFeatures { * Allow subclasses for mocking, but no direct instantiation. */ protected ApiFeatures() { + // It is safe to import unsupported classes as long as we only actually + // load the class when supported. if (getApiLevel() >= 9) { - apiPlatformAdapter = createPlatformAdapter(PLATFORM_ADAPTER_GINGERBREAD); + apiPlatformAdapter = new GingerbreadPlatformAdapter(); } else if (getApiLevel() >= 5) { - apiPlatformAdapter = createPlatformAdapter(PLATFORM_ADAPTER_ECLAIR); + apiPlatformAdapter = new EclairPlatformAdapter(); } else { - // Cupcake adapter is always supported, so it's safe to do static linkage. apiPlatformAdapter = new CupcakePlatformAdapter(); } - + Log.i(MyTracksConstants.TAG, "Using platform adapter " + apiPlatformAdapter.getClass()); } - - private static ApiPlatformAdapter createPlatformAdapter(String className) { - try { - Class clazz = Class.forName(className); - return (ApiPlatformAdapter) clazz.newInstance(); - } catch (ClassNotFoundException e) { - throw new RuntimeException("ApiFeatures: Unable to find " + className, e); - } catch (InstantiationException e) { - throw new RuntimeException("ApiFeatures: Unable to instantiate " + className, e); - } catch (IllegalAccessException e) { - throw new RuntimeException("ApiFeatures: Unable to access " + className, e); - } - } public ApiPlatformAdapter getApiPlatformAdapter() { return apiPlatformAdapter; diff --git a/MyTracksTest/.factorypath b/MyTracksTest/.factorypath index fefa9e647..37f943be0 100644 --- a/MyTracksTest/.factorypath +++ b/MyTracksTest/.factorypath @@ -1,7 +1,6 @@ - - - + +