Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 148e42ef authored by Bob Wang's avatar Bob Wang Committed by Gerrit Code Review
Browse files

Merge "[Nfc] Add securityLog tag for nfc enable/disable." into main

parents af43c947 664d64ff
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -8619,6 +8619,8 @@ package android.app.admin {
    field public static final int TAG_MAX_SCREEN_LOCK_TIMEOUT_SET = 210019; // 0x33463
    field public static final int TAG_MEDIA_MOUNT = 210013; // 0x3345d
    field public static final int TAG_MEDIA_UNMOUNT = 210014; // 0x3345e
    field @FlaggedApi("android.nfc.nfc_state_change_security_log_event_enabled") public static final int TAG_NFC_DISABLED = 210046; // 0x3347e
    field @FlaggedApi("android.nfc.nfc_state_change_security_log_event_enabled") public static final int TAG_NFC_ENABLED = 210045; // 0x3347d
    field public static final int TAG_OS_SHUTDOWN = 210010; // 0x3345a
    field public static final int TAG_OS_STARTUP = 210009; // 0x33459
    field public static final int TAG_PACKAGE_INSTALLED = 210041; // 0x33479
+17 −0
Original line number Diff line number Diff line
@@ -16,7 +16,10 @@

package android.app.admin;

import static android.nfc.Flags.FLAG_NFC_STATE_CHANGE_SECURITY_LOG_EVENT_ENABLED;

import android.Manifest;
import android.annotation.FlaggedApi;
import android.annotation.IntDef;
import android.annotation.NonNull;
import android.annotation.Nullable;
@@ -100,6 +103,8 @@ public class SecurityLog {
            TAG_PACKAGE_UPDATED,
            TAG_PACKAGE_UNINSTALLED,
            TAG_BACKUP_SERVICE_TOGGLED,
            TAG_NFC_ENABLED,
            TAG_NFC_DISABLED,
    })
    public @interface SecurityLogTag {}

@@ -610,6 +615,18 @@ public class SecurityLog {
     */
    public static final int TAG_BACKUP_SERVICE_TOGGLED =
            SecurityLogTags.SECURITY_BACKUP_SERVICE_TOGGLED;

    /**
     * Indicates that NFC service is enabled. There is no extra payload in the log event.
     */
    @FlaggedApi(FLAG_NFC_STATE_CHANGE_SECURITY_LOG_EVENT_ENABLED)
    public static final int TAG_NFC_ENABLED = SecurityLogTags.SECURITY_NFC_ENABLED;

    /**
     * Indicates that NFC service is disabled. There is no extra payload in the log event.
     */
    @FlaggedApi(FLAG_NFC_STATE_CHANGE_SECURITY_LOG_EVENT_ENABLED)
    public static final int TAG_NFC_DISABLED = SecurityLogTags.SECURITY_NFC_DISABLED;
    /**
     * Event severity level indicating that the event corresponds to normal workflow.
     */
+3 −1
Original line number Diff line number Diff line
@@ -49,3 +49,5 @@ option java_package android.app.admin
210042 security_package_updated                 (package_name|3),(version_code|1),(user_id|1)
210043 security_package_uninstalled             (package_name|3),(version_code|1),(user_id|1)
210044 security_backup_service_toggled          (package|3),(admin_user|1),(enabled|1)
210045 security_nfc_enabled
210046 security_nfc_disabled
 No newline at end of file
+8 −0
Original line number Diff line number Diff line
@@ -157,3 +157,11 @@ flag {
    description: "Enable EUICC card emulation"
    bug: "321314635"
}

flag {
    name: "nfc_state_change_security_log_event_enabled"
    is_exported: true
    namespace: "nfc"
    description: "Enabling security log for nfc state change"
    bug: "319934052"
}