Add RESERVE_NEW_UI_EVENT_ID field to EventEnum interface.

Bug: 193797130
Test: atest SystemUITests
Change-Id: I806e1a5f60f49254aa7ea23bef31b3517c0de1fd
This commit is contained in:
thiruram
2021-08-24 14:17:07 -07:00
parent b20a692454
commit f1ae087329

View File

@@ -32,6 +32,22 @@ public interface UiEventLogger {
* OEMs should use event IDs above 100000 and below 1000000 (1 million).
*/
interface UiEventEnum {
/**
* Tag used to request new UI Event IDs via presubmit analysis.
*
* <p>Use RESERVE_NEW_UI_EVENT_ID as the constructor parameter for a new {@link EventEnum}
* to signal the presubmit analyzer to reserve a new ID for the event. The new ID will be
* returned as a Gerrit presubmit finding. Do not submit {@code RESERVE_NEW_UI_EVENT_ID} as
* the constructor parameter for any event.
*
* <pre>
* &#064;UiEvent(doc = "Briefly describe the interaction when this event will be logged")
* UNIQUE_EVENT_NAME(RESERVE_NEW_UI_EVENT_ID);
* </pre>
*/
int RESERVE_NEW_UI_EVENT_ID = Integer.MIN_VALUE; // Negative IDs are ignored by the logger.
int getId();
}