Updated on 2026-08-14
This commit is contained in:
parent
2cbaf822cf
commit
ff024393f9
8 changed files with 55 additions and 10 deletions
|
|
@ -179,6 +179,7 @@ dependencies {
|
|||
implementation(projects.core.utils)
|
||||
implementation(projects.core.decompose)
|
||||
implementation(projects.core.error.ext)
|
||||
implementation(projects.core.security)
|
||||
implementation(projects.libs.crypto)
|
||||
implementation(projects.libs.auth)
|
||||
implementation(projects.libs.blockchainSdk)
|
||||
|
|
@ -353,7 +354,6 @@ dependencies {
|
|||
|
||||
/** DI */
|
||||
implementation(deps.hilt.android)
|
||||
|
||||
kapt(deps.hilt.kapt)
|
||||
kapt(deps.hilt.compilerx)
|
||||
|
||||
|
|
@ -385,10 +385,10 @@ dependencies {
|
|||
implementation(deps.prettyLogger)
|
||||
implementation(deps.decompose.ext.compose)
|
||||
implementation(deps.moshi.adapters)
|
||||
|
||||
implementation(deps.moshi.kotlin)
|
||||
ksp(deps.moshi.kotlin.codegen)
|
||||
kaptForObfuscatingVariants(deps.retrofit.response.type.keeper)
|
||||
implementation(files("libs/dexprotector-annotations.jar"))
|
||||
|
||||
/** Testing libraries */
|
||||
testImplementation(projects.common.test)
|
||||
|
|
@ -418,7 +418,6 @@ dependencies {
|
|||
implementation(deps.camera.camera2)
|
||||
implementation(deps.camera.lifecycle)
|
||||
implementation(deps.camera.view)
|
||||
|
||||
implementation(deps.listenableFuture)
|
||||
implementation(deps.mlKit.barcodeScanning)
|
||||
|
||||
|
|
|
|||
BIN
app/libs/dexprotector-annotations.jar
Normal file
BIN
app/libs/dexprotector-annotations.jar
Normal file
Binary file not shown.
|
|
@ -0,0 +1,13 @@
|
|||
package com.tangem.tap.core.security
|
||||
|
||||
import com.dexprotector.rtc.RtcStatus
|
||||
import com.tangem.security.DeviceSecurityInfoProvider
|
||||
|
||||
internal class DefaultDeviceSecurityInfoProvider : DeviceSecurityInfoProvider {
|
||||
override val isRooted: Boolean
|
||||
get() = RtcStatus.getRtcStatus().root
|
||||
override val isBootloaderUnlocked: Boolean
|
||||
get() = RtcStatus.getRtcStatus().unlockedBootloader
|
||||
override val isXposed: Boolean
|
||||
get() = RtcStatus.getRtcStatus().xposed
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
package com.tangem.tap.di.core.security
|
||||
|
||||
import com.tangem.security.DeviceSecurityInfoProvider
|
||||
import com.tangem.tap.core.security.DefaultDeviceSecurityInfoProvider
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
internal object SecurityModule {
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideDeviceSecurityInfoProvider(): DeviceSecurityInfoProvider {
|
||||
return DefaultDeviceSecurityInfoProvider()
|
||||
}
|
||||
}
|
||||
1
core/security/.gitignore
vendored
Normal file
1
core/security/.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/build
|
||||
4
core/security/build.gradle.kts
Normal file
4
core/security/build.gradle.kts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
plugins {
|
||||
alias(deps.plugins.kotlin.jvm)
|
||||
id("configuration")
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package com.tangem.security
|
||||
|
||||
interface DeviceSecurityInfoProvider {
|
||||
val isRooted: Boolean
|
||||
val isBootloaderUnlocked: Boolean
|
||||
val isXposed: Boolean
|
||||
}
|
||||
|
|
@ -153,19 +153,20 @@ include(":test:core")
|
|||
include(":test:mock")
|
||||
|
||||
// region Core modules
|
||||
include(":core:ab-tests")
|
||||
include(":core:analytics")
|
||||
include(":core:analytics:models")
|
||||
include(":core:datasource")
|
||||
include(":core:config-toggles")
|
||||
include(":core:ab-tests")
|
||||
include(":core:navigation")
|
||||
include(":core:res")
|
||||
include(":core:ui")
|
||||
include(":core:utils")
|
||||
include(":core:datasource")
|
||||
include(":core:decompose")
|
||||
include(":core:pagination")
|
||||
include(":core:error")
|
||||
include(":core:error:ext")
|
||||
include(":core:navigation")
|
||||
include(":core:pagination")
|
||||
include(":core:res")
|
||||
include(":core:security")
|
||||
include(":core:ui")
|
||||
include(":core:utils")
|
||||
// endregion Core modules
|
||||
|
||||
// region Common modules
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue