Deprecated
in API level 30
Class Overview
This class provides APIs to control 'App Permission Monitor' Policy.
App Permission Monitor: The APM(App Permission Monitor) is to show the notification to user,
when critical resource(Camera, Screen capture, Microphone..) is accessed in background.
Summary
Constants |
int |
APM_ENFORCE_NONE |
Denotes constant value of APM_ENFORCE_NONE |
int |
APM_ENFORCE_OFF |
Denotes constant value of APM_ENFORCE_OFF |
int |
APM_ENFORCE_ON |
Denotes constant value of APM_ENFORCE_ON |
int |
APM_ENFORCING_ON |
Denotes constant value of APM_ENFORCING_ON
If set this flag, accessing to permission in B/G is denied, not notification only. |
int |
APM_FAILED |
Denotes constant value of APM_FAILED |
int |
APM_SUCCESS |
Denotes constant value of APM_SUCCESS |
[Expand]
Inherited Methods |
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Constants
public
static
final
int
APM_ENFORCE_NONE
Since: API level 25
Denotes constant value of APM_ENFORCE_NONE
Constant Value:
0
(0x00000000)
public
static
final
int
APM_ENFORCE_OFF
Since: API level 25
Denotes constant value of APM_ENFORCE_OFF
Constant Value:
1
(0x00000001)
public
static
final
int
APM_ENFORCE_ON
Since: API level 25
Denotes constant value of APM_ENFORCE_ON
Constant Value:
2
(0x00000002)
public
static
final
int
APM_ENFORCING_ON
Since: API level 26
Denotes constant value of APM_ENFORCING_ON
If set this flag, accessing to permission in B/G is denied, not notification only.
Constant Value:
3
(0x00000003)
public
static
final
int
APM_FAILED
Since: API level 25
Denotes constant value of APM_FAILED
Constant Value:
-1
(0xffffffff)
public
static
final
int
APM_SUCCESS
Since: API level 25
Denotes constant value of APM_SUCCESS
Constant Value:
0
(0x00000000)
Public Constructors
Public Methods
public
int
addAppToAPMWhiteList
(List<AppIdentity> packageList)
Deprecated
in API level 30
API to add an appliaction to APM white list.
Parameters
packageList
| The list of AppIdentity
of application package to be added to the APMWhitelist |
Usage
Use this API to add an appliaction to APM white list.
If app is included in the whitelist, the notification will not be shown
to user when critical resource is accessed in background.
|
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
APMPolicy policy = edm.getAPMPolicy();
int result = -1;
List packageList = new ArrayList();
packageList.add(new AppIdentity(String pkgname, String signature));
try {
result = policy.addAppToAPMWhiteList(packageList);
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
For Container:
EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance();
KnoxContainerManager kmcm = ekm.getKnoxContainerManager(mContext, containerID);
APMPolicy policy = kmcm.getAPMPolicy();
int result = -1;
List packageList = new ArrayList();
packageList.add(new AppIdentity(String pkgname, String signature));
try {
result = policy.addAppToAPMWhiteList(packageList);
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_SECURITY"
permission, which has a protection level of signature. |
public
int
getAPMStatus
()
Deprecated
in API level 30
API to get status of 'App Permission Monitor'
Usage
Use this API to get status of APM
|
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
APMPolicy policy = edm.getAPMPolicy();
int result = -1;
try {
result = policy.getAPMStatus();
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
For Container:
EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance();
KnoxContainerManager kmcm = ekm.getKnoxContainerManager(mContext, containerID);
APMPolicy policy = kmcm.getAPMPolicy();
int result = -1;
try {
result = policy.getAPMStatus();
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_SECURITY"
permission, which has a protection level of signature. |
Deprecated
in API level 30
Returns
- Returns
The list of
AppIdentity
if success to get APMWhiteList
null
if fail to get APMWhiteList
Usage
Use this API to get APM whitelist
|
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
APMPolicy policy = edm.getAPMPolicy();
List result;
try {
result = policy.getAPMWhiteList();
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
For Container:
EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance();
KnoxContainerManager kmcm = ekm.getKnoxContainerManager(mContext, containerID);
APMPolicy policy = kmcm.getAPMPolicy();
List result;
try {
result = policy.getAPMWhiteList();
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_SECURITY"
permission, which has a protection level of signature. |
public
int
removeAppFromAPMWhiteList
(List<AppIdentity> packageList)
Deprecated
in API level 30
API to remove an application from APM white list
Parameters
packageList
| The list of AppIdentity
of application package to be remove from the APMWhitelist |
Returns
- Returns
APM_SUCCESS
if success remove app from APMWhitelist,
APM_FAILED
if failed remove app from APMWhitelist.
Usage
Use this API to remove an application from APM white list.
|
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
APMPolicy policy = edm.getAPMPolicy();
int result = -1;
List packageList = new ArrayList();
packageList.add(new AppIdentity(String pkgname, String signature));
try {
result = policy.removeAppFromAPMWhiteList(packageList);
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
For Container:
EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance();
KnoxContainerManager kmcm = ekm.getKnoxContainerManager(mContext, containerID);
APMPolicy policy = kmcm.getAPMPolicy();
int result = -1;
List packageList = new ArrayList();
packageList.add(new AppIdentity(String pkgname, String signature));
try {
result = policy.removeAppFromAPMWhiteList(packageList);
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_SECURITY"
permission, which has a protection level of signature. |
public
int
setAPMStatus
(int flag)
Deprecated
in API level 30
API to set status of 'App Permission Monitor'
Usage
Use this API to set APM enforce and users can not off APM
|
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
APMPolicy policy = edm.getAPMPolicy();
int result = -1;
try {
result = policy.setAPMStatus(APM_ENFORCE_NONE);
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
For Container:
EnterpriseKnoxManager ekm = EnterpriseKnoxManager.getInstance();
KnoxContainerManager kmcm = ekm.getKnoxContainerManager(mContext, containerID);
APMPolicy policy = kmcm.getAPMPolicy();
int result = -1;
try {
result = policy.setAPMStatus(APM_ENFORCE_NONE);
} catch (SecurityException e) {
Log.e(TAG, "SecurityException: " + e);
}
|
Permission
The use of this API requires the caller to have the
"com.samsung.android.knox.permission.KNOX_SECURITY"
permission, which has a protection level of signature. |