From: David A. Velasco Date: Wed, 27 Mar 2013 11:55:47 +0000 (+0100) Subject: Fix crash got with: 1. try to rename / delete a file with an outdated access token... X-Git-Tag: oc-android-1.4.3~29^2~6 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/7d1ea9819ce0e08cf17b3d0aeef0211c8ef304c8?hp=--cc Fix crash got with: 1. try to rename / delete a file with an outdated access token; 2. cancel in login activity instead of authorize again; 3. try to refresh the account --- 7d1ea9819ce0e08cf17b3d0aeef0211c8ef304c8 diff --git a/src/com/owncloud/android/network/BearerCredentials.java b/src/com/owncloud/android/network/BearerCredentials.java index 35e2b4ed..59596e83 100644 --- a/src/com/owncloud/android/network/BearerCredentials.java +++ b/src/com/owncloud/android/network/BearerCredentials.java @@ -38,10 +38,10 @@ public class BearerCredentials implements Credentials { * @param token The bearer token */ public BearerCredentials(String token) { - if (token == null) { + /*if (token == null) { throw new IllegalArgumentException("Bearer token may not be null"); - } - mAccessToken = token; + }*/ + mAccessToken = (token == null) ? "" : token; }