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(android.os.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. Value is either 0 or CONTENTS_FILE_DESCRIPTOR

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 SecurityLog.LEVEL_INFO, SecurityLog.LEVEL_WARNING, or SecurityLog.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 SecurityLog.TAG_ADB_SHELL_INTERACTIVE, SecurityLog.TAG_ADB_SHELL_CMD, SecurityLog.TAG_SYNC_RECV_FILE, SecurityLog.TAG_SYNC_SEND_FILE, SecurityLog.TAG_APP_PROCESS_START, SecurityLog.TAG_KEYGUARD_DISMISSED, SecurityLog.TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT, SecurityLog.TAG_KEYGUARD_SECURED, SecurityLog.TAG_OS_STARTUP, SecurityLog.TAG_OS_SHUTDOWN, SecurityLog.TAG_LOGGING_STARTED, SecurityLog.TAG_LOGGING_STOPPED, SecurityLog.TAG_MEDIA_MOUNT, SecurityLog.TAG_MEDIA_UNMOUNT, SecurityLog.TAG_LOG_BUFFER_SIZE_CRITICAL, SecurityLog.TAG_PASSWORD_EXPIRATION_SET, SecurityLog.TAG_PASSWORD_COMPLEXITY_SET, SecurityLog.TAG_PASSWORD_HISTORY_LENGTH_SET, SecurityLog.TAG_MAX_SCREEN_LOCK_TIMEOUT_SET, SecurityLog.TAG_MAX_PASSWORD_ATTEMPTS_SET, SecurityLog.TAG_KEYGUARD_DISABLED_FEATURES_SET, SecurityLog.TAG_REMOTE_LOCK, SecurityLog.TAG_USER_RESTRICTION_ADDED, SecurityLog.TAG_USER_RESTRICTION_REMOVED, SecurityLog.TAG_WIPE_FAILURE, SecurityLog.TAG_KEY_GENERATED, SecurityLog.TAG_KEY_IMPORT, SecurityLog.TAG_KEY_DESTRUCTION, SecurityLog.TAG_CERT_AUTHORITY_INSTALLED, SecurityLog.TAG_CERT_AUTHORITY_REMOVED, SecurityLog.TAG_CRYPTO_SELF_TEST_COMPLETED, SecurityLog.TAG_KEY_INTEGRITY_VIOLATION, SecurityLog.TAG_CERT_VALIDATION_FAILURE, SecurityLog.TAG_CAMERA_POLICY_SET, SecurityLog.TAG_PASSWORD_COMPLEXITY_REQUIRED, SecurityLog.TAG_PASSWORD_CHANGED, SecurityLog.TAG_WIFI_CONNECTION, SecurityLog.TAG_WIFI_DISCONNECTION, SecurityLog.TAG_BLUETOOTH_CONNECTION, SecurityLog.TAG_BLUETOOTH_DISCONNECTION, SecurityLog.TAG_PACKAGE_INSTALLED, SecurityLog.TAG_PACKAGE_UPDATED, or SecurityLog.TAG_PACKAGE_UNINSTALLED

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. This value cannot be null.

flags int: Additional flags about how the object should be written. May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE. Value is either 0 or a combination of Parcelable.PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES