com.cprot.ead 1.0.8199 → 1.0.8280
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/android/build.gradle
CHANGED
|
@@ -457,6 +457,7 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
457
457
|
try {
|
|
458
458
|
val securityCheck = module?.getSecurityFeatureChecks()
|
|
459
459
|
if (securityCheck != null) {
|
|
460
|
+
val factoryResetTime = securityCheck.getFactoryResetTime()?.toString()
|
|
460
461
|
val sb = StringBuilder()
|
|
461
462
|
sb.append("{")
|
|
462
463
|
sb.append("\"isMalwareDetected\":").append(securityCheck.isMalwareDetected()).append(",")
|
|
@@ -470,7 +471,7 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
470
471
|
sb.append("\"isScreenReaderAppsDetected\":").append(securityCheck.isScreenReaderAppsDetected()).append(",")
|
|
471
472
|
sb.append("\"isOverlayedAppsDetected\":").append(securityCheck.isOverlayedAppsDetected()).append(",")
|
|
472
473
|
sb.append("\"isDevModeEnabled\":").append(securityCheck.isDevModeEnabled()).append(",")
|
|
473
|
-
sb.append("\"factoryResetTime\":").append(
|
|
474
|
+
sb.append("\"factoryResetTime\":").append(factoryResetTime?.let { "\"$it\"" } ?: "null").append(",")
|
|
474
475
|
sb.append("\"isVpnActive\":").append(securityCheck.getIsVpnActive()).append(",")
|
|
475
476
|
sb.append("\"isDefaultSmsAppChanged\":").append(securityCheck.isDefaultSmsAppChanged()).append(",")
|
|
476
477
|
sb.append("\"isSimChanged\":").append(securityCheck.isSimChanged()).append(",")
|
|
@@ -525,6 +526,20 @@ class CProtEadModuleModule(reactContext: ReactApplicationContext) :
|
|
|
525
526
|
}
|
|
526
527
|
}
|
|
527
528
|
|
|
529
|
+
@ReactMethod
|
|
530
|
+
fun getLastCallContactInfo(promise: Promise) {
|
|
531
|
+
try {
|
|
532
|
+
val value = module?.getLastCallContactInfo()?.getDisplayName() ?: ""
|
|
533
|
+
promise.resolve(value)
|
|
534
|
+
} catch (e: Exception) {
|
|
535
|
+
promise.reject(
|
|
536
|
+
"GET_LAST_CALL_CONTACT_INFO_ERROR",
|
|
537
|
+
"Failed to get last call contact info",
|
|
538
|
+
e
|
|
539
|
+
)
|
|
540
|
+
}
|
|
541
|
+
}
|
|
542
|
+
|
|
528
543
|
@ReactMethod
|
|
529
544
|
fun getInfectedApps(promise: Promise) {
|
|
530
545
|
try {
|
|
@@ -660,8 +675,10 @@ override fun onThreatDetected(infectedApps: ArrayList<InfectedApp>) {
|
|
|
660
675
|
|
|
661
676
|
override fun onIncomingCall(state: Int, phoneNumber: String?, incomingNumber: IncomingNumber?, currentCallStatus: String?) {
|
|
662
677
|
var isSpam = false
|
|
678
|
+
var callContactInfo = ""
|
|
663
679
|
if (incomingNumber != null) {
|
|
664
680
|
isSpam = incomingNumber.isSpam
|
|
681
|
+
callContactInfo = incomingNumber.callContactInfo?.displayName ?: ""
|
|
665
682
|
}
|
|
666
683
|
|
|
667
684
|
val sb = StringBuilder()
|
|
@@ -670,7 +687,8 @@ override fun onThreatDetected(infectedApps: ArrayList<InfectedApp>) {
|
|
|
670
687
|
sb.append("\"phoneNumber\":\"").append(phoneNumber ?: "").append("\",")
|
|
671
688
|
sb.append("\"isSpam\":").append(isSpam).append(",")
|
|
672
689
|
sb.append("\"currentCallStatus\":\"").append(currentCallStatus ?: "").append("\",")
|
|
673
|
-
sb.append("\"state\":").append(state)
|
|
690
|
+
sb.append("\"state\":").append(state).append(",")
|
|
691
|
+
sb.append("\"callContactInfo\":\"").append(callContactInfo).append("\"")
|
|
674
692
|
sb.append("}")
|
|
675
693
|
sendLogEvent(sb.toString())
|
|
676
694
|
}
|