Class Overview
This class provides APIs to handle Hypervisor Device Manager.
The APIs has the following functions:
- Apply a Policy to Device
- Get HDM ID to Apply a Policy
- Get Current Policy Applied based on a Service Name
Use getSystemService(java.lang.String)
with argument "hdm_service" to get an instance of this class.
Summary
[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()
|
|
Public Methods
public
String
getHdmId
(String requestId)
API to get ID that is used for HDM.
Returns
- the JWS encoded in Base64 response to be verified by the server
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
HdmManager mHdmManager = edm.getHypervisorDeviceManager();
try {
String response = mHdmManager.getHdmId(requestId);
} catch (NoSuchMethodError e) {
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
} catch (NullPointerException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
|
public
String
getHdmPolicy
(String requestId, String serviceName)
API to get Current HDM Policy based on a service.
Parameters
requestId
| Request ID |
serviceName
| Service Name |
Returns
- the JWS encoded in Base64 response to be verified by the server
Usage
An administrator can get the current policy applied to a specific service name |
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
HdmManager mHdmManager = edm.getHypervisorDeviceManager();
try {
String response = mHdmManager.getHdmPolicy(requestId, serviceName);
} catch (NoSuchMethodError e) {
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
} catch (NullPointerException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
|
public
String
setHdmPolicy
(String hdmPolicy)
API to apply a HDM Policy on device.
Returns
- the JWS encoded in Base64 response to be verified by the server
Usage
An administrator can send a policy, in JWS encoded in Base64 format, properly signed by HDM server,
to control which sub systems will be blocked or allowed. |
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context);
HdmManager mHdmManager = edm.getHypervisorDeviceManager();
try {
String response = mHdmManager.setHdmPolicy(policyJws);
} catch (NoSuchMethodError e) {
e.printStackTrace();
} catch (SecurityException e) {
e.printStackTrace();
} catch (NullPointerException e) {
e.printStackTrace();
} catch (RemoteException e) {
e.printStackTrace();
}
|
Permission
The use of this feature requires the caller to have the
"com.samsung.android.knox.permission.KNOX_HDM" permission which has a
protection level of signature. |