From 63cd79dc4f84f30fcbdae625a6c0ad287e6e543a Mon Sep 17 00:00:00 2001 From: ericdecanini Date: Wed, 9 Mar 2022 10:53:18 +0100 Subject: [PATCH] Removes debug logs --- .../sdk/internal/network/NetworkConstants.kt | 2 +- .../session/space/ResolveSpaceInfoTask.kt | 21 +++++-------------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/NetworkConstants.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/NetworkConstants.kt index 21bba0f535..5aec7db66c 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/NetworkConstants.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/network/NetworkConstants.kt @@ -21,7 +21,7 @@ internal object NetworkConstants { private const val URI_API_PREFIX_PATH = "_matrix/client" const val URI_API_PREFIX_PATH_ = "$URI_API_PREFIX_PATH/" const val URI_API_PREFIX_PATH_R0 = "$URI_API_PREFIX_PATH/r0/" - const val URI_API_PREFIX_PATH_V1 = "${URI_API_PREFIX_PATH}/v1/" + const val URI_API_PREFIX_PATH_V1 = "$URI_API_PREFIX_PATH/v1/" const val URI_API_PREFIX_PATH_UNSTABLE = "$URI_API_PREFIX_PATH/unstable/" // Media diff --git a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt index 723f640edc..003148cf17 100644 --- a/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt +++ b/matrix-sdk-android/src/main/java/org/matrix/android/sdk/internal/session/space/ResolveSpaceInfoTask.kt @@ -19,7 +19,6 @@ package org.matrix.android.sdk.internal.session.space import org.matrix.android.sdk.internal.network.GlobalErrorReceiver import org.matrix.android.sdk.internal.network.executeRequest import org.matrix.android.sdk.internal.task.Task -import timber.log.Timber import javax.inject.Inject internal interface ResolveSpaceInfoTask : Task { @@ -39,20 +38,14 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor( private lateinit var params: ResolveSpaceInfoTask.Params - override suspend fun execute(params: ResolveSpaceInfoTask.Params): SpacesResponse { - val result = executeRequest(globalErrorReceiver) { - this.params = params - getSpaceHierarchy() - } - Timber.w("Space Info result: $result") - return result + override suspend fun execute(params: ResolveSpaceInfoTask.Params) = executeRequest(globalErrorReceiver) { + this.params = params + getSpaceHierarchy() } private suspend fun getSpaceHierarchy() = try { getStableSpaceHierarchy() } catch (e: Throwable) { - Timber.w("Stable space hierarchy failed: ${e.message}") - e.printStackTrace() getUnstableSpaceHierarchy() } @@ -62,9 +55,7 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor( suggestedOnly = params.suggestedOnly, limit = params.limit, maxDepth = params.maxDepth, - from = params.from).also { - Timber.w("Spaces response stable: $it") - } + from = params.from) private suspend fun getUnstableSpaceHierarchy() = spaceApi.getSpaceHierarchyUnstable( @@ -72,7 +63,5 @@ internal class DefaultResolveSpaceInfoTask @Inject constructor( suggestedOnly = params.suggestedOnly, limit = params.limit, maxDepth = params.maxDepth, - from = params.from).also { - Timber.w("Spaces response unstable: $it") - } + from = params.from) }