java.lang.Object | |
↳ | com.samsung.android.knox.profile.ProfilePolicy |
This class provides APIs to control profiles activated on device.
Constants | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
String | RESTRICTION_PROPERTY_CALENDAR_SHARE_TO_OWNER | This constant is a property for setRestriction and getRestriction. | |||||||||
String | RESTRICTION_PROPERTY_MOVE_FILES_TO_OWNER | This constant is a property for setRestriction and getRestriction. | |||||||||
String | RESTRICTION_PROPERTY_MOVE_FILES_TO_PROFILE | This constant is a property for setRestriction and getRestriction. | |||||||||
String | RESTRICTION_PROPERTY_SCREENCAPTURE_SAVE_TO_OWNER | This constant is a property for setRestriction and getRestriction. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
API to get restriction policy for profile.
| |||||||||||
API to set restriction policy for profile.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
This constant is a property for setRestriction and getRestriction. For the Calendar application it is set to true, will be allowed to share data out of the work profile.
Note : Effects on only Samsung Calendar application.
API level 35 |
KNOX 3.8 |
This constant is a property for setRestriction and getRestriction. Allow to move file(s) from work profile to owner area if this is set true. Otherwise it will not allowed to move file(s) from work profile to owner area.
API level 37 |
KNOX 3.10 |
This constant is a property for setRestriction and getRestriction. Allow to move file(s) from owner to work profile area if this is set true. Otherwise it will not allowed to move file(s) from owner to work profile area.
API level 37 |
KNOX 3.10 |
This constant is a property for setRestriction and getRestriction. Screencapture image will be saved in owner area if this is set true. Otherwise it will be saved inside work profile.
API level 36 |
KNOX 3.9 |
API to get restriction policy for profile. Note : This API can be called by not only profile owner or device owner but other normal applications.
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context); try { boolean result = edm.getProfilePolicy().getRestriction({PROERTY}); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); }
property | The corresponding value for the property. |
---|
true
if the operation of given property is allowed. otherwise false
API level 35 |
KNOX 3.8 |
API to set restriction policy for profile. Note : Only profile owner or device owner can call this API.
EnterpriseDeviceManager edm = EnterpriseDeviceManager.getInstance(context); try { boolean result = edm.getProfilePolicy().setRestriction({PROERTY}, {VALUE}); } catch (SecurityException e) { Log.e(TAG, "SecurityException: " + e); }
property | The corresponding value for the property. |
---|---|
value | A boolean value which either enables or disables the operation of given property. |
true
if the policy gets added successfully. otherwise false
SecurityException | If caller is not a profile owner. |
---|
API level 35 |
KNOX 3.8 |