diff --git a/rbs/src/main/java/com/rettermobile/rbs/RBS.kt b/rbs/src/main/java/com/rettermobile/rbs/RBS.kt index da4cb9a..149b41d 100644 --- a/rbs/src/main/java/com/rettermobile/rbs/RBS.kt +++ b/rbs/src/main/java/com/rettermobile/rbs/RBS.kt @@ -65,6 +65,7 @@ class RBS( } fun signInAnonymously() { + RBSLogger.log("signInAnonymously called") sendAction(action = RBSActions.SIGN_IN_ANONYMOUS.action) } @@ -121,6 +122,7 @@ class RBS( private fun checkTokenException(exception: Throwable?) { exception?.let { if (it is TokenFailException) { + RBSLogger.log("checkTokenException TokenFailException called") signOut() } } @@ -187,6 +189,7 @@ class RBS( } fun signOut() { + RBSLogger.log("signOut called") // val request = TokenManager.userId?.let { // mapOf(Pair("allTokens", true), Pair("userId", it)) // } ?: kotlin.run { mapOf(Pair("allTokens", true)) } @@ -201,6 +204,7 @@ class RBS( } private fun clearSession() { + RBSLogger.log("clearSession called") TokenManager.clear() RBSCloudManager.clear() } diff --git a/rbs/src/main/java/com/rettermobile/rbs/service/RBSNetwork.kt b/rbs/src/main/java/com/rettermobile/rbs/service/RBSNetwork.kt index b0970ee..6f183aa 100644 --- a/rbs/src/main/java/com/rettermobile/rbs/service/RBSNetwork.kt +++ b/rbs/src/main/java/com/rettermobile/rbs/service/RBSNetwork.kt @@ -55,7 +55,7 @@ class RBSNetwork { val newRequestBuilder = originalRequest.newBuilder() newRequestBuilder - .header("User-Agent", "rbs-android-sdk-1.1.9.5") + .header("User-Agent", "rbs-android-sdk-1.1.9.7") .addHeader("Content-Type", "application/json;charset=UTF-8") .addHeader("x-rbs-sdk-client", "android") .cacheControl(CacheControl.FORCE_NETWORK) diff --git a/rbs/src/main/java/com/rettermobile/rbs/util/TokenManager.kt b/rbs/src/main/java/com/rettermobile/rbs/util/TokenManager.kt index e73f7fc..9919474 100644 --- a/rbs/src/main/java/com/rettermobile/rbs/util/TokenManager.kt +++ b/rbs/src/main/java/com/rettermobile/rbs/util/TokenManager.kt @@ -173,7 +173,7 @@ object TokenManager { suspend fun checkToken() { // Token info control - availableRest.tryAcquire() + availableRest.acquire() RBSLogger.log("TokenManager.checkToken started") if (TextUtils.isEmpty(accessToken)) {