Save the date! Android Dev Summit is coming to Mountain View, CA on November 7-8, 2018.

SecurityLog.SecurityEvent

public static final class SecurityLog.SecurityEvent
extends Object implements Parcelable

java.lang.Object
   ↳ android.app.admin.SecurityLog.SecurityEvent


A class representing a security event log entry.

Summary

Inherited constants

Fields

public static final Creator<SecurityLog.SecurityEvent> CREATOR

Public methods

int describeContents()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.

Object getData()

Returns the payload contained in this log entry or null if there is no payload.

long getId()

Returns the id of the event, where the id monotonically increases for each event.

int getLogLevel()

Returns severity level for the event.

int getTag()

Returns the tag of this log entry, which specifies entry's semantics.

long getTimeNanos()

Returns the timestamp in nano seconds when this event was logged.

void writeToParcel(Parcel dest, int flags)

Flatten this object in to a Parcel.

Inherited methods

Fields

CREATOR

added in API level 24
public static final Creator<SecurityLog.SecurityEvent> CREATOR

Public methods

describeContents

added in API level 24
public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of writeToParcel(Parcel, int), the return value of this method must include the CONTENTS_FILE_DESCRIPTOR bit.

Returns
int a bitmask indicating the set of special object types marshaled by this Parcelable object instance.

getData

added in API level 24
public Object getData ()

Returns the payload contained in this log entry or null if there is no payload.

Returns
Object

getId

added in API level 28
public long getId ()

Returns the id of the event, where the id monotonically increases for each event. The id is reset when the device reboots, and when security logging is enabled.

Returns
long

getLogLevel

added in API level 28
public int getLogLevel ()

Returns severity level for the event.

Returns
int

Value is LEVEL_INFO, LEVEL_WARNING or LEVEL_ERROR.

getTag

added in API level 24
public int getTag ()

Returns the tag of this log entry, which specifies entry's semantics.

Returns
int

Value is TAG_ADB_SHELL_INTERACTIVE, TAG_ADB_SHELL_CMD, TAG_SYNC_RECV_FILE, TAG_SYNC_SEND_FILE, TAG_APP_PROCESS_START, TAG_KEYGUARD_DISMISSED, TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT, TAG_KEYGUARD_SECURED, TAG_OS_STARTUP, TAG_OS_SHUTDOWN, TAG_LOGGING_STARTED, TAG_LOGGING_STOPPED, TAG_MEDIA_MOUNT, TAG_MEDIA_UNMOUNT, TAG_LOG_BUFFER_SIZE_CRITICAL, TAG_PASSWORD_EXPIRATION_SET, TAG_PASSWORD_COMPLEXITY_SET, TAG_PASSWORD_HISTORY_LENGTH_SET, TAG_MAX_SCREEN_LOCK_TIMEOUT_SET, TAG_MAX_PASSWORD_ATTEMPTS_SET, TAG_KEYGUARD_DISABLED_FEATURES_SET, TAG_REMOTE_LOCK, TAG_USER_RESTRICTION_ADDED, TAG_USER_RESTRICTION_REMOVED, TAG_WIPE_FAILURE, TAG_KEY_GENERATED, TAG_KEY_IMPORT, TAG_KEY_DESTRUCTION, TAG_CERT_AUTHORITY_INSTALLED, TAG_CERT_AUTHORITY_REMOVED, TAG_CRYPTO_SELF_TEST_COMPLETED, TAG_KEY_INTEGRITY_VIOLATION or TAG_CERT_VALIDATION_FAILURE.

getTimeNanos

added in API level 24
public long getTimeNanos ()

Returns the timestamp in nano seconds when this event was logged.

Returns
long

writeToParcel

added in API level 24
public void writeToParcel (Parcel dest, 
                int flags)

Flatten this object in to a Parcel.

Parameters
dest Parcel: The Parcel in which the object should be written.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE.