Просмотр исходного кода

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 лет назад
Родитель
Сommit
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;
     }