refactor: optimize wallet JWT management, update security checks for debug builds, and improve pricing data parsing
This commit is contained in:
@@ -122,7 +122,7 @@ dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.1.5'
|
||||
|
||||
|
||||
implementation 'com.scottyab:rootbeer-lib:0.1.0'
|
||||
implementation 'com.scottyab:rootbeer-lib:0.1.2'
|
||||
|
||||
// تمت الترقية لتطابق تطبيق الراكب
|
||||
implementation 'com.google.android.gms:play-services-safetynet:18.1.0'
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.siro.siro_driver
|
||||
|
||||
import android.app.AlertDialog
|
||||
import android.content.Intent
|
||||
import android.content.pm.ApplicationInfo
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.widget.LinearLayout
|
||||
@@ -134,11 +135,17 @@ class MainActivity : FlutterFragmentActivity() {
|
||||
|
||||
// --- بقية كود الحماية الخاص بك ---
|
||||
private fun isDeviceCompromised(): Boolean {
|
||||
val isDebug = (applicationInfo.flags and ApplicationInfo.FLAG_DEBUGGABLE) != 0
|
||||
if (isDebug) {
|
||||
Log.d("MainActivity", "Debug build: bypassing root check")
|
||||
return false
|
||||
}
|
||||
return try {
|
||||
val isRootedByRootBeer = RootBeer(this).isRooted
|
||||
isRootedByRootBeer
|
||||
} catch (e: Exception) {
|
||||
true
|
||||
} catch (t: Throwable) {
|
||||
Log.e("MainActivity", "RootBeer check failed: ", t)
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user