Since: API level 38
public class

ConfigurationManager

extends Object
java.lang.Object
   ↳ com.samsung.android.knox.zt.config.ConfigurationManager

Class Overview

This class provides APIs to control KnoxZt service. Starting and stopping KnoxZt service as well as (Un)registering listener and notifying factor score change.

Since
API level 38
KNOX 3.11

Summary

Nested Classes
@interface ConfigurationManager.KnoxZtFeature Knox zero trust feature definition value. 
Constants
String FEATURE_SECURE_LOG Secure log feature value
int RESULT_CODE_FAIL_FEATURE_UNAVAILABLE Result code of Fail due to feature is not available (i.e feature is disabled state).
int RESULT_CODE_FAIL_PERMISSION_ERROR Result code of Fail due to permission error.
int RESULT_CODE_FAIL_SERVICE_UNAVAILABLE Result code of Fail due to service is not available.
int RESULT_CODE_FAIL_WRONG_ARGUMENT Result code of Fail due to wrong argument.
int RESULT_CODE_SUCCESS Result code of Success.
Public Constructors
ConfigurationManager()
Public Methods
String configFeature(String feature, String configs)
Configuration of feature
int disableFeature(String feature)
Disable feature
int enableFeature(String feature)
Enable feature
String getConfiguration(String feature)
Get configuration of feature
static ConfigurationManager getInstance(Context context)
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String FEATURE_SECURE_LOG

Since: API level 38

Secure log feature value

Since
API level 38
KNOX 3.11
Constant Value: "secureLog"

public static final int RESULT_CODE_FAIL_FEATURE_UNAVAILABLE

Since: API level 38

Result code of Fail due to feature is not available (i.e feature is disabled state).

Since
API level 38
KNOX 3.11
Constant Value: 4 (0x00000004)

public static final int RESULT_CODE_FAIL_PERMISSION_ERROR

Since: API level 38

Result code of Fail due to permission error.

Since
API level 38
KNOX 3.11
Constant Value: 3 (0x00000003)

public static final int RESULT_CODE_FAIL_SERVICE_UNAVAILABLE

Since: API level 38

Result code of Fail due to service is not available.

Since
API level 38
KNOX 3.11
Constant Value: 1 (0x00000001)

public static final int RESULT_CODE_FAIL_WRONG_ARGUMENT

Since: API level 38

Result code of Fail due to wrong argument.

Since
API level 38
KNOX 3.11
Constant Value: 2 (0x00000002)

public static final int RESULT_CODE_SUCCESS

Since: API level 38

Result code of Success.

Since
API level 38
KNOX 3.11
Constant Value: 0 (0x00000000)

Public Constructors

public ConfigurationManager ()

Since: API level 38

Public Methods

public String configFeature (String feature, String configs)

Since: API level 38

Configuration of feature

Parameters
feature Feature name
configs Json formatted string that contains contents of configuration.
It consists of json form with SecureLogConfig as key value.
For example, {"enableSignal":["ACCESSIBILITY_EVENT","VIDEO_CAPTURE_PERMISSION"],"pushLevel":"low","configSignal":{"phishing":{"confidenceScore":"Standard"}}}
Returns
  • Json formatted string consisting of result code and unsupported signals.
    For example, {"resultCode":0,"unsupportedSignals":[{"SignalName":"PREVENT_APP_REMOVAL_CAPABILITY","status":-99},{"SignalName":"ACCESS_CALL_LOG_PERMISSION","status":-4}]} Unsupported signals error code defined in SecureLogConstants
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_ZT_SECURITY_LOG_INTERNAL" permission which has a protection level of signature.
Usage
     final String feature = ConfigurationManager.FEATURE_SECURE_LOG;
     final String configs = "{\"enableSignal\":[\"ACCESSIBILITY_EVENT\",\"VIDEO_CAPTURE_PERMISSION\"],\"pushLevel\":\"low\",\"configSignal\":{\"phishing\":{\"confidenceScore\":\"Standard\"}}}"
     final String result = ConfigurationManager.getInstance(getApplicationContext()).configFeature(feature, configs);
 
Since
API level 38
KNOX 3.11

public int disableFeature (String feature)

Since: API level 38

Disable feature

Parameters
feature feature name
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_ZT_SECURITY_LOG_INTERNAL" permission which has a protection level of signature.
Since
API level 38
KNOX 3.11

public int enableFeature (String feature)

Since: API level 38

Enable feature

Parameters
feature feature name
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_ZT_SECURITY_LOG_INTERNAL" permission which has a protection level of signature.
Since
API level 38
KNOX 3.11

public String getConfiguration (String feature)

Since: API level 38

Get configuration of feature

Parameters
feature Feature name
Returns
  • Json formatted string consisting of result code and configurations For example, {"resultCode":0,"pushLevel":"low","enableSignal":["ACCESSIBILITY_EVENT","ACCESS_CALL_LOG_PERMISSION"],"configSignal":{"phishing":{"confidenceScore":"Standard"}}}
Permission
The use of this API requires the caller to have the "com.samsung.android.knox.permission.KNOX_ZT_SECURITY_LOG_INTERNAL" permission which has a protection level of signature.
Since
API level 38
KNOX 3.11

public static ConfigurationManager getInstance (Context context)

Since: API level 38