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

Control which device security checks will be evaluated. More...

Description

Control which device security checks will be evaluated when the application launches and when DeviceChecker.checkDeviceSecurity() is called.

Classes

enum  DeviceSecurityCheck
 Enumeration of security checks which can be performed on the device. More...
 
enum  EnforcementAction
 Control what action to take when a threat is detected. More...
 

Public Member Functions

 DeviceSecurityRules ()
 Constructor with all checks disabled. More...
 
 DeviceSecurityRules (SecurityFeatureStatus status)
 Set all checks to be enabled or disabled. More...
 
 DeviceSecurityRules (List< DeviceSecurityCheck > enabledChecks)
 Set specifc checks which should be enabled. More...
 
DeviceSecurityRules enableCheck (DeviceSecurityCheck check)
 Enable a specific security check. More...
 
DeviceSecurityRules disableCheck (DeviceSecurityCheck check)
 Disable a specific security check from being evaluated. More...
 
SecurityFeatureStatus getCheck (DeviceSecurityCheck check)
 Determine if a specific check is enabled or disabled. More...
 
DeviceSecurityRules setEnforcementAction (DeviceSecurityCheck check, EnforcementAction action) throws IllegalArgumentException
 Control what action to take when a debugger is detected. More...
 
EnforcementAction getEnforcementAction (DeviceSecurityCheck check)
 Return what action will be taken when a debugger is detected.
 

Constructor & Destructor Documentation

◆ DeviceSecurityRules() [1/3]

Constructor with all checks disabled.

◆ DeviceSecurityRules() [2/3]

Constructor which sets all Check statuses to status.

Parameters
status- Enable or Disable all DeviceSecurity checks.

◆ DeviceSecurityRules() [3/3]

DeviceSecurityRules ( List< DeviceSecurityCheck enabledChecks)

Constructor which sets list of enabledChecks to be enabled. Checks not specified will be disabled.

Parameters
enabledChecks- List of Device Security Checks that should be enabled.

Member Function Documentation

◆ enableCheck()

DeviceSecurityRules enableCheck ( DeviceSecurityCheck  check)

Enable a specific check to be evaluated. Note the rules to evaluate must be configured.

◆ disableCheck()

DeviceSecurityRules disableCheck ( DeviceSecurityCheck  check)

Turn off a specific check so it is no longer evaluated.

◆ getCheck()

Determine if a specific check is currently enabled.

◆ setEnforcementAction()

DeviceSecurityRules setEnforcementAction ( DeviceSecurityCheck  check,
EnforcementAction  action 
) throws IllegalArgumentException

This setting controls whether to notify or exit the application process when debug detection is enabled. The default is to notify.

Exceptions
IllegalArgumentExceptionif EnforcementAction.TERMINATE_PROCESS is used with anything except DeviceSecurityCheck.DEBUG_DETECTION