Added in API level 24

SecurityEvent


class SecurityEvent : Parcelable
kotlin.Any
   ↳ android.app.admin.SecurityLog.SecurityEvent

A class representing a security event log entry.

Summary

Inherited constants
Public methods
Int

Any!

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

Long

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

Int

Returns severity level for the event.

Int

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

Long

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

Unit
writeToParcel(dest: Parcel, flags: Int)

Properties
static Parcelable.Creator<SecurityLog.SecurityEvent!>

Public methods

describeContents

Added in API level 24
fun describeContents(): Int
Return
Int a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either 0 or android.os.Parcelable#CONTENTS_FILE_DESCRIPTOR

getData

Added in API level 24
fun getData(): Any!

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

getId

Added in API level 28
fun getId(): Long

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.

getLogLevel

Added in API level 28
fun getLogLevel(): Int

Returns severity level for the event.

Return
Int Value is android.app.admin.SecurityLog#LEVEL_INFO, android.app.admin.SecurityLog#LEVEL_WARNING, or android.app.admin.SecurityLog#LEVEL_ERROR

getTag

Added in API level 24
fun getTag(): Int

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

Return
Int Value is android.app.admin.SecurityLog#TAG_ADB_SHELL_INTERACTIVE, android.app.admin.SecurityLog#TAG_ADB_SHELL_CMD, android.app.admin.SecurityLog#TAG_SYNC_RECV_FILE, android.app.admin.SecurityLog#TAG_SYNC_SEND_FILE, android.app.admin.SecurityLog#TAG_APP_PROCESS_START, android.app.admin.SecurityLog#TAG_KEYGUARD_DISMISSED, android.app.admin.SecurityLog#TAG_KEYGUARD_DISMISS_AUTH_ATTEMPT, android.app.admin.SecurityLog#TAG_KEYGUARD_SECURED, android.app.admin.SecurityLog#TAG_OS_STARTUP, android.app.admin.SecurityLog#TAG_OS_SHUTDOWN, android.app.admin.SecurityLog#TAG_LOGGING_STARTED, android.app.admin.SecurityLog#TAG_LOGGING_STOPPED, android.app.admin.SecurityLog#TAG_MEDIA_MOUNT, android.app.admin.SecurityLog#TAG_MEDIA_UNMOUNT, android.app.admin.SecurityLog#TAG_LOG_BUFFER_SIZE_CRITICAL, android.app.admin.SecurityLog#TAG_PASSWORD_EXPIRATION_SET, android.app.admin.SecurityLog#TAG_PASSWORD_COMPLEXITY_SET, android.app.admin.SecurityLog#TAG_PASSWORD_HISTORY_LENGTH_SET, android.app.admin.SecurityLog#TAG_MAX_SCREEN_LOCK_TIMEOUT_SET, android.app.admin.SecurityLog#TAG_MAX_PASSWORD_ATTEMPTS_SET, android.app.admin.SecurityLog#TAG_KEYGUARD_DISABLED_FEATURES_SET, android.app.admin.SecurityLog#TAG_REMOTE_LOCK, android.app.admin.SecurityLog#TAG_USER_RESTRICTION_ADDED, android.app.admin.SecurityLog#TAG_USER_RESTRICTION_REMOVED, android.app.admin.SecurityLog#TAG_WIPE_FAILURE, android.app.admin.SecurityLog#TAG_KEY_GENERATED, android.app.admin.SecurityLog#TAG_KEY_IMPORT, android.app.admin.SecurityLog#TAG_KEY_DESTRUCTION, android.app.admin.SecurityLog#TAG_CERT_AUTHORITY_INSTALLED, android.app.admin.SecurityLog#TAG_CERT_AUTHORITY_REMOVED, android.app.admin.SecurityLog#TAG_CRYPTO_SELF_TEST_COMPLETED, android.app.admin.SecurityLog#TAG_KEY_INTEGRITY_VIOLATION, android.app.admin.SecurityLog#TAG_CERT_VALIDATION_FAILURE, android.app.admin.SecurityLog#TAG_CAMERA_POLICY_SET, android.app.admin.SecurityLog#TAG_PASSWORD_COMPLEXITY_REQUIRED, android.app.admin.SecurityLog#TAG_PASSWORD_CHANGED, android.app.admin.SecurityLog#TAG_WIFI_CONNECTION, android.app.admin.SecurityLog#TAG_WIFI_DISCONNECTION, android.app.admin.SecurityLog#TAG_BLUETOOTH_CONNECTION, android.app.admin.SecurityLog#TAG_BLUETOOTH_DISCONNECTION, android.app.admin.SecurityLog#TAG_PACKAGE_INSTALLED, android.app.admin.SecurityLog#TAG_PACKAGE_UPDATED, android.app.admin.SecurityLog#TAG_PACKAGE_UNINSTALLED, android.app.admin.SecurityLog#TAG_BACKUP_SERVICE_TOGGLED, android.app.admin.SecurityLog#TAG_NFC_ENABLED, or android.app.admin.SecurityLog#TAG_NFC_DISABLED

getTimeNanos

Added in API level 24
fun getTimeNanos(): Long

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

writeToParcel

Added in API level 24
fun writeToParcel(
    dest: Parcel,
    flags: Int
): Unit
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_WRITE_RETURN_VALUE. Value is either 0 or a combination of android.os.Parcelable#PARCELABLE_WRITE_RETURN_VALUE, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Properties

CREATOR

Added in API level 24
static val CREATOR: Parcelable.Creator<SecurityLog.SecurityEvent!>