diff --git a/app/src/main/java/foundation/e/drive/account/AccountUserInfoWorker.java b/app/src/main/java/foundation/e/drive/account/AccountUserInfoWorker.java index c1361c95b86d3d5b3900b4811f5fb23320883c9f..a295ee45ece27d593d00f30f46c901dbba9ab34a 100644 --- a/app/src/main/java/foundation/e/drive/account/AccountUserInfoWorker.java +++ b/app/src/main/java/foundation/e/drive/account/AccountUserInfoWorker.java @@ -235,7 +235,7 @@ public class AccountUserInfoWorker extends Worker { } } accountManager.setUserData(account, ACCOUNT_DATA_ALIAS_KEY, aliases); - Timber.d("fetchAliases(): success"); + Timber.d("fetchAliases(): success: %s", ocsResult.isSuccess()); DavClientProvider.getInstance().saveAccounts(mContext); diff --git a/app/src/main/java/foundation/e/drive/account/GetAliasOperation.java b/app/src/main/java/foundation/e/drive/account/GetAliasOperation.java index 2f7d26d5d6febb198525070c10c0f125ea384655..5896f3edc3d73dbd33e2b9b9e30006952e134863 100644 --- a/app/src/main/java/foundation/e/drive/account/GetAliasOperation.java +++ b/app/src/main/java/foundation/e/drive/account/GetAliasOperation.java @@ -80,9 +80,8 @@ public class GetAliasOperation extends RemoteOperation> { } } catch (Exception e) { - e.printStackTrace(); result = new RemoteOperationResult<>(e); - Timber.tag(GetAliasOperation.class.getSimpleName()).d("Fetching aliases failed"); + Timber.d(e, "Fetching aliases failed"); } finally { if (get != null) get.releaseConnection(); @@ -95,7 +94,7 @@ public class GetAliasOperation extends RemoteOperation> { public JSONArray parseResponse(@NonNull String response) { JSONArray result = null; try { - final JSONObject jsonResponse= new JSONObject(response).optJSONObject(NODE_OCS); + final JSONObject jsonResponse = new JSONObject(response).optJSONObject(NODE_OCS); if (jsonResponse == null) return result; final JSONObject jsonData = jsonResponse.optJSONObject(NODE_DATA); @@ -103,7 +102,7 @@ public class GetAliasOperation extends RemoteOperation> { result = jsonData.optJSONArray(NODE_ALIASES); } catch (JSONException e) { - e.printStackTrace(); + Timber.e(e); } return result; } diff --git a/app/src/main/java/foundation/e/drive/utils/CommonUtils.java b/app/src/main/java/foundation/e/drive/utils/CommonUtils.java index 5a605ef421e355aaa95756fd564609983eb7b31d..d2d56b461dc0f0525c94b2cea1b357be7744d3b5 100644 --- a/app/src/main/java/foundation/e/drive/utils/CommonUtils.java +++ b/app/src/main/java/foundation/e/drive/utils/CommonUtils.java @@ -30,6 +30,7 @@ import java.text.StringCharacterIterator; import java.util.Locale; import foundation.e.drive.R; +import timber.log.Timber; import static foundation.e.drive.utils.AppConstants.MEDIA_SYNC_PROVIDER_AUTHORITY; import static foundation.e.drive.utils.AppConstants.METERED_NETWORK_ALLOWED_AUTHORITY; @@ -184,7 +185,7 @@ public abstract class CommonUtils { Method get = c.getMethod("get", String.class); value = (String) get.invoke(c, prop); } catch (Exception e) { - e.printStackTrace(); + Timber.e(e); } return value == null ? "" : value; }