Add NfcAutoTransactReported atom
Bug: 395951282
Flag: EXEMPT metrics
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:1b24c38a8185d8dbc2c3590daf9e6a0d5481f3e6)
Merged-In: Ibcfea849a7e7ad04130e56308ad90937d85948b1
Change-Id: Ibcfea849a7e7ad04130e56308ad90937d85948b1
diff --git a/stats/atoms.proto b/stats/atoms.proto
index 0931e46..f66e0a0 100644
--- a/stats/atoms.proto
+++ b/stats/atoms.proto
@@ -1332,6 +1332,7 @@
extensions 1021; // HearingDeviceActiveEventReported hearing_device_active_event_reported
extensions 1029; // ZramSetupExecuted zram_setup_executed
extensions 1036; // NfcExitFrameTableChanged nfc_exit_frame_table_changed
+ extensions 1038; // NfcAutoTransactReported nfc_auto_transact_reported
extensions 9999; // Atom9999 atom_9999
// StatsdStats tracks platform atoms with ids up to 1500.
diff --git a/stats/atoms/nfc/nfc_extension_atoms.proto b/stats/atoms/nfc/nfc_extension_atoms.proto
index d2ef271..aaf2bd8 100644
--- a/stats/atoms/nfc/nfc_extension_atoms.proto
+++ b/stats/atoms/nfc/nfc_extension_atoms.proto
@@ -20,6 +20,7 @@
import "frameworks/proto_logging/stats/atom_field_options.proto";
import "frameworks/proto_logging/stats/atoms.proto";
+import "frameworks/proto_logging/stats/enums/nfc/enums.proto";
option java_package = "com.android.nfc";
@@ -29,6 +30,7 @@
optional NfcPollingLoopNotificationReported nfc_polling_loop_notification_reported = 857 [(module) = "nfc"];
optional NfcProprietaryCapabilitiesReported nfc_proprietary_capabilities_reported = 858 [(module) = "nfc"];
optional NfcExitFrameTableChanged nfc_exit_frame_table_changed = 1036 [(module) = "nfc"];
+ optional NfcAutoTransactReported nfc_auto_transact_reported = 1038 [(module) = "nfc"];
}
message NfcObserveModeStateChanged {
@@ -43,6 +45,7 @@
WALLET_ROLE_HOLDER = 1;
FOREGROUND_APP = 2;
AUTO_TRANSACT = 3;
+ AUTO_TRANSACT_NFCC = 4;
}
optional State state = 1;
@@ -87,6 +90,19 @@
optional int32 number_of_exit_frames_supported = 5;
}
+message NfcAutoTransactReported {
+ enum AutoTransactProcessor {
+ PROCESSOR_UNKNOWN = 0;
+ HOST = 1;
+ NFCC = 2;
+ }
+
+ optional AutoTransactProcessor auto_transact_processor = 1;
+ // This measures the number of bytes in the frame that triggered the auto-transact.
+ optional int32 frame_size = 2;
+ optional android.nfc.NfcProprietaryFrameType frame_type = 3;
+}
+
message NfcExitFrameTableChanged {
optional int32 table_size = 1; // the number of entries in the table
optional int32 timeout_millis = 2; // timeout chosen to restore observe mode (ms)
diff --git a/stats/enums/nfc/enums.proto b/stats/enums/nfc/enums.proto
index fffd892..92fa0d2 100644
--- a/stats/enums/nfc/enums.proto
+++ b/stats/enums/nfc/enums.proto
@@ -49,3 +49,10 @@
TAG_MIFARE_CLASSIC = 7;
TAG_KOVIO_BARCODE = 8;
}
+
+// Proprietary NFC Frame Types
+enum NfcProprietaryFrameType {
+ NFC_FRAME_UNKNOWN = 0;
+ NFC_FRAME_ECP_V1 = 1;
+ NFC_FRAME_ECP_V2 = 2;
+}