forked from upstream-mirrors/OpenTracks
Map Fusion Tables uploading failures to the HTTP Exception that GData expects.
Fix typo in proguard disabling comment.
This commit is contained in:
@@ -13,7 +13,7 @@ split.density=false
|
|||||||
target=Google Inc.:Google APIs:9
|
target=Google Inc.:Google APIs:9
|
||||||
android.library.reference.1=../MyTracksLib/
|
android.library.reference.1=../MyTracksLib/
|
||||||
|
|
||||||
# ProGuard is turned off while we investigate the the removal of code that
|
# ProGuard is turned off while we investigate the removal of code that
|
||||||
# isn't actually dead from Fusion Tables. See issue 303 for an example of
|
# isn't actually dead from Fusion Tables. See issue 303 for an example of
|
||||||
# the result of that removal.
|
# the result of that removal.
|
||||||
#proguard.config=proguard.cfg
|
#proguard.config=proguard.cfg
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ import com.google.api.client.googleapis.MethodOverrideIntercepter;
|
|||||||
import com.google.api.client.http.GenericUrl;
|
import com.google.api.client.http.GenericUrl;
|
||||||
import com.google.api.client.http.HttpRequest;
|
import com.google.api.client.http.HttpRequest;
|
||||||
import com.google.api.client.http.HttpResponse;
|
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.HttpTransport;
|
||||||
import com.google.api.client.http.InputStreamContent;
|
import com.google.api.client.http.InputStreamContent;
|
||||||
import com.google.api.client.javanet.NetHttpTransport;
|
import com.google.api.client.javanet.NetHttpTransport;
|
||||||
@@ -665,7 +666,12 @@ public class SendToFusionTables implements Runnable {
|
|||||||
request.content = isc;
|
request.content = isc;
|
||||||
|
|
||||||
Log.d(MyTracksConstants.TAG, "Running update query " + url.toString() + ": " + sql);
|
Log.d(MyTracksConstants.TAG, "Running update query " + url.toString() + ": " + sql);
|
||||||
HttpResponse response = request.execute();
|
HttpResponse response = null;
|
||||||
|
try {
|
||||||
|
response = request.execute();
|
||||||
|
} catch (HttpResponseException e) {
|
||||||
|
throw new GDataWrapper.HttpException(e.response.statusCode, e.getMessage());
|
||||||
|
}
|
||||||
boolean success = response.isSuccessStatusCode;
|
boolean success = response.isSuccessStatusCode;
|
||||||
if (success) {
|
if (success) {
|
||||||
byte[] result = new byte[1024];
|
byte[] result = new byte[1024];
|
||||||
|
|||||||
Reference in New Issue
Block a user