فهرست منبع

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

David A. Velasco 12 سال پیش
والد
کامیت
7d1ea9819c
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      src/com/owncloud/android/network/BearerCredentials.java

+ 3 - 3
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;
     }