Updated on 2026-08-14

This commit is contained in:
Tangem 2025-01-26 12:50:53 +03:00
parent faafa2724a
commit 04b7287332
45 changed files with 1597 additions and 96 deletions

View file

@ -2,11 +2,11 @@ package com.tangem.feature.wallet.presentation.wallet.ui.utils
import android.app.Activity
import android.content.Context
import android.content.ContextWrapper
import com.google.android.gms.tasks.Task
import com.google.android.play.core.review.ReviewInfo
import com.google.android.play.core.review.ReviewManager
import com.google.android.play.core.review.ReviewManagerFactory
import com.tangem.core.ui.utils.findActivity
import timber.log.Timber
internal object ReviewManagerRequester {
@ -44,13 +44,4 @@ internal object ReviewManagerRequester {
Timber.e(task.exception)
}
}
private fun Context.findActivity(): Activity {
var context = this
while (context is ContextWrapper) {
if (context is Activity) return context
context = context.baseContext
}
error("Permissions should be called in the context of an Activity")
}
}