• BlackBerry Spark AppSecure
  • Security library for Android applications
  • 0.7.915.0
Threat Class Reference

Interface for retrieving threat details for a specific ThreatType.

Inherited by ThreatAppMalware, ThreatAppSideload, ThreatDeviceOffline, ThreatDeviceSecurity, ThreatDeviceSoftware, ThreatNetworkSecurity, and ThreatWiFiSecurity.

Public Member Functions

ThreatType getType ()
 Indicate the type of threat being checked. More...
 
long getEvaluatedTime ()
 Determine when the check last completed. More...
 
ThreatLevel getRiskLevel ()
 Return the level of risk posed by the threat. More...
 
boolean getDetectionEnabled ()
 Check whether the threat is being evaluated. More...
 
boolean isEnabled ()
 Return whether the detection for this threat is enabled by configuration. More...
 
String getInfo ()
 Get information on possible remediation actions to the threat. More...
 
boolean isChecked ()
 Return if the check has been executed by the runtime. More...
 

Member Function Documentation

◆ getType()

ThreatType getType ( )

Indicate the specific type of threat being checked.

Returns
ThreatType.

◆ getEvaluatedTime()

long getEvaluatedTime ( )

Return the timestamp of when the threat was last evaluated. For example, when a malware scan was last completed.

Returns
Unix timestamp in milliseconds of when the check last ran. The result is 0 if checks have not yet been performed, for example after the app hosting the runtime has just been installed.

◆ getRiskLevel()

ThreatLevel getRiskLevel ( )

Return the level of risk posed by the threat.

Returns
ThreatLevel

◆ getDetectionEnabled()

boolean getDetectionEnabled ( )

Check whether the threat is being evaluated by the runtime. If detection is disabled you can enable it by using config.ManageFeatures.enableFeature and include the ThreatType you wish to enabled as a parameter.

Returns
true if the detection is enabled.
false if detection is disabled.
Deprecated:
This method is deprecated in favor of isEnabled and isChecked

◆ isEnabled()

boolean isEnabled ( )

Check whether the threat should be evaluated by the runtime. If detection is disabled you can enable it by using config.ManageFeatures.enableFeature and include the ThreatType you wish to enabled as a parameter.

Returns
true if the detection is enabled.
false if detection is disabled.

◆ getInfo()

String getInfo ( )

Return a string providing any possible remediation actions or further details about the threat.

Returns
String providing remediation information.

◆ isChecked()

boolean isChecked ( )

Return if the check for this threat has been executed by the runtime.

The return value will be true if the check is enabled by configuration and if the runtime has the required permission to execute the check. Some threats, like WiFiSecurity, require the user to first accept device permissions before the check may run.

Returns
true if the rule has been checked, otherwise false.