Updated on 2026-08-14
This commit is contained in:
parent
2cbaf822cf
commit
ff024393f9
8 changed files with 55 additions and 10 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue