Android.App.Admin.DevicePolicyManager.SetKeyguardDisabledFeatures Method
Called by an application that is administering the device to disable keyguard customizations, such as widgets.

Syntax

[Android.Runtime.Register("setKeyguardDisabledFeatures", "(Landroid/content/ComponentName;I)V", "GetSetKeyguardDisabledFeatures_Landroid_content_ComponentName_IHandler")]
public virtual void SetKeyguardDisabledFeatures (Android.Content.ComponentName admin, [Android.Runtime.GeneratedEnum] KeyguardDisable which)

Parameters

admin
Which Android.App.Admin.DeviceAdminReceiver this request is associated with.
which
DevicePolicyManager.KeyguardDisableFeaturesNone (default), DevicePolicyManager.KeyguardDisableWidgetsAll, DevicePolicyManager.KeyguardDisableSecureCamera, DevicePolicyManager.KeyguardDisableSecureNotifications, DevicePolicyManager.KeyguardDisableTrustAgents, DevicePolicyManager.KeyguardDisableUnredactedNotifications, DevicePolicyManager.KeyguardDisableFeaturesAll

Remarks

Called by an application that is administering the device to disable keyguard customizations, such as widgets. After setting this, keyguard features will be disabled according to the provided feature list.

The calling device admin must have requested DeviceAdminInfo.UsesPolicyDisableKeyguardFeatures to be able to call this method; if it has not, a security exception will be thrown.

Calling this from a managed profile will throw a security exception.

[Android Documentation]

Requirements

Namespace: Android.App.Admin
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 17