diff options
| author | 2020-04-23 10:39:34 -0700 | |
|---|---|---|
| committer | 2020-04-23 17:34:11 -0700 | |
| commit | 961d2fd25800dfb227a7deb1622a274f45b34fcf (patch) | |
| tree | 2e3cbc8393aedead75c8cdfc49bb9a54f296ecc4 | |
| parent | b6c403b091c623718e2bb1d18b167b7d13b600f6 (diff) | |
Annotate state atoms
Finish annotating state atoms with exclusive state, primary fields, and
default/trigger reset states. These annotations are based off of
ag/4639668.
Some "StateChanged" atoms require more research before annotating them
as state atoms. This includes new atoms that have been added after
ag/4639668 and are potential state atoms.
Test: bit statsd_test:*
Bug: 145838040
Change-Id: I7b43c50d61d93c96b16d69e2fdc3683031f2e22c
| -rw-r--r-- | cmds/statsd/src/atoms.proto | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/cmds/statsd/src/atoms.proto b/cmds/statsd/src/atoms.proto index bd15264c008f..efb13d537d88 100644 --- a/cmds/statsd/src/atoms.proto +++ b/cmds/statsd/src/atoms.proto @@ -657,7 +657,8 @@ message ActivityManagerSleepStateChanged { ASLEEP = 1; AWAKE = 2; } - optional State state = 1 [(state_field_option).exclusive_state = true]; + optional State state = 1 + [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** @@ -1174,7 +1175,8 @@ message BatterySaverModeStateChanged { OFF = 0; ON = 1; } - optional State state = 1; + optional State state = 1 + [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** @@ -1184,7 +1186,8 @@ message BatterySaverModeStateChanged { * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message DeviceIdleModeStateChanged { - optional android.server.DeviceIdleModeEnum state = 1; + optional android.server.DeviceIdleModeEnum state = 1 + [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } @@ -1195,7 +1198,8 @@ message DeviceIdleModeStateChanged { * frameworks/base/core/java/com/android/internal/os/BatteryStatsImpl.java */ message DeviceIdlingModeStateChanged { - optional android.server.DeviceIdleModeEnum state = 1; + optional android.server.DeviceIdleModeEnum state = 1 + [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** @@ -1239,7 +1243,8 @@ message ChargingStateChanged { */ message PluggedStateChanged { // Whether the device is plugged in, from frameworks/base/core/proto/android/os/enums.proto. - optional android.os.BatteryPluggedStateEnum state = 1; + optional android.os.BatteryPluggedStateEnum state = 1 + [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** @@ -2703,8 +2708,9 @@ message UsbConnectorStateChanged { STATE_DISCONNECTED = 0; STATE_CONNECTED = 1; } - optional State state = 1; - optional string id = 2; + optional State state = 1 + [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; + optional string id = 2 [(state_field_option).primary_field = true]; // Last active session in ms. // 0 when the port is in connected state. optional int64 last_connect_duration_millis = 3; @@ -3503,11 +3509,8 @@ message OverlayStateChanged { ENTERED = 1; EXITED = 2; } - optional State state = 4 [ - (state_field_option).exclusive_state = true, - (state_field_option).nested = false, - (state_field_option).default_state_value = 2 - ]; + optional State state = 4 + [(state_field_option).exclusive_state = true, (state_field_option).nested = false]; } /** |