com.ardic.android.managers.deviceadmin.IDeviceAdminManager |
Class Overview
Provides a set of APIs for auto activating and deactivating device admin.
Public Methods
public
abstract
ComponentName
getActiveAdmin
()
Returns the caller active device admin information.
public
abstract
boolean
isActiveAdminLocked
()
Returns the caller application's active admin lock state.
Returns |
boolean |
true if the active admin is locked else false |
public
abstract
boolean
isAdminActive
()
Returns the caller device admin activation state.
Warning: Immediate calling this api after setActiveAdmin()
and
removeActiveAdmin()
operations may return wrong result because of set and remove
admin apis has asyncronous operation. To get right info about activated and deactivated
device admin user should use their own application's receiver class which is derived from
DeviceAdminReceiver by using overriden "onEnabled" and "onDisabled" functions.
Returns |
boolean |
true if the caller admin is active else false |
public
abstract
boolean
isDeviceAdminLocked
(ComponentName adminReceiver)
Returns the given application's device admin lock state.
Parameters |
adminReceiver |
ComponentName :
Application device admin receiver ComponentName |
Returns |
boolean |
true if the active admin is locked else false |
public
abstract
boolean
removeActiveAdmin
()
Deactivates the caller device admin.
Returns |
boolean |
true if the operation succeeds else false |
public
abstract
boolean
setActiveAdmin
()
Activates the caller device admin.
Returns |
boolean |
true if the operation succeeds else false |
public
abstract
boolean
setActiveAdminLocked
(boolean state)
Sets caller application's active admin locking state. Locked active admin can not be
deactivated by any application instead of itself.
Locking only works while caller application device admin should be activated before trying to
lock. To activate user can use setActiveAdmin()
. If device admin has not already
activated, this api returns false
.
Parameters |
state |
boolean :
true locks active admin and nothing can remove it's activated admin
instead of itself, false unlocks. |
Returns |
boolean |
true if the operation succeeds else false |