Share via


DevicePolicyManager.IsSecurityLoggingEnabled(ComponentName) Method

Definition

Return whether security logging is enabled or not by the admin.

[Android.Runtime.Register("isSecurityLoggingEnabled", "(Landroid/content/ComponentName;)Z", "GetIsSecurityLoggingEnabled_Landroid_content_ComponentName_Handler", ApiSince=24)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_SECURITY_LOGGING")]
public virtual bool IsSecurityLoggingEnabled (Android.Content.ComponentName? admin);
[<Android.Runtime.Register("isSecurityLoggingEnabled", "(Landroid/content/ComponentName;)Z", "GetIsSecurityLoggingEnabled_Landroid_content_ComponentName_Handler", ApiSince=24)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_SECURITY_LOGGING")>]
abstract member IsSecurityLoggingEnabled : Android.Content.ComponentName -> bool
override this.IsSecurityLoggingEnabled : Android.Content.ComponentName -> bool

Parameters

admin
ComponentName

Which device admin this request is associated with. Null if the caller is not a device admin

Returns

true if security logging is enabled, false otherwise.

Attributes

Remarks

Return whether security logging is enabled or not by the admin.

Can only be called by the device owner or a profile owner of an organization-owned managed profile, otherwise a SecurityException will be thrown.

Java documentation for android.app.admin.DevicePolicyManager.isSecurityLoggingEnabled(android.content.ComponentName).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to