From: Eugene Crosser Date: Fri, 3 Feb 2012 07:05:29 +0000 (+0400) Subject: trying to avoid wierd lost auth/ssl error cases X-Git-Url: http://average.org/gitweb/?a=commitdiff_plain;h=0d57ad853b17a0cf6f4a3e2c7372ba6580f3c379;p=WhereAmI.git trying to avoid wierd lost auth/ssl error cases --- diff --git a/src/org/average/whereami/Oracle.java b/src/org/average/whereami/Oracle.java index fc35c4f..157c988 100644 --- a/src/org/average/whereami/Oracle.java +++ b/src/org/average/whereami/Oracle.java @@ -18,8 +18,8 @@ public class Oracle { final String TAG = getClass().getName(); - public HttpTransport httpTransport = AndroidHttp.newCompatibleTransport(); - public JsonFactory jsonFactory = new JacksonFactory(); + public HttpTransport httpTransport; + public JsonFactory jsonFactory; public GoogleAccessProtectedResource accessProtectedResource; @@ -28,6 +28,8 @@ public class Oracle { public Oracle(final Resources res, final CredentialStore store) { authErrorMessage = res.getString(R.string.autherror); + httpTransport = AndroidHttp.newCompatibleTransport(); + jsonFactory = new JacksonFactory(); AccessTokenResponse token = store.read(); Log.v(TAG, "tokens - access: \"" + token.accessToken + "\", refresh: \"" + token.refreshToken +