java.lang.Objectcom.lenovo.android.app.admin.LenovoManagementBase
com.lenovo.android.app.admin.LenovoDevicePolicyManager
public final class LenovoDevicePolicyManager
The Class LenovoDevicePolicyManager.
Nested Class Summary | |
---|---|
static class |
LenovoDevicePolicyManager.LenovoADServerInfo
The Class LenovoADServerInfo. |
static class |
LenovoDevicePolicyManager.LenovoDevicePolicyInfo
The Class LenovoDevicePolicyInfo |
static class |
LenovoDevicePolicyManager.LenovoEmailServerInfo
The Class LenovoEmailServerInfo. |
Field Summary | |
---|---|
static java.lang.String |
LenovoManagementJarFile
|
Fields inherited from class com.lenovo.android.app.admin.LenovoManagementBase |
---|
Location |
Constructor Summary | |
---|---|
LenovoDevicePolicyManager(android.content.Context context)
Constructor. |
|
LenovoDevicePolicyManager(android.content.Context context,
java.lang.String tempDir)
Constructor. |
Method Summary | |
---|---|
boolean |
applyProfile(android.content.ComponentName admin,
byte[] is)
Apply XML configuration profile. |
boolean |
applyProfileFromFile(android.content.ComponentName admin,
java.lang.String xmlFile)
Apply XML configuration profile. |
LenovoDevicePolicyManager.LenovoADServerInfo |
getADServerInfo()
Gets the AD server info. |
LenovoDevicePolicyManager.LenovoDevicePolicyInfo |
getAppliedProfileInfo()
Gets the "master profile" that is currently applied to the device |
LenovoDevicePolicyManager.LenovoDevicePolicyInfo |
getAppliedProfileInfo(java.util.UUID uuid)
Gets the installed profile info for the given uuid |
LenovoDevicePolicyManager.LenovoEmailServerInfo |
getEmailServerInfo()
Gets the Email server info. |
int |
getInstalledAPIVersion()
Gets the API version supported by the service that is installed on this device. |
LenovoDevicePolicyManager.LenovoDevicePolicyInfo[] |
getInstalledProfiles()
Gets an array of profile currently installed on the device Note: Maybe be null |
LenovoDevicePolicyManager.LenovoDevicePolicyInfo |
getProfileInfo(byte[] is)
Gets XML configuration profile information |
LenovoDevicePolicyManager.LenovoDevicePolicyInfo |
getProfileInfoFromFile(java.lang.String xmlFile)
Gets XML configuration profile information |
int |
getSupportedAPIVersion()
Gets the API version supported by this interface. |
boolean |
isADScreenLockEnabled()
Checks if AD credentials are enabled to unlock the device. |
boolean |
isADScreenLockRequired()
Checks if AD credentials are required to unlock the device |
boolean |
isADScreenLockRequired(java.util.UUID uuid)
Checks if AD credentials are required to unlock the device. |
boolean |
isBluetoothBlocked()
Checks if Bluetooth is blocked by policy. |
boolean |
isBluetoothBlocked(java.util.UUID uuid)
Checks if Bluetooth is blocked by policy. |
boolean |
isCameraBlocked()
Checks if camera is blocked by policy. |
boolean |
isCameraBlocked(java.util.UUID uuid)
Checks if camera is blocked by policy. |
boolean |
isDataRoamingBlocked()
Checks if data services while roaming is blocked by policy. |
boolean |
isDataRoamingBlocked(java.util.UUID uuid)
Checks if data services while roaming is blocked by policy. |
boolean |
isDeviceRooted()
Checks if the device is currently rooted |
boolean |
isHDMIBlocked()
Checks if the HDMI port is blocked by policy. |
boolean |
isHDMIBlocked(java.util.UUID uuid)
Checks if the HDMI port is blocked by policy. |
boolean |
isHotspotBlocked()
Checks if hotspot is currently blocked |
boolean |
isHotspotBlocked(java.util.UUID uuid)
Checks if hotspot is currently blocked by policy |
boolean |
isMicBlocked()
Checks if microphone is blocked by policy. |
boolean |
isMicBlocked(java.util.UUID uuid)
Checks if microphone is blocked by policy. |
boolean |
isMicroUSBBlocked()
Checks if micro-USB port is blocked by policy. |
boolean |
isMicroUSBBlocked(java.util.UUID uuid)
Checks if micro-USB port is blocked by policy. |
boolean |
isSDCardEncryptionEnabled()
Checks if SD card is encrypted |
boolean |
isSDCardEncryptionRequired()
Checks if SD card encryption is required |
boolean |
isSDCardEncryptionRequired(java.util.UUID uuid)
Checks if SD card encryption is required. |
boolean |
isSDCardSlotBlocked()
Checks if SD card slot is blocked by policy. |
boolean |
isSDCardSlotBlocked(java.util.UUID uuid)
Checks if SD card slot is blocked by policy. |
boolean |
isTetheringBlocked()
Checks if tethering is currently blocked |
boolean |
isTetheringBlocked(java.util.UUID uuid)
Checks if tethering is currently blocked by policy |
boolean |
isUnknownSourcesBlocked()
Checks if install from unknown sources is blocked by policy. |
boolean |
isUnknownSourcesBlocked(java.util.UUID uuid)
Checks if install from unknown sources is blocked by policy. |
boolean |
isUSBBlocked()
Checks if USB port is blocked by policy. |
boolean |
isUSBBlocked(java.util.UUID uuid)
Checks if USB port is blocked by policy. |
boolean |
isUSBDebuggingBlocked()
Checks if USB debugging is blocked by policy. |
boolean |
isUSBDebuggingBlocked(java.util.UUID uuid)
Checks if USB debugging is blocked by policy. |
boolean |
isWifiBlocked()
Checks if WiFi is blocked by policy. |
boolean |
isWifiBlocked(java.util.UUID uuid)
Checks if WiFi is blocked by policy. |
boolean |
removeProfile(android.content.ComponentName admin,
java.util.UUID uuid)
Remove XML configuration profile. |
boolean |
setBlockBluetooth(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of Bluetooth. |
boolean |
setBlockCamera(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of the camera. |
boolean |
setBlockDataRoaming(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks data services while roaming. |
boolean |
setBlockHDMI(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of the HDMI port. |
boolean |
setBlockHotspot(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of device becoming a hotspot. |
boolean |
setBlockMic(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of microphone. |
boolean |
setBlockMicroUSB(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of micro-USB port. |
boolean |
setBlockSDCardSlot(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of the SD card slot. |
boolean |
setBlockTethering(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of tethering the device. |
boolean |
setBlockUnknownSources(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks installation from unknown sources. |
boolean |
setBlockUSB(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of full-size USB port. |
boolean |
setBlockUSBDebugging(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks USB debugging. |
boolean |
setBlockWifi(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bBlock)
Blocks use of WiFi. |
boolean |
setRequireADScreenLock(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bRequire)
Requires the user to use Active Directory credentials to unlock the device. |
boolean |
setRequireSDCardEncryption(android.content.ComponentName admin,
java.util.UUID uuid,
boolean bRequire)
Requires the user to encrypt the SD card. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String LenovoManagementJarFile
Constructor Detail |
---|
public LenovoDevicePolicyManager(android.content.Context context) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
context
- The Context in which we are creating the device admin.
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
public LenovoDevicePolicyManager(android.content.Context context, java.lang.String tempDir) throws java.lang.ClassNotFoundException, java.lang.NoSuchMethodException
context
- The Context in which we are creating the device admin.tempDir
- Temporary directory used for loading classes. This may be null.
java.lang.ClassNotFoundException
java.lang.NoSuchMethodException
Method Detail |
---|
public boolean applyProfile(android.content.ComponentName admin, byte[] is)
admin
- Which DeviceAdminReceiver this request is associated with.is
- The XML input data itself.
public boolean applyProfileFromFile(android.content.ComponentName admin, java.lang.String xmlFile)
admin
- Which DeviceAdminReceiver this request is associated with.xmlFile
- The filename of the XML input data file. Note: This must be readable by the Android "system" user.
public LenovoDevicePolicyManager.LenovoADServerInfo getADServerInfo()
public LenovoDevicePolicyManager.LenovoDevicePolicyInfo getAppliedProfileInfo()
public LenovoDevicePolicyManager.LenovoDevicePolicyInfo getAppliedProfileInfo(java.util.UUID uuid)
uuid
- the uuid
public LenovoDevicePolicyManager.LenovoEmailServerInfo getEmailServerInfo()
public int getInstalledAPIVersion()
public LenovoDevicePolicyManager.LenovoDevicePolicyInfo[] getInstalledProfiles()
public LenovoDevicePolicyManager.LenovoDevicePolicyInfo getProfileInfo(byte[] is)
is
- The XML input data itself.
public LenovoDevicePolicyManager.LenovoDevicePolicyInfo getProfileInfoFromFile(java.lang.String xmlFile)
xmlFile
- The filename of the XML input data file. Note: This must be readable by the Android "system" user.
public int getSupportedAPIVersion()
public boolean isADScreenLockEnabled()
public boolean isADScreenLockRequired()
public boolean isADScreenLockRequired(java.util.UUID uuid)
uuid
- the uuid
public boolean isBluetoothBlocked()
public boolean isBluetoothBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isCameraBlocked()
public boolean isCameraBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isDataRoamingBlocked()
public boolean isDataRoamingBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isDeviceRooted()
public boolean isHDMIBlocked()
public boolean isHDMIBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isHotspotBlocked()
public boolean isHotspotBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isMicBlocked()
public boolean isMicBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isMicroUSBBlocked()
public boolean isMicroUSBBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isSDCardEncryptionEnabled()
public boolean isSDCardEncryptionRequired()
public boolean isSDCardEncryptionRequired(java.util.UUID uuid)
uuid
- the uuid
public boolean isSDCardSlotBlocked()
public boolean isSDCardSlotBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isTetheringBlocked()
public boolean isTetheringBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isUnknownSourcesBlocked()
public boolean isUnknownSourcesBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isUSBBlocked()
public boolean isUSBBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isUSBDebuggingBlocked()
public boolean isUSBDebuggingBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean isWifiBlocked()
public boolean isWifiBlocked(java.util.UUID uuid)
uuid
- the uuid
public boolean removeProfile(android.content.ComponentName admin, java.util.UUID uuid)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- ID of the policy to remove
public boolean setBlockBluetooth(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of Bluetooth
public boolean setBlockCamera(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of the camera
public boolean setBlockDataRoaming(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- the uuidbBlock
- Set to true to block data services while roaming
public boolean setBlockHDMI(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of the hdmi port
public boolean setBlockHotspot(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of device becoming a hotspot
public boolean setBlockMic(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of the microphone
public boolean setBlockMicroUSB(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of the micro-USB port
public boolean setBlockSDCardSlot(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of the SD card slot
public boolean setBlockTethering(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of tethering the device
public boolean setBlockUnknownSources(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- the uuidbBlock
- Set to true to block install of non-Market applications
public boolean setBlockUSB(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of the USB port
public boolean setBlockUSBDebugging(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- the uuidbBlock
- Set to true to block USB debugging
public boolean setBlockWifi(android.content.ComponentName admin, java.util.UUID uuid, boolean bBlock)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybBlock
- Set to true to block use of the SD card slot
public boolean setRequireADScreenLock(android.content.ComponentName admin, java.util.UUID uuid, boolean bRequire)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- Unique ID for the policybRequire
- Set to true to require use of domain credentials for unlock
public boolean setRequireSDCardEncryption(android.content.ComponentName admin, java.util.UUID uuid, boolean bRequire)
admin
- Which DeviceAdminReceiver this request is associated with.uuid
- the uuidbRequire
- Set to true to require use the user encrypt the SD card