mirror of
https://github.com/xtclovver/RKNHardering.git
synced 2026-07-09 17:19:25 +00:00
Fix
This commit is contained in:
parent
5140bc9dc3
commit
c05870238b
2 changed files with 6 additions and 5 deletions
|
|
@ -88,9 +88,6 @@ object DirectSignsChecker {
|
|||
findings += appDetection.findings
|
||||
evidence += appDetection.evidence
|
||||
matchedApps += appDetection.matchedApps
|
||||
if (appDetection.matchedApps.isNotEmpty()) {
|
||||
needsReview = true
|
||||
}
|
||||
|
||||
return CategoryResult(
|
||||
name = context.getString(R.string.checker_direct_category_name),
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ data class InstalledVpnDetectionResult(
|
|||
)
|
||||
|
||||
object InstalledVpnAppDetector {
|
||||
private const val TAG = "VpnAppDetector"
|
||||
|
||||
fun detect(context: Context): InstalledVpnDetectionResult {
|
||||
val pm = context.packageManager
|
||||
|
|
@ -187,8 +188,11 @@ object InstalledVpnAppDetector {
|
|||
for (pkg in installedPackages) {
|
||||
val packageName = pkg.packageName
|
||||
if (matchedApps.containsKey(packageName)) continue
|
||||
|
||||
val appInfo = pkg.applicationInfo ?: continue
|
||||
val isSystemApp = (appInfo.flags and android.content.pm.ApplicationInfo.FLAG_SYSTEM) != 0
|
||||
val isUpdatedSystemApp = (appInfo.flags and android.content.pm.ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0
|
||||
if (isSystemApp || isUpdatedSystemApp) continue
|
||||
|
||||
val appName = resolveDisplayAppName(pm, packageName, appInfo)
|
||||
val normalizedAppName = appName.uppercase(Locale.ROOT)
|
||||
if (!normalizedAppName.contains("VPN")) continue
|
||||
|
|
@ -212,7 +216,7 @@ object InstalledVpnAppDetector {
|
|||
evidence.add(
|
||||
EvidenceItem(
|
||||
source = EvidenceSource.INSTALLED_APP,
|
||||
detected = true,
|
||||
detected = false,
|
||||
confidence = confidence,
|
||||
description = description,
|
||||
packageName = packageName,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue