Update Google Java Client API to version 1.12.0-beta.

This commit is contained in:
Jimmy Shih
2012-12-10 18:38:05 -08:00
parent c840027ab9
commit dffae9e782
88 changed files with 1408 additions and 38 deletions
@@ -24,7 +24,6 @@ import com.google.api.client.http.HttpRequestFactory;
import com.google.api.client.http.HttpResponse;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.http.InputStreamContent;
import com.google.api.client.util.Strings;
import com.google.common.annotations.VisibleForTesting;
import android.accounts.Account;
@@ -405,7 +404,7 @@ public class SendFusionTablesAsyncTask extends AbstractSendAsyncTask {
Log.d(TAG, "Unable to encode query", e1);
return false;
}
ByteArrayInputStream inputStream = new ByteArrayInputStream(Strings.toBytesUtf8(sql));
ByteArrayInputStream inputStream = new ByteArrayInputStream(sql.getBytes());
InputStreamContent inputStreamContent = new InputStreamContent(null, inputStream);
HttpRequest request;
try {
@@ -417,7 +416,7 @@ public class SendFusionTablesAsyncTask extends AbstractSendAsyncTask {
GoogleHeaders headers = new GoogleHeaders();
headers.setApplicationName(APP_NAME_PREFIX + SystemUtils.getMyTracksVersion(context));
headers.gdataVersion = GDATA_VERSION;
headers.setGDataVersion(GDATA_VERSION);
headers.setGoogleLogin(authToken);
headers.setContentType(CONTENT_TYPE);
request.setHeaders(headers);
@@ -17,7 +17,6 @@ package com.google.android.apps.mytracks.io.fusiontables;
import com.google.android.apps.mytracks.content.Track;
import com.google.android.apps.mytracks.stats.TripStatistics;
import com.google.api.client.util.Strings;
import com.google.common.annotations.VisibleForTesting;
import android.location.Location;
@@ -193,7 +192,7 @@ public class SendFusionTablesUtils {
return null;
}
String[] lines = s.split(Strings.LINE_SEPARATOR);
String[] lines = s.split("\n");
if (lines.length > 1 && lines[0].equals(TABLE_ID)) {
// returns the next line
return lines[1];