• BlackBerry Dynamics
  • Runtime library for Android applications
  • 12.0.1.79
Threat Class Reference

Interface for retrieving threat details for a specific ThreatType.

Inheritance diagram for Threat:
ThreatGeoZone ThreatIdentity

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 not enabled it may be because the feature hasn't been enabled by the enterprise administrator. Alternatively for some threats, like GeoZone, the end user is required to allow a specific a system permission, e.g. location, in order for the runtime to be able to perform checks. If a required permission is not allowed by the user the threat detection will be disabled.

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 not enabled the feature will have been disabled by the enterprise administrator or turned off by default in the Mobile Threat Defence (MTD) policy.

Note: detecting some threats, like WifiSecurity, requires a user to grant device permissions within the application before the runtime can execute the check. See isChecked() to confirm an enabled check was also executed by the runtime.

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.