DevicePolicyManager.RetrievePreRebootSecurityLogs(ComponentName) Method

Definition

Called by device owner or profile owner of an organization-owned managed profile to retrieve device logs from before the device's last reboot.

[Android.Runtime.Register("retrievePreRebootSecurityLogs", "(Landroid/content/ComponentName;)Ljava/util/List;", "GetRetrievePreRebootSecurityLogs_Landroid_content_ComponentName_Handler", ApiSince=24)]
[Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_SECURITY_LOGGING")]
public virtual System.Collections.Generic.IList<Android.App.Admin.SecurityLog.SecurityEvent>? RetrievePreRebootSecurityLogs (Android.Content.ComponentName? admin);
[<Android.Runtime.Register("retrievePreRebootSecurityLogs", "(Landroid/content/ComponentName;)Ljava/util/List;", "GetRetrievePreRebootSecurityLogs_Landroid_content_ComponentName_Handler", ApiSince=24)>]
[<Android.Runtime.RequiresPermission("android.permission.MANAGE_DEVICE_POLICY_SECURITY_LOGGING")>]
abstract member RetrievePreRebootSecurityLogs : Android.Content.ComponentName -> System.Collections.Generic.IList<Android.App.Admin.SecurityLog.SecurityEvent>
override this.RetrievePreRebootSecurityLogs : Android.Content.ComponentName -> System.Collections.Generic.IList<Android.App.Admin.SecurityLog.SecurityEvent>

Parameters

admin
ComponentName

Which device admin this request is associated with, or null if called by a delegated app.

Returns

Device logs from before the latest reboot of the system, or null if this API is not supported on the device.

Attributes

Remarks

Called by device owner or profile owner of an organization-owned managed profile to retrieve device logs from before the device's last reboot.

<strong> This API is not supported on all devices. Calling this API on unsupported devices will result in null being returned. The device logs are retrieved from a RAM region which is not guaranteed to be corruption-free during power cycles, as a result be cautious about data corruption when parsing. </strong>

When called by a device owner, if there is any other user or profile on the device, it must be affiliated with the device. Otherwise a SecurityException will be thrown. See #isAffiliatedUser.

Java documentation for android.app.admin.DevicePolicyManager.retrievePreRebootSecurityLogs(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